Title: [200708] trunk/Source/WebInspectorUI
Revision
200708
Author
commit-qu...@webkit.org
Date
2016-05-11 14:53:26 -0700 (Wed, 11 May 2016)

Log Message

Web Inspector: Hide filter bar in TimelineViews where it is not needed or not yet working
https://bugs.webkit.org/show_bug.cgi?id=157583

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

* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView.prototype.get showsFilterBar):
(WebInspector.HeapAllocationsTimelineView.prototype.layout):
(WebInspector.HeapAllocationsTimelineView.prototype.updateFilter):
Filter bar not yet hooked up for HeapSnapshot views.
Make filtering work for the main timeline grid.
It doesn't use the normal TimelineView filter based on selected range.
This is intentional because it may be the case that a snapshot happens
outside the selected time range (via the navigation bar button) and
we want to show it. Otherwise a user might be confused why it is not
showing up in the list.

* UserInterface/Views/MemoryTimelineView.js:
(WebInspector.MemoryTimelineView.prototype.get showsFilterBar):
Filter bar not needed in the Memory timeline view.

* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView.prototype.get showsFilterBar):
Filter bar works for the Events timeline view.

* UserInterface/Views/ScriptProfileTimelineView.js:
(WebInspector.ScriptProfileTimelineView.prototype.get showsFilterBar):
Filter bar not yet hooked up for Profile views.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.TimelineRecordingContentView.prototype._updateFilterBar):
Update the filter bar when the selection path components change, since
that triggers when arbitrarily deep sub-content-views change.

* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.get showsFilterBar):
Default is yes.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (200707 => 200708)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-05-11 21:51:01 UTC (rev 200707)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-05-11 21:53:26 UTC (rev 200708)
@@ -1,3 +1,45 @@
+2016-05-11  Joseph Pecoraro  <pecor...@apple.com>
+
+        Web Inspector: Hide filter bar in TimelineViews where it is not needed or not yet working
+        https://bugs.webkit.org/show_bug.cgi?id=157583
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/HeapAllocationsTimelineView.js:
+        (WebInspector.HeapAllocationsTimelineView.prototype.get showsFilterBar):
+        (WebInspector.HeapAllocationsTimelineView.prototype.layout):
+        (WebInspector.HeapAllocationsTimelineView.prototype.updateFilter):
+        Filter bar not yet hooked up for HeapSnapshot views.
+        Make filtering work for the main timeline grid.
+        It doesn't use the normal TimelineView filter based on selected range.
+        This is intentional because it may be the case that a snapshot happens
+        outside the selected time range (via the navigation bar button) and
+        we want to show it. Otherwise a user might be confused why it is not
+        showing up in the list.
+
+        * UserInterface/Views/MemoryTimelineView.js:
+        (WebInspector.MemoryTimelineView.prototype.get showsFilterBar):
+        Filter bar not needed in the Memory timeline view.
+
+        * UserInterface/Views/ScriptClusterTimelineView.js:
+        (WebInspector.ScriptClusterTimelineView.prototype.get showsFilterBar):
+        Filter bar works for the Events timeline view.
+
+        * UserInterface/Views/ScriptProfileTimelineView.js:
+        (WebInspector.ScriptProfileTimelineView.prototype.get showsFilterBar):
+        Filter bar not yet hooked up for Profile views.
+
+        * UserInterface/Views/TimelineRecordingContentView.js:
+        (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
+        (WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
+        (WebInspector.TimelineRecordingContentView.prototype._updateFilterBar):
+        Update the filter bar when the selection path components change, since
+        that triggers when arbitrarily deep sub-content-views change.
+
+        * UserInterface/Views/TimelineView.js:
+        (WebInspector.TimelineView.prototype.get showsFilterBar):
+        Default is yes.
+
 2016-05-10  Joseph Pecoraro  <pecor...@apple.com>
 
         Web Inspector: Avoid unnecessary timeout identifier churn in TimelineManager

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js (200707 => 200708)


--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js	2016-05-11 21:51:01 UTC (rev 200707)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js	2016-05-11 21:53:26 UTC (rev 200708)
@@ -153,6 +153,9 @@
 
     // Protected
 
+    // FIXME: <https://webkit.org/b/157582> Web Inspector: Heap Snapshot Views should be searchable
+    get showsFilterBar() { return this._showingSnapshotList; }
+
     get navigationItems()
     {
         if (this._showingSnapshotList) {
@@ -226,6 +229,7 @@
     layout()
     {
         // Wait to show records until our zeroTime has been set.
+        // FIXME: Waiting until zero time causes snapshots taken without recording to not show up in the list.
         if (this._pendingRecords.length && this.zeroTime) {
             for (let heapAllocationsTimelineRecord of this._pendingRecords) {
                 let dataGridNode = new WebInspector.HeapAllocationsTimelineDataGridNode(heapAllocationsTimelineRecord, this.zeroTime, this);
@@ -248,6 +252,11 @@
         this._updateCompareHeapSnapshotButton();
     }
 
+    updateFilter(filters)
+    {
+        this._dataGrid.filterText = filters ? filters.text : "";
+    }
+
     // Private
 
     _heapAllocationsTimelineRecordAdded(event)

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js (200707 => 200708)


--- trunk/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js	2016-05-11 21:51:01 UTC (rev 200707)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js	2016-05-11 21:53:26 UTC (rev 200708)
@@ -153,6 +153,8 @@
 
     // Protected
 
+    get showsFilterBar() { return false; }
+
     layout()
     {
         // Always update timeline ruler.

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js (200707 => 200708)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js	2016-05-11 21:51:01 UTC (rev 200707)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js	2016-05-11 21:53:26 UTC (rev 200708)
@@ -62,6 +62,7 @@
 
     // FIXME: Determine a better way to bridge TimelineView methods to the sub-timeline views.
     get showsLiveRecordingData() { return this._contentViewContainer.currentContentView.showsLiveRecordingData; }
+    get showsFilterBar() { return this._contentViewContainer.currentContentView.showsFilterBar; }
     get zeroTime() { return this._contentViewContainer.currentContentView.zeroTime; }
     set zeroTime(x) { this._contentViewContainer.currentContentView.zeroTime = x; }
     get startTime() { return this._contentViewContainer.currentContentView.startTime; }

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScriptProfileTimelineView.js (200707 => 200708)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ScriptProfileTimelineView.js	2016-05-11 21:51:01 UTC (rev 200707)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScriptProfileTimelineView.js	2016-05-11 21:53:26 UTC (rev 200708)
@@ -69,6 +69,9 @@
 
     get showsLiveRecordingData() { return false; }
 
+    // FIXME: <https://webkit.org/b/157581> Web Inspector: Script ProfileViews should be searchable
+    get showsFilterBar() { return false; }
+
     // Protected
 
     closed()

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js (200707 => 200708)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js	2016-05-11 21:51:01 UTC (rev 200707)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js	2016-05-11 21:53:26 UTC (rev 200708)
@@ -275,6 +275,7 @@
         this._timelineOverview.viewMode = newViewMode;
         this._updateTimelineOverviewHeight();
         this._updateProgressView();
+        this._updateFilterBar();
 
         if (timelineView) {
             this._updateTimelineViewTimes(timelineView);
@@ -317,6 +318,8 @@
         if (event.target !== this._timelineContentBrowser.currentContentView)
             return;
 
+        this._updateFilterBar();
+
         this.dispatchEventToListeners(WebInspector.ContentView.Event.SelectionPathComponentsDidChange);
 
         if (this.currentTimelineView === this._overviewTimelineView)
@@ -739,4 +742,9 @@
         let isCapturing = WebInspector.timelineManager.isCapturing();
         this._progressView.visible = isCapturing && this.currentTimelineView && !this.currentTimelineView.showsLiveRecordingData;
     }
+
+    _updateFilterBar()
+    {
+        this._filterBarNavigationItem.hidden = !this.currentTimelineView || !this.currentTimelineView.showsFilterBar;
+    }
 };

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js (200707 => 200708)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js	2016-05-11 21:51:01 UTC (rev 200707)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js	2016-05-11 21:53:26 UTC (rev 200708)
@@ -49,6 +49,12 @@
         return true;
     }
 
+    get showsFilterBar()
+    {
+        // Implemented by sub-classes if needed.
+        return true;
+    }
+
     get navigationItems()
     {
         return this._scopeBar ? [this._scopeBar] : [];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to