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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 } | 214 } |
215 bool hasClass = i < length; | 215 bool hasClass = i < length; |
216 setHasClass(hasClass); | 216 setHasClass(hasClass); |
217 if (hasClass) { | 217 if (hasClass) { |
218 attributes()->setClass(newClassString); | 218 attributes()->setClass(newClassString); |
219 if (DOMTokenList* classList = optionalClassList()) | 219 if (DOMTokenList* classList = optionalClassList()) |
220 static_cast<ClassList*>(classList)->reset(newClassString); | 220 static_cast<ClassList*>(classList)->reset(newClassString); |
221 } else if (attributeMap()) | 221 } else if (attributeMap()) |
222 attributeMap()->clearClass(); | 222 attributeMap()->clearClass(); |
223 setNeedsStyleRecalc(); | 223 setNeedsStyleRecalc(); |
224 dispatchSubtreeModifiedEvent(); | |
225 } | 224 } |
226 | 225 |
227 void StyledElement::parseMappedAttribute(Attribute* attr) | 226 void StyledElement::parseMappedAttribute(Attribute* attr) |
228 { | 227 { |
229 if (isIdAttributeName(attr->name())) | 228 if (isIdAttributeName(attr->name())) |
230 idAttributeChanged(attr); | 229 idAttributeChanged(attr); |
231 else if (attr->name() == classAttr) | 230 else if (attr->name() == classAttr) |
232 classAttributeChanged(attr->value()); | 231 classAttributeChanged(attr->value()); |
233 else if (attr->name() == styleAttr) { | 232 else if (attr->name() == styleAttr) { |
234 if (attr->isNull()) | 233 if (attr->isNull()) |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 } | 441 } |
443 | 442 |
444 void StyledElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const | 443 void StyledElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const |
445 { | 444 { |
446 if (!m_inlineStyleDecl) | 445 if (!m_inlineStyleDecl) |
447 return; | 446 return; |
448 m_inlineStyleDecl->addSubresourceStyleURLs(urls); | 447 m_inlineStyleDecl->addSubresourceStyleURLs(urls); |
449 } | 448 } |
450 | 449 |
451 } | 450 } |
OLD | NEW |