Changeset 254633 in webkit


Ignore:
Timestamp:
Jan 15, 2020 1:41:50 PM (4 years ago)
Author:
Devin Rousso
Message:

Web Inspector: collapsing a virtualized folder in a WI.TreeOutline doesn't updated the DOM
https://bugs.webkit.org/show_bug.cgi?id=206302

Reviewed by Timothy Hatcher.

  • UserInterface/Views/TreeOutline.js:

(WI.TreeOutline.prototype._updateVirtualizedElements):
When collapsing a currently visible WI.TreeElement, it will still be in the cached set of
visible and attached WI.TreeElements, meaning that _updateVirtualizedElements will early
return since it thinks that the same WI.TreeElement are being shown. Add another check to
ensure that it only thinks that if the same number of WI.TreeElement are visible.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r254485 r254633  
     12020-01-15  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: collapsing a virtualized folder in a `WI.TreeOutline` doesn't updated the DOM
     4        https://bugs.webkit.org/show_bug.cgi?id=206302
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * UserInterface/Views/TreeOutline.js:
     9        (WI.TreeOutline.prototype._updateVirtualizedElements):
     10        When collapsing a currently visible `WI.TreeElement`, it will still be in the cached set of
     11        visible and attached `WI.TreeElement`s, meaning that `_updateVirtualizedElements` will early
     12        return since it thinks that the same `WI.TreeElement` are being shown. Add another check to
     13        ensure that it only thinks that if the same number of `WI.TreeElement` are visible.
     14
    1152020-01-13  Devin Rousso  <drousso@apple.com>
    216
  • trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js

    r251302 r254633  
    10431043        // Redraw if we are about to scroll.
    10441044        if (!shouldScroll) {
    1045             // Redraw if all of the previously centered `WI.TreeElement` are no longer centered.
    1046             if (visibleTreeElements.intersects(this._virtualizedVisibleTreeElements)) {
    1047                 // Redraw if there is a `WI.TreeElement` that should be shown that isn't attached.
    1048                 if (visibleTreeElements.isSubsetOf(this._virtualizedAttachedTreeElements))
    1049                     return;
     1045            // Redraw if there are a different number of items to show.
     1046            if (visibleTreeElements.size === this._virtualizedVisibleTreeElements.size) {
     1047                // Redraw if all of the previously centered `WI.TreeElement` are no longer centered.
     1048                if (visibleTreeElements.intersects(this._virtualizedVisibleTreeElements)) {
     1049                    // Redraw if there is a `WI.TreeElement` that should be shown that isn't attached.
     1050                    if (visibleTreeElements.isSubsetOf(this._virtualizedAttachedTreeElements))
     1051                        return;
     1052                }
    10501053            }
    10511054        }
Note: See TracChangeset for help on using the changeset viewer.