Title: [181388] trunk/Source/WebInspectorUI
Revision
181388
Author
commit-qu...@webkit.org
Date
2015-03-11 07:52:04 -0700 (Wed, 11 Mar 2015)

Log Message

Web Inspector: Reload after Global Search results in empty Resources Sidebar.
https://bugs.webkit.org/show_bug.cgi?id=142572

Patch by Joseph Pecoraro <pecor...@apple.com> on 2015-03-11
Reviewed by Timothy Hatcher.

If you reload when the search content tree outline is showing, break out
to show the resource tree outline.

* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._showResourcesContentTreeOutline):
(WebInspector.ResourceSidebarPanel.prototype._showSearchContentTreeOutline):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (181387 => 181388)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-03-11 14:41:01 UTC (rev 181387)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-03-11 14:52:04 UTC (rev 181388)
@@ -1,5 +1,19 @@
 2015-03-11  Joseph Pecoraro  <pecor...@apple.com>
 
+        Web Inspector: Reload after Global Search results in empty Resources Sidebar.
+        https://bugs.webkit.org/show_bug.cgi?id=142572
+
+        Reviewed by Timothy Hatcher.
+
+        If you reload when the search content tree outline is showing, break out
+        to show the resource tree outline.
+
+        * UserInterface/Views/ResourceSidebarPanel.js:
+        (WebInspector.ResourceSidebarPanel.prototype._showResourcesContentTreeOutline):
+        (WebInspector.ResourceSidebarPanel.prototype._showSearchContentTreeOutline):
+
+2015-03-11  Joseph Pecoraro  <pecor...@apple.com>
+
         Web Inspector: SearchResultTreeElement.representedObject is missing a saveIdentityToCookie implementation
         https://bugs.webkit.org/show_bug.cgi?id=134698
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js (181387 => 181388)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js	2015-03-11 14:41:01 UTC (rev 181387)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js	2015-03-11 14:52:04 UTC (rev 181388)
@@ -320,13 +320,11 @@
 
         searchTerm = searchTerm.trim();
         if (!searchTerm.length) {
-            this.filterBar.placeholder = WebInspector.UIString("Filter Resource List");
-            this.contentTreeOutline = this._resourcesContentTreeOutline;
+            this._showResourcesContentTreeOutline();
             return;
         }
 
-        this.filterBar.placeholder = WebInspector.UIString("Filter Search Results");
-        this.contentTreeOutline = this._searchContentTreeOutline;
+        this._showSearchContentTreeOutline();
 
         // FIXME: Provide UI to toggle regex and case sensitive searches.
         var isCaseSensitive = false;
@@ -521,6 +519,18 @@
 
     // Private
 
+    _showResourcesContentTreeOutline: function()
+    {
+        this.filterBar.placeholder = WebInspector.UIString("Filter Resource List");
+        this.contentTreeOutline = this._resourcesContentTreeOutline;
+    },
+
+    _showSearchContentTreeOutline: function()
+    {
+        this.filterBar.placeholder = WebInspector.UIString("Filter Search Results");
+        this.contentTreeOutline = this._searchContentTreeOutline;
+    },
+
     _searchFieldChanged: function(event)
     {
         this.performSearch(event.target.value);
@@ -622,6 +632,9 @@
         WebInspector.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.FrameContentView);
         WebInspector.contentBrowser.contentViewContainer.closeAllContentViewsOfPrototype(WebInspector.ScriptContentView);
 
+        // Break out of search tree outline if there was an active search.
+        this._showResourcesContentTreeOutline();
+
         function delayedWork()
         {
             // Show the main frame since there is no content view showing or we were showing a resource before.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to