Title: [106560] trunk
Revision
106560
Author
[email protected]
Date
2012-02-02 08:40:15 -0800 (Thu, 02 Feb 2012)

Log Message

Web Inspector: [REGRESSION] Slow continuous DOM traversal with Up/Down keys
https://bugs.webkit.org/show_bug.cgi?id=77643

Reviewed by Pavel Feldman.

Source/WebCore:

Test: inspector/styles/updates-during-dom-traversal.html

* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane.prototype._executeRebuildUpdate):

LayoutTests:

* inspector/styles/updates-during-dom-traversal-expected.txt: Added.
* inspector/styles/updates-during-dom-traversal.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (106559 => 106560)


--- trunk/LayoutTests/ChangeLog	2012-02-02 16:28:14 UTC (rev 106559)
+++ trunk/LayoutTests/ChangeLog	2012-02-02 16:40:15 UTC (rev 106560)
@@ -1,3 +1,13 @@
+2012-02-02  Alexander Pavlov  <[email protected]>
+
+        Web Inspector: [REGRESSION] Slow continuous DOM traversal with Up/Down keys
+        https://bugs.webkit.org/show_bug.cgi?id=77643
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/styles/updates-during-dom-traversal-expected.txt: Added.
+        * inspector/styles/updates-during-dom-traversal.html: Added.
+
 2012-02-02  Tony Gentilcore  <[email protected]>
 
         fast/speech/bubble-position.html fails on mac

Added: trunk/LayoutTests/inspector/styles/updates-during-dom-traversal-expected.txt (0 => 106560)


--- trunk/LayoutTests/inspector/styles/updates-during-dom-traversal-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/inspector/styles/updates-during-dom-traversal-expected.txt	2012-02-02 16:40:15 UTC (rev 106560)
@@ -0,0 +1,4 @@
+Tests that style updates are throttled during DOM traversal. Bug 77643.
+
+OK: updates throttled
+
Property changes on: trunk/LayoutTests/inspector/styles/updates-during-dom-traversal-expected.txt
___________________________________________________________________

Added: svn:eol-style

Added: trunk/LayoutTests/inspector/styles/updates-during-dom-traversal.html (0 => 106560)


--- trunk/LayoutTests/inspector/styles/updates-during-dom-traversal.html	                        (rev 0)
+++ trunk/LayoutTests/inspector/styles/updates-during-dom-traversal.html	2012-02-02 16:40:15 UTC (rev 106560)
@@ -0,0 +1,55 @@
+<html>
+<head>
+<script src=""
+<script src=""
+<script>
+
+function test()
+{
+    var updateCount = 0;
+    var keydownCount = 5;
+    WebInspector.showPanel("elements");
+
+    InspectorTest.selectNodeAndWaitForStyles("inspected", selectCallback);
+    function selectCallback()
+    {
+        InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_rebuildUpdate", sniffUpdate, true);
+        var element = WebInspector.panels.elements.treeOutline.element;
+        for (var i = 0; i < keydownCount; ++i)
+            element.dispatchEvent(InspectorTest.createKeyEvent("Up"));
+
+        InspectorTest.runAfterPendingDispatches(completeCallback);
+    }
+
+    function completeCallback()
+    {
+        if (updateCount >= keydownCount)
+            InspectorTest.addResult("ERROR: got " + updateCount + " updates for " + keydownCount + " consecutive keydowns");
+        else
+            InspectorTest.addResult("OK: updates throttled");
+        InspectorTest.completeTest();
+    }
+
+    function sniffUpdate()
+    {
+        ++updateCount;
+    }
+}
+
+</script>
+</head>
+
+<body _onload_="runTest()">
+<p>
+Tests that style updates are throttled during DOM traversal. <a href="" 77643</a>.
+</p>
+
+<div></div>
+<div></div>
+<div></div>
+<div></div>
+<div></div>
+<div id="inspected"></div>
+
+</body>
+</html>
Property changes on: trunk/LayoutTests/inspector/styles/updates-during-dom-traversal.html
___________________________________________________________________

Added: svn:eol-style

Modified: trunk/Source/WebCore/ChangeLog (106559 => 106560)


--- trunk/Source/WebCore/ChangeLog	2012-02-02 16:28:14 UTC (rev 106559)
+++ trunk/Source/WebCore/ChangeLog	2012-02-02 16:40:15 UTC (rev 106560)
@@ -1,3 +1,15 @@
+2012-02-02  Alexander Pavlov  <[email protected]>
+
+        Web Inspector: [REGRESSION] Slow continuous DOM traversal with Up/Down keys
+        https://bugs.webkit.org/show_bug.cgi?id=77643
+
+        Reviewed by Pavel Feldman.
+
+        Test: inspector/styles/updates-during-dom-traversal.html
+
+        * inspector/front-end/StylesSidebarPane.js:
+        (WebInspector.StylesSidebarPane.prototype._executeRebuildUpdate):
+
 2012-02-02  Claudio Saavedra  <[email protected]> and Martin Robinson  <[email protected]>
 
         [GTK] WebKitWebView won't work in a GtkOffscreenWindow

Modified: trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js (106559 => 106560)


--- trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js	2012-02-02 16:28:14 UTC (rev 106559)
+++ trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js	2012-02-02 16:40:15 UTC (rev 106560)
@@ -231,7 +231,7 @@
 
         function stylesCallback(matchedResult)
         {
-            if (matchedResult) {
+            if (matchedResult && this.node === node) {
                 resultStyles.matchedCSSRules = matchedResult.matchedCSSRules;
                 resultStyles.pseudoElements = matchedResult.pseudoElements;
                 resultStyles.inherited = matchedResult.inherited;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to