Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Side by Side Diff: Source/WebCore/dom/StyledElement.cpp

Issue 9570062: Merge 107726 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/dom/class-attr-change-double-mutation-fire-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/class-attr-change-double-mutation-fire-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698