Title: [134947] trunk/Source/WebCore
Revision
134947
Author
akl...@apple.com
Date
2012-11-16 07:21:40 -0800 (Fri, 16 Nov 2012)

Log Message

Short-circuit Element::hasEquivalentAttributes() if elements share attribute data.
<http://webkit.org/b/102498>

Reviewed by Antti Koivisto.

Add a fast path to hasEquivalentAttributes() that checks if both elements are using
the same ElementAttributeData.

* dom/Element.cpp:
(WebCore::Element::hasEquivalentAttributes):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (134946 => 134947)


--- trunk/Source/WebCore/ChangeLog	2012-11-16 14:58:37 UTC (rev 134946)
+++ trunk/Source/WebCore/ChangeLog	2012-11-16 15:21:40 UTC (rev 134947)
@@ -1,3 +1,16 @@
+2012-11-16  Andreas Kling  <akl...@apple.com>
+
+        Short-circuit Element::hasEquivalentAttributes() if elements share attribute data.
+        <http://webkit.org/b/102498>
+
+        Reviewed by Antti Koivisto.
+
+        Add a fast path to hasEquivalentAttributes() that checks if both elements are using
+        the same ElementAttributeData.
+
+        * dom/Element.cpp:
+        (WebCore::Element::hasEquivalentAttributes):
+
 2012-11-16  Zeno Albisser  <z...@webkit.org>
 
         [Qt] Adding a null pointer check for currentContext to GraphicsContext3DQt.

Modified: trunk/Source/WebCore/dom/Element.cpp (134946 => 134947)


--- trunk/Source/WebCore/dom/Element.cpp	2012-11-16 14:58:37 UTC (rev 134946)
+++ trunk/Source/WebCore/dom/Element.cpp	2012-11-16 15:21:40 UTC (rev 134947)
@@ -960,6 +960,8 @@
 {
     const ElementAttributeData* attributeData = updatedAttributeData();
     const ElementAttributeData* otherAttributeData = other->updatedAttributeData();
+    if (attributeData == otherAttributeData)
+        return true;
     if (attributeData)
         return attributeData->isEquivalent(otherAttributeData);
     if (otherAttributeData)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to