Web Inspector: NavigationSidebarPanel does a lot of style recalc and layout on busy...
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Apr 2016 17:28:40 +0000 (17:28 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Apr 2016 17:28:40 +0000 (17:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=156704
rdar://problem/25778744

Reviewed by Brian Burg.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype._treeElementDisclosureDidChange):
Use _updateContentOverflowShadowVisibilitySoon in more places so the style recalc
and layout changes are coalesced into one action after all rapid fire calls.

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

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js

index 5cc1ef3..eca2878 100644 (file)
@@ -1,5 +1,20 @@
 2016-04-18  Timothy Hatcher  <timothy@apple.com>
 
+        Web Inspector: NavigationSidebarPanel does a lot of style recalc and layout on busy sites
+
+        https://bugs.webkit.org/show_bug.cgi?id=156704
+        rdar://problem/25778744
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Views/NavigationSidebarPanel.js:
+        (WebInspector.NavigationSidebarPanel):
+        (WebInspector.NavigationSidebarPanel.prototype._treeElementDisclosureDidChange):
+        Use _updateContentOverflowShadowVisibilitySoon in more places so the style recalc
+        and layout changes are coalesced into one action after all rapid fire calls.
+
+2016-04-18  Timothy Hatcher  <timothy@apple.com>
+
         Web Inspector: Database query result DataGrids have misaligned header columns
 
         https://bugs.webkit.org/show_bug.cgi?id=156701
index f9d2c00..84c5347 100644 (file)
@@ -33,7 +33,7 @@ WebInspector.NavigationSidebarPanel = class NavigationSidebarPanel extends WebIn
 
         this._visibleContentTreeOutlines = new Set;
 
-        this.contentView.element.addEventListener("scroll", this._updateContentOverflowShadowVisibility.bind(this));
+        this.contentView.element.addEventListener("scroll", this._updateContentOverflowShadowVisibilitySoon.bind(this));
 
         this._contentTreeOutline = this.createContentTreeOutline(true);
         this._selectedContentTreeOutline = null;
@@ -53,7 +53,7 @@ WebInspector.NavigationSidebarPanel = class NavigationSidebarPanel extends WebIn
             this.element.appendChild(this._topOverflowShadowElement);
         }
 
-        this._boundUpdateContentOverflowShadowVisibility = this._updateContentOverflowShadowVisibility.bind(this);
+        this._boundUpdateContentOverflowShadowVisibility = this._updateContentOverflowShadowVisibilitySoon.bind(this);
         window.addEventListener("resize", this._boundUpdateContentOverflowShadowVisibility);
 
         this._filtersSetting = new WebInspector.Setting(identifier + "-navigation-sidebar-filters", {});
@@ -646,7 +646,7 @@ WebInspector.NavigationSidebarPanel = class NavigationSidebarPanel extends WebIn
 
     _treeElementDisclosureDidChange(event)
     {
-        this._updateContentOverflowShadowVisibility();
+        this._updateContentOverflowShadowVisibilitySoon();
     }
 
     _treeSelectionDidChange(event)