OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * Copyright (C) 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 } | 221 } |
222 bool hasClass = i < length; | 222 bool hasClass = i < length; |
223 setHasClass(hasClass); | 223 setHasClass(hasClass); |
224 if (hasClass) { | 224 if (hasClass) { |
225 attributes()->setClass(newClassString); | 225 attributes()->setClass(newClassString); |
226 if (DOMTokenList* classList = optionalClassList()) | 226 if (DOMTokenList* classList = optionalClassList()) |
227 static_cast<ClassList*>(classList)->reset(newClassString); | 227 static_cast<ClassList*>(classList)->reset(newClassString); |
228 } else if (attributeMap()) | 228 } else if (attributeMap()) |
229 attributeMap()->clearClass(); | 229 attributeMap()->clearClass(); |
230 setNeedsStyleRecalc(); | 230 setNeedsStyleRecalc(); |
231 dispatchSubtreeModifiedEvent(); | |
232 } | 231 } |
233 | 232 |
234 void StyledElement::parseMappedAttribute(Attribute* attr) | 233 void StyledElement::parseMappedAttribute(Attribute* attr) |
235 { | 234 { |
236 if (isIdAttributeName(attr->name())) | 235 if (isIdAttributeName(attr->name())) |
237 idAttributeChanged(attr); | 236 idAttributeChanged(attr); |
238 else if (attr->name() == classAttr) | 237 else if (attr->name() == classAttr) |
239 classAttributeChanged(attr->value()); | 238 classAttributeChanged(attr->value()); |
240 else if (attr->name() == styleAttr) { | 239 else if (attr->name() == styleAttr) { |
241 if (attr->isNull()) | 240 if (attr->isNull()) |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 } | 442 } |
444 | 443 |
445 void StyledElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const | 444 void StyledElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const |
446 { | 445 { |
447 if (!m_inlineStyleDecl) | 446 if (!m_inlineStyleDecl) |
448 return; | 447 return; |
449 m_inlineStyleDecl->addSubresourceStyleURLs(urls); | 448 m_inlineStyleDecl->addSubresourceStyleURLs(urls); |
450 } | 449 } |
451 | 450 |
452 } | 451 } |
OLD | NEW |