StyleResolver: No need to compare "cellpadding" attributes when evaluating style...
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 Nov 2012 16:33:31 +0000 (16:33 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 Nov 2012 16:33:31 +0000 (16:33 +0000)
<http://webkit.org/b/102596>

Reviewed by Antti Koivisto.

Differences in the cellpadding attribute is caught by comparing additionalPresentationAttributeStyle()
later on in canShareStyleWithElement() and we shouldn't waste time on comparing them.

* css/StyleResolver.cpp:
(WebCore::haveIdenticalStyleAffectingAttributes):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@135068 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/css/StyleResolver.cpp

index eab644a..6eb67f2 100644 (file)
@@ -1,3 +1,16 @@
+2012-11-18  Andreas Kling  <akling@apple.com>
+
+        StyleResolver: No need to compare "cellpadding" attributes when evaluating style sharing candidates.
+        <http://webkit.org/b/102596>
+
+        Reviewed by Antti Koivisto.
+
+        Differences in the cellpadding attribute is caught by comparing additionalPresentationAttributeStyle()
+        later on in canShareStyleWithElement() and we shouldn't waste time on comparing them.
+
+        * css/StyleResolver.cpp:
+        (WebCore::haveIdenticalStyleAffectingAttributes):
+
 2012-11-17  Jon Lee  <jonlee@apple.com>
 
         Simulated mouse events should return an accurate offset
index fff60ba..a9685d8 100644 (file)
@@ -1164,9 +1164,6 @@ static inline bool haveIdenticalStyleAffectingAttributes(StyledElement* a, Style
         return false;
     if (a->fastGetAttribute(langAttr) != b->fastGetAttribute(langAttr))
         return false;
-    // FIXME: This is probably not necessary.
-    if (a->fastGetAttribute(cellpaddingAttr) != b->fastGetAttribute(cellpaddingAttr))
-        return false;
     if (a->hasClass()) {
 #if ENABLE(SVG)
         // SVG elements require a (slow!) getAttribute comparision because "class" is an animatable attribute for SVG.