Title: [211010] trunk/Source/WebInspectorUI
Revision
211010
Author
[email protected]
Date
2017-01-20 20:51:39 -0800 (Fri, 20 Jan 2017)

Log Message

Web Inspector: Search Tab should display search results immediately when closing and reopening Inspector
https://bugs.webkit.org/show_bug.cgi?id=167073

Patch by Devin Rousso <[email protected]> on 2017-01-20
Reviewed by Timothy Hatcher.

* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.focusSearchField):
Add parameter that will trigger a search with the current input value when true.

* UserInterface/Views/SearchTabContentView.js:
(WebInspector.SearchTabContentView):
(WebInspector.SearchTabContentView.prototype.focusSearchField):
(WebInspector.SearchTabContentView.prototype.initialLayout):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (211009 => 211010)


--- trunk/Source/WebInspectorUI/ChangeLog	2017-01-21 02:36:03 UTC (rev 211009)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-01-21 04:51:39 UTC (rev 211010)
@@ -1,3 +1,19 @@
+2017-01-20  Devin Rousso  <[email protected]>
+
+        Web Inspector: Search Tab should display search results immediately when closing and reopening Inspector
+        https://bugs.webkit.org/show_bug.cgi?id=167073
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/SearchSidebarPanel.js:
+        (WebInspector.SearchSidebarPanel.prototype.focusSearchField):
+        Add parameter that will trigger a search with the current input value when true.
+
+        * UserInterface/Views/SearchTabContentView.js:
+        (WebInspector.SearchTabContentView):
+        (WebInspector.SearchTabContentView.prototype.focusSearchField):
+        (WebInspector.SearchTabContentView.prototype.initialLayout):
+
 2017-01-19  Devin Rousso  <[email protected]>
 
         Web Inspector: Network Tab's "Clear Network Items" button should have keyboard shortcuts

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js (211009 => 211010)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js	2017-01-21 02:36:03 UTC (rev 211009)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js	2017-01-21 04:51:39 UTC (rev 211010)
@@ -64,11 +64,14 @@
         WebInspector.Frame.removeEventListener(null, null, this);
     }
 
-    focusSearchField()
+    focusSearchField(performSearch)
     {
         this.show();
 
         this._inputElement.select();
+
+        if (performSearch)
+            this.performSearch(this._inputElement.value);
     }
 
     performSearch(searchQuery)

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js (211009 => 211010)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js	2017-01-21 02:36:03 UTC (rev 211009)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js	2017-01-21 04:51:39 UTC (rev 211010)
@@ -36,6 +36,8 @@
             detailsSidebarPanels.push(WebInspector.layerTreeDetailsSidebarPanel);
 
         super(identifier || "search", "search", tabBarItem, WebInspector.SearchSidebarPanel, detailsSidebarPanels);
+
+        this._forcePerformSearch = false;
     }
 
     static tabInfo()
@@ -73,7 +75,9 @@
 
     focusSearchField()
     {
-        this.navigationSidebarPanel.focusSearchField();
+        this.navigationSidebarPanel.focusSearchField(this._forcePerformSearch);
+
+        this._forcePerformSearch = false;
     }
 
     performSearch(searchQuery)
@@ -80,6 +84,15 @@
     {
         this.navigationSidebarPanel.performSearch(searchQuery);
     }
+
+    // Protected
+
+    initialLayout()
+    {
+        super.initialLayout();
+
+        this._forcePerformSearch = true;
+    }
 };
 
 WebInspector.SearchTabContentView.Type = "search";
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to