Title: [193771] trunk/Source/WebInspectorUI
Revision
193771
Author
[email protected]
Date
2015-12-08 12:42:42 -0800 (Tue, 08 Dec 2015)

Log Message

Web Inspector: Global Breakpoints should always be visible
https://bugs.webkit.org/show_bug.cgi?id=151066

Reviewed by Timothy Hatcher.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
Turn off filtering for Global Breakpoints elements.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.suppressFilteringOnTreeElements):
Allow filtering to be turned off for specific tree elements.
(WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement):
Make element visible if filtering suppressed.
(WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
Visible elements with filtering disabled aren't considered when
showing/hiding the empty content placeholder.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (193770 => 193771)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-12-08 20:37:23 UTC (rev 193770)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-12-08 20:42:42 UTC (rev 193771)
@@ -1,3 +1,23 @@
+2015-12-08  Matt Baker  <[email protected]>
+
+        Web Inspector: Global Breakpoints should always be visible
+        https://bugs.webkit.org/show_bug.cgi?id=151066
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/DebuggerSidebarPanel.js:
+        (WebInspector.DebuggerSidebarPanel):
+        Turn off filtering for Global Breakpoints elements.
+
+        * UserInterface/Views/NavigationSidebarPanel.js:
+        (WebInspector.NavigationSidebarPanel.prototype.suppressFilteringOnTreeElements):
+        Allow filtering to be turned off for specific tree elements.
+        (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement):
+        Make element visible if filtering suppressed.
+        (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
+        Visible elements with filtering disabled aren't considered when
+        showing/hiding the empty content placeholder.
+
 2015-12-07  Brian Burg  <[email protected]>
 
         Web Inspector: Uncaught Exception page should have better styles and handle more error cases

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js (193770 => 193771)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js	2015-12-08 20:37:23 UTC (rev 193770)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js	2015-12-08 20:42:42 UTC (rev 193771)
@@ -122,6 +122,8 @@
         this._globalBreakpointsFolderTreeElement.appendChild(this._allUncaughtExceptionsBreakpointTreeElement);
         this._globalBreakpointsFolderTreeElement.expand();
 
+        this.suppressFilteringOnTreeElements([this._globalBreakpointsFolderTreeElement, this._allExceptionsBreakpointTreeElement, this._allUncaughtExceptionsBreakpointTreeElement]);
+
         var breakpointsRow = new WebInspector.DetailsSectionRow;
         breakpointsRow.element.appendChild(this._breakpointsContentTreeOutline.element);
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js (193770 => 193771)


--- trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js	2015-12-08 20:37:23 UTC (rev 193770)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js	2015-12-08 20:42:42 UTC (rev 193771)
@@ -177,6 +177,16 @@
         return contentTreeOutline;
     }
 
+    suppressFilteringOnTreeElements(treeElements)
+    {
+        console.assert(Array.isArray(treeElements), "TreeElements should be an array.");
+
+        for (let treeElement of treeElements)
+            treeElement[WebInspector.NavigationSidebarPanel.SuppressFilteringSymbol] = true;
+
+        this._updateFilter();
+    }
+
     treeElementForRepresentedObject(representedObject)
     {
         return this._contentTreeOutline.getCachedTreeElement(representedObject);
@@ -385,7 +395,9 @@
             }
         }
 
-        if (matchTextFilter(filterableData.text) && this.matchTreeElementAgainstFilterFunctions(treeElement, flags) && this.matchTreeElementAgainstCustomFilters(treeElement, flags)) {
+        let suppressFiltering = treeElement[WebInspector.NavigationSidebarPanel.SuppressFilteringSymbol];
+
+        if (suppressFiltering || (matchTextFilter(filterableData.text) && this.matchTreeElementAgainstFilterFunctions(treeElement, flags) && this.matchTreeElementAgainstCustomFilters(treeElement, flags))) {
             // Make this element visible since it matches.
             makeVisible();
 
@@ -498,7 +510,7 @@
         // Iterate over all the top level tree elements. If any are visible, return early.
         var currentTreeElement = this._contentTreeOutline.children[0];
         while (currentTreeElement) {
-            if (!currentTreeElement.hidden) {
+            if (!currentTreeElement.hidden && !currentTreeElement[WebInspector.NavigationSidebarPanel.SuppressFilteringSymbol]) {
                 // Not hidden, so hide any empty content message.
                 this.hideEmptyContentPlaceholder();
                 this._emptyFilterResults = false;
@@ -717,6 +729,7 @@
     }
 };
 
+WebInspector.NavigationSidebarPanel.SuppressFilteringSymbol = Symbol("supresss-filtering");
 WebInspector.NavigationSidebarPanel.WasExpandedDuringFilteringSymbol = Symbol("was-expanded-during-filtering");
 
 WebInspector.NavigationSidebarPanel.OverflowShadowElementStyleClassName = "overflow-shadow";
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to