Title: [109906] trunk/Source/WebCore
Revision
109906
Author
[email protected]
Date
2012-03-06 04:42:54 -0800 (Tue, 06 Mar 2012)

Log Message

r109563 caused perf regression
https://bugs.webkit.org/show_bug.cgi?id=80404

Add test for Element or ShadowRoot.

Reviewed by Antti Koivisto.

No new tests. (fix)

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::pushParentElement):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (109905 => 109906)


--- trunk/Source/WebCore/ChangeLog	2012-03-06 12:39:33 UTC (rev 109905)
+++ trunk/Source/WebCore/ChangeLog	2012-03-06 12:42:54 UTC (rev 109906)
@@ -1,3 +1,17 @@
+2012-03-06  Roland Steiner  <[email protected]>
+
+        r109563 caused perf regression
+        https://bugs.webkit.org/show_bug.cgi?id=80404
+
+        Add test for Element or ShadowRoot.
+
+        Reviewed by Antti Koivisto.
+
+        No new tests. (fix)
+
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::pushParentElement):
+
 2012-03-06  Pavel Podivilov  <[email protected]>
 
         Web Inspector: prepare for extracting ScriptMapping implementation from DebuggerPresentationModel.

Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (109905 => 109906)


--- trunk/Source/WebCore/css/CSSStyleSelector.cpp	2012-03-06 12:39:33 UTC (rev 109905)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp	2012-03-06 12:42:54 UTC (rev 109906)
@@ -551,7 +551,8 @@
 
 void CSSStyleSelector::pushParentElement(Element* parent)
 {
-    const ContainerNode* parentsParent = parent->parentOrHostNode();
+    const ContainerNode* parentsParent = parent->parentOrHostElement();
+
     // We are not always invoked consistently. For example, script execution can cause us to enter
     // style recalc in the middle of tree building. We may also be invoked from somewhere within the tree.
     // Reset the stack in this case, or if we see a new root element.
@@ -560,7 +561,9 @@
         m_checker.setupParentStack(parent);
     else
         m_checker.pushParent(parent);
-    pushScope(parent, parentsParent);
+
+    // Note: We mustn't skip ShadowRoot nodes for the scope stack.
+    pushScope(parent, parent->parentOrHostNode());
 }
 
 void CSSStyleSelector::popParentElement(Element* parent)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to