Web Inspector: Debugger: virtualize the list of variables in the Scope sidebar
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2019 21:49:13 +0000 (21:49 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2019 21:49:13 +0000 (21:49 +0000)
commitd9e3a82b1d50a224a25ae88f2add4b37dedf728c
treea1bfeeefb9ccfa0b1fd86d5238bb86992656c65a
parentc46ab662009413e329f6ff84f4910a02412de83a
Web Inspector: Debugger: virtualize the list of variables in the Scope sidebar
https://bugs.webkit.org/show_bug.cgi?id=192648
<rdar://problem/46800949>

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WI.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):

* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype.set hidden):
(WI.TreeElement.prototype._attach):
(WI.TreeElement.prototype._detach):
(WI.TreeElement.prototype.collapse):
(WI.TreeElement.prototype.expand):
Move `updateVirtualizedElements` calls to the owner `WI.TreeOutline` to ensure that they get
called. Make the remaining calls use rAF debouncing to better coalesce updates.

* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype._rememberTreeElement):
(WI.TreeOutline.prototype._forgetTreeElement):
(WI.TreeOutline.prototype.registerScrollVirtualizer):
(WI.TreeOutline.prototype._updateVirtualizedElements.calculateOffsetFromContainer): Added.
(WI.TreeOutline.prototype._updateVirtualizedElements):
(WI.TreeOutline.prototype._calculateVirtualizedValues): Deleted.
Calculate the `WI.TreeOutline`'s top offset within the scroll container so that it will only
update when it's within the visual area.

* UserInterface/Views/Utilities.js:
(Array.prototype.remove):
Return whether the item was actually removed from the array.

LayoutTests:

* inspector/unit-tests/array-utilities.html:
* inspector/unit-tests/array-utilities-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/unit-tests/array-utilities-expected.txt
LayoutTests/inspector/unit-tests/array-utilities.html
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Utilities.js
Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/TreeElement.js
Source/WebInspectorUI/UserInterface/Views/TreeOutline.js