Skip to content
Permalink
Browse files
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.


Canonical link: https://commits.webkit.org/175683@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
LuckyKobold committed May 10, 2016
1 parent 10bfd50 commit f51d5d73b4de2d43d378026c76e9094cca818204
Showing 4 changed files with 48 additions and 4 deletions.
@@ -1,3 +1,28 @@
2016-05-10 Matt Baker <mattbaker@apple.com>

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 <pecoraro@apple.com>

Web Inspector: Backend should initiate timeline recordings on page navigations to ensure nothing is missed
@@ -2028,6 +2028,22 @@ WebInspector.DataGridNode = class DataGridNode extends WebInspector.Object
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)
@@ -259,9 +259,8 @@ WebInspector.RenderingFrameTimelineOverviewGraph = class RenderingFrameTimelineO
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;
@@ -322,8 +322,12 @@ WebInspector.TimelineRecordingContentView = class TimelineRecordingContentView e
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);
}

0 comments on commit f51d5d7

Please sign in to comment.