Title: [107573] trunk/Source/WebCore
Revision
107573
Author
[email protected]
Date
2012-02-13 07:54:24 -0800 (Mon, 13 Feb 2012)

Log Message

Don't mark element for style recalc when modifying its attribute style.
<http://webkit.org/b/78497>

Reviewed by Antti Koivisto.

StylePropertySet::setNeedsStyleRecalc() shouldn't do anything for attribute styles.
Their invalidation is handled exclusively by StyledElement::attributeChanged().
Elements with presentation attributes were being marked for style recalc twice,
once when the attribute changed, and again during attribute style update, below the
call to collectStyleForAttribute().

* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::setNeedsStyleRecalc):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (107572 => 107573)


--- trunk/Source/WebCore/ChangeLog	2012-02-13 15:10:26 UTC (rev 107572)
+++ trunk/Source/WebCore/ChangeLog	2012-02-13 15:54:24 UTC (rev 107573)
@@ -1,3 +1,19 @@
+2012-02-13  Andreas Kling  <[email protected]>
+
+        Don't mark element for style recalc when modifying its attribute style.
+        <http://webkit.org/b/78497>
+
+        Reviewed by Antti Koivisto.
+
+        StylePropertySet::setNeedsStyleRecalc() shouldn't do anything for attribute styles.
+        Their invalidation is handled exclusively by StyledElement::attributeChanged().
+        Elements with presentation attributes were being marked for style recalc twice,
+        once when the attribute changed, and again during attribute style update, below the
+        call to collectStyleForAttribute().
+
+        * css/StylePropertySet.cpp:
+        (WebCore::StylePropertySet::setNeedsStyleRecalc):
+
 2012-02-13  Caio Marcelo de Oliveira Filho  <[email protected]>
 
         Move attribute storage from NamedNodeMap to ElementAttributeData

Modified: trunk/Source/WebCore/css/StylePropertySet.cpp (107572 => 107573)


--- trunk/Source/WebCore/css/StylePropertySet.cpp	2012-02-13 15:10:26 UTC (rev 107572)
+++ trunk/Source/WebCore/css/StylePropertySet.cpp	2012-02-13 15:54:24 UTC (rev 107573)
@@ -717,7 +717,8 @@
             return;
 
         if (!m_isInlineStyleDeclaration) {
-            element->setNeedsStyleRecalc();
+            // If this is not an inline style, it's an attribute style, and we shouldn't mark the element for style recalc
+            // as that is handled by StyledElement::attributeChanged().
             return;
         }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to