Title: [200656] trunk/Source/WebInspectorUI
- Revision
- 200656
- Author
- [email protected]
- Date
- 2016-05-10 16:51:47 -0700 (Tue, 10 May 2016)
Log Message
Web Inspector: Can't select record bar in Frames timeline
https://bugs.webkit.org/show_bug.cgi?id=156963
<rdar://problem/25898256>
Reviewed by Timothy Hatcher.
Sync record selection between the Rendering Frames grid and overview graph.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode.prototype.hasAncestor):
Add helper function needed by TimelineView.
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
(WebInspector.RenderingFrameTimelineOverviewGraph.prototype._mouseClicked):
Don't deselect the selected record when clicked. Initially this seemed
like a good idea but it complicates the UI for no added value.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
Get path components from the current TimelineView instead of the
TimelineRecordingContentView, now that the selected record appears
in the bottom ContentBrowser's navigation bar.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (200655 => 200656)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-05-10 23:49:01 UTC (rev 200655)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-05-10 23:51:47 UTC (rev 200656)
@@ -1,3 +1,28 @@
+2016-05-10 Matt Baker <[email protected]>
+
+ Web Inspector: Can't select record bar in Frames timeline
+ https://bugs.webkit.org/show_bug.cgi?id=156963
+ <rdar://problem/25898256>
+
+ Reviewed by Timothy Hatcher.
+
+ Sync record selection between the Rendering Frames grid and overview graph.
+
+ * UserInterface/Views/DataGrid.js:
+ (WebInspector.DataGridNode.prototype.hasAncestor):
+ Add helper function needed by TimelineView.
+
+ * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
+ (WebInspector.RenderingFrameTimelineOverviewGraph.prototype._mouseClicked):
+ Don't deselect the selected record when clicked. Initially this seemed
+ like a good idea but it complicates the UI for no added value.
+
+ * UserInterface/Views/TimelineRecordingContentView.js:
+ (WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
+ Get path components from the current TimelineView instead of the
+ TimelineRecordingContentView, now that the selected record appears
+ in the bottom ContentBrowser's navigation bar.
+
2016-05-10 Joseph Pecoraro <[email protected]>
Web Inspector: Backend should initiate timeline recordings on page navigations to ensure nothing is missed
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js (200655 => 200656)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js 2016-05-10 23:49:01 UTC (rev 200655)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js 2016-05-10 23:51:47 UTC (rev 200656)
@@ -2028,6 +2028,22 @@
this.collapse();
}
+ hasAncestor(ancestor)
+ {
+ if (!ancestor)
+ return false;
+
+ let currentAncestor = this.parent;
+ while (currentAncestor) {
+ if (ancestor === currentAncestor)
+ return true;
+
+ currentAncestor = currentAncestor.parent;
+ }
+
+ return false;
+ }
+
refresh()
{
if (!this._element || !this.dataGrid)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineOverviewGraph.js (200655 => 200656)
--- trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineOverviewGraph.js 2016-05-10 23:49:01 UTC (rev 200655)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineOverviewGraph.js 2016-05-10 23:51:47 UTC (rev 200656)
@@ -259,9 +259,8 @@
if (newSelectedRecord[WebInspector.RenderingFrameTimelineOverviewGraph.RecordWasFilteredSymbol])
return;
- // Clicking the selected frame causes it to be deselected.
if (this.selectedRecord === newSelectedRecord)
- newSelectedRecord = null;
+ return;
if (frameIndex >= this.timelineOverview.selectionStartTime && frameIndex < this.timelineOverview.selectionStartTime + this.timelineOverview.selectionDuration) {
this.selectedRecord = newSelectedRecord;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js (200655 => 200656)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js 2016-05-10 23:49:01 UTC (rev 200655)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js 2016-05-10 23:51:47 UTC (rev 200656)
@@ -322,8 +322,12 @@
if (this.currentTimelineView === this._overviewTimelineView)
return;
- var recordPathComponent = this.selectionPathComponents.find(function(element) { return element.representedObject instanceof WebInspector.TimelineRecord; });
- var record = recordPathComponent ? recordPathComponent.representedObject : null;
+ let record = null;
+ if (this.currentTimelineView.selectionPathComponents) {
+ let recordPathComponent = this.currentTimelineView.selectionPathComponents.find((element) => element.representedObject instanceof WebInspector.TimelineRecord);
+ record = recordPathComponent ? recordPathComponent.representedObject : null;
+ }
+
this._timelineOverview.selectRecord(event.target.representedObject, record);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes