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 document()->incDOMTreeVersion(); |
| 232 notifyNodeListsAttributeChanged(); |
231 } | 233 } |
232 | 234 |
233 void StyledElement::parseMappedAttribute(Attribute* attr) | 235 void StyledElement::parseMappedAttribute(Attribute* attr) |
234 { | 236 { |
235 if (isIdAttributeName(attr->name())) | 237 if (isIdAttributeName(attr->name())) |
236 idAttributeChanged(attr); | 238 idAttributeChanged(attr); |
237 else if (attr->name() == classAttr) | 239 else if (attr->name() == classAttr) |
238 classAttributeChanged(attr->value()); | 240 classAttributeChanged(attr->value()); |
239 else if (attr->name() == styleAttr) { | 241 else if (attr->name() == styleAttr) { |
240 if (attr->isNull()) | 242 if (attr->isNull()) |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 } | 444 } |
443 | 445 |
444 void StyledElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const | 446 void StyledElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const |
445 { | 447 { |
446 if (!m_inlineStyleDecl) | 448 if (!m_inlineStyleDecl) |
447 return; | 449 return; |
448 m_inlineStyleDecl->addSubresourceStyleURLs(urls); | 450 m_inlineStyleDecl->addSubresourceStyleURLs(urls); |
449 } | 451 } |
450 | 452 |
451 } | 453 } |
OLD | NEW |