Title: [255014] branches/safari-609-branch/Source/WebInspectorUI
Revision
255014
Author
[email protected]
Date
2020-01-23 13:43:45 -0800 (Thu, 23 Jan 2020)

Log Message

Cherry-pick r254633. rdar://problem/58816370

    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.TreeElement`s, 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.

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

Modified Paths

Diff

Modified: branches/safari-609-branch/Source/WebInspectorUI/ChangeLog (255013 => 255014)


--- branches/safari-609-branch/Source/WebInspectorUI/ChangeLog	2020-01-23 21:43:43 UTC (rev 255013)
+++ branches/safari-609-branch/Source/WebInspectorUI/ChangeLog	2020-01-23 21:43:45 UTC (rev 255014)
@@ -1,5 +1,38 @@
 2020-01-23  Russell Epstein  <[email protected]>
 
+        Cherry-pick r254633. rdar://problem/58816370
+
+    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.TreeElement`s, 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.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-01-15  Devin Rousso  <[email protected]>
+
+            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.TreeElement`s, 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.
+
+2020-01-23  Russell Epstein  <[email protected]>
+
         Cherry-pick r254485. rdar://problem/58606245
 
     Web Inspector: "Enable Local Override" and "Delete Local Override" are displayed twice in the contextual menu

Modified: branches/safari-609-branch/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js (255013 => 255014)


--- branches/safari-609-branch/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js	2020-01-23 21:43:43 UTC (rev 255013)
+++ branches/safari-609-branch/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js	2020-01-23 21:43:45 UTC (rev 255014)
@@ -1042,11 +1042,14 @@
 
         // Redraw if we are about to scroll.
         if (!shouldScroll) {
-            // Redraw if all of the previously centered `WI.TreeElement` are no longer centered.
-            if (visibleTreeElements.intersects(this._virtualizedVisibleTreeElements)) {
-                // Redraw if there is a `WI.TreeElement` that should be shown that isn't attached.
-                if (visibleTreeElements.isSubsetOf(this._virtualizedAttachedTreeElements))
-                    return;
+            // Redraw if there are a different number of items to show.
+            if (visibleTreeElements.size === this._virtualizedVisibleTreeElements.size) {
+                // Redraw if all of the previously centered `WI.TreeElement` are no longer centered.
+                if (visibleTreeElements.intersects(this._virtualizedVisibleTreeElements)) {
+                    // Redraw if there is a `WI.TreeElement` that should be shown that isn't attached.
+                    if (visibleTreeElements.isSubsetOf(this._virtualizedAttachedTreeElements))
+                        return;
+                }
             }
         }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to