Title: [240947] trunk/Source/WebInspectorUI
Revision
240947
Author
mattba...@apple.com
Date
2019-02-04 15:32:46 -0800 (Mon, 04 Feb 2019)

Log Message

Web Inspector: REGRESSION: clicking a selected call frame doesn't re-scroll
https://bugs.webkit.org/show_bug.cgi?id=194169
<rdar://problem/47743864>

Reviewed by Devin Rousso.

* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype._handleMouseDown):
Add a special case for a single-selection TreeOutline with
allowsRepeatSelection enabled. Since the element is already
selected, bypass the SelectionCongroller and dispatch an
event with event.data.selectedByUser set to true.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (240946 => 240947)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-02-04 23:30:49 UTC (rev 240946)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-02-04 23:32:46 UTC (rev 240947)
@@ -1,3 +1,18 @@
+2019-02-04  Matt Baker  <mattba...@apple.com>
+
+        Web Inspector: REGRESSION: clicking a selected call frame doesn't re-scroll
+        https://bugs.webkit.org/show_bug.cgi?id=194169
+        <rdar://problem/47743864>
+
+        Reviewed by Devin Rousso.
+
+        * UserInterface/Views/TreeOutline.js:
+        (WI.TreeOutline.prototype._handleMouseDown):
+        Add a special case for a single-selection TreeOutline with
+        allowsRepeatSelection enabled. Since the element is already
+        selected, bypass the SelectionCongroller and dispatch an
+        event with event.data.selectedByUser set to true.
+
 2019-02-04  Nikita Vasilyev  <nvasil...@apple.com>
 
         Web Inspector: Styles: fix race conditions when editing

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js (240946 => 240947)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js	2019-02-04 23:30:49 UTC (rev 240946)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js	2019-02-04 23:32:46 UTC (rev 240947)
@@ -1015,6 +1015,14 @@
         if (!treeElement.canSelectOnMouseDown(event))
             return;
 
+        if (this.allowsRepeatSelection && treeElement.selected && this._selectionController.selectedItems.size === 1) {
+            // Special case for dispatching a selection event for an already selected
+            // item in single-selection mode.
+            this._itemWasSelectedByUser = true;
+            this._dispatchSelectionDidChangeEvent();
+            return;
+        }
+
         let index = this._indexOfTreeElement(treeElement);
         if (isNaN(index))
             return;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to