Title: [118508] trunk/Source/WebCore
- Revision
- 118508
- Author
- [email protected]
- Date
- 2012-05-25 03:09:21 -0700 (Fri, 25 May 2012)
Log Message
Dodge style recalc when id attribute is overwritten with same value.
<http://webkit.org/b/87211>
Reviewed by Eric Seidel.
Don't force style recalc when the id attribute is set to the same value it already had.
~3.5% improvement on Dromaeo's "dom-attr" locally.
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (118507 => 118508)
--- trunk/Source/WebCore/ChangeLog 2012-05-25 10:05:57 UTC (rev 118507)
+++ trunk/Source/WebCore/ChangeLog 2012-05-25 10:09:21 UTC (rev 118508)
@@ -1,3 +1,16 @@
+2012-05-24 Andreas Kling <[email protected]>
+
+ Dodge style recalc when id attribute is overwritten with same value.
+ <http://webkit.org/b/87211>
+
+ Reviewed by Eric Seidel.
+
+ Don't force style recalc when the id attribute is set to the same value it already had.
+ ~3.5% improvement on Dromaeo's "dom-attr" locally.
+
+ * dom/Element.cpp:
+ (WebCore::Element::attributeChanged):
+
2012-05-24 Yury Semikhatsky <[email protected]>
Web Inspector: add profile type for native memory snapshots
Modified: trunk/Source/WebCore/dom/Element.cpp (118507 => 118508)
--- trunk/Source/WebCore/dom/Element.cpp 2012-05-25 10:05:57 UTC (rev 118507)
+++ trunk/Source/WebCore/dom/Element.cpp 2012-05-25 10:09:21 UTC (rev 118508)
@@ -702,13 +702,15 @@
document()->incDOMTreeVersion();
if (isIdAttributeName(attribute.name())) {
- if (attribute.isNull())
- attributeData()->setIdForStyleResolution(nullAtom);
- else if (document()->inQuirksMode())
- attributeData()->setIdForStyleResolution(attribute.value().lower());
- else
- attributeData()->setIdForStyleResolution(attribute.value());
- setNeedsStyleRecalc();
+ if (attribute.value() != attributeData()->idForStyleResolution()) {
+ if (attribute.isNull())
+ attributeData()->setIdForStyleResolution(nullAtom);
+ else if (document()->inQuirksMode())
+ attributeData()->setIdForStyleResolution(attribute.value().lower());
+ else
+ attributeData()->setIdForStyleResolution(attribute.value());
+ setNeedsStyleRecalc();
+ }
} else if (attribute.name() == HTMLNames::nameAttr)
setHasName(!attribute.isNull());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes