Commit 0a4afe21 authored by timothy@apple.com's avatar timothy@apple.com

Don't include a hidden Timeline selection in the navigation path components.

https://bugs.webkit.org/show_bug.cgi?id=127443

Reviewed by Joseph Pecoraro.

* UserInterface/GeneralTreeElementPathComponent.js:
(WebInspector.GeneralTreeElementPathComponent.prototype.get previousSibling):
(WebInspector.GeneralTreeElementPathComponent.prototype.get nextSibling):
Skip hidden siblings.

* UserInterface/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype.updateLayout):
(WebInspector.OverviewTimelineView.prototype.get selectionPathComponents):
Don't include hidden selection and dispatch SelectionPathComponentsDidChange event if hidden changes.

* UserInterface/TimelineContentView.js:
(WebInspector.TimelineContentView.prototype._timeRangeSelectionChanged):
Dispatch SelectionPathComponentsDidChange event if hidden changes on the selected tree element.

* UserInterface/TimelineView.js:
(WebInspector.TimelineView.prototype.get selectionPathComponents):
Don't include hidden selection.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a8da91f0
2014-01-22 Timothy Hatcher <timothy@apple.com>
Don't include a hidden Timeline selection in the navigation path components.
https://bugs.webkit.org/show_bug.cgi?id=127443
Reviewed by Joseph Pecoraro.
* UserInterface/GeneralTreeElementPathComponent.js:
(WebInspector.GeneralTreeElementPathComponent.prototype.get previousSibling):
(WebInspector.GeneralTreeElementPathComponent.prototype.get nextSibling):
Skip hidden siblings.
* UserInterface/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype.updateLayout):
(WebInspector.OverviewTimelineView.prototype.get selectionPathComponents):
Don't include hidden selection and dispatch SelectionPathComponentsDidChange event if hidden changes.
* UserInterface/TimelineContentView.js:
(WebInspector.TimelineContentView.prototype._timeRangeSelectionChanged):
Dispatch SelectionPathComponentsDidChange event if hidden changes on the selected tree element.
* UserInterface/TimelineView.js:
(WebInspector.TimelineView.prototype.get selectionPathComponents):
Don't include hidden selection.
2014-01-22 Timothy Hatcher <timothy@apple.com>
Support collapsing call site records into the resource timeline.
......
......@@ -42,16 +42,26 @@ WebInspector.GeneralTreeElementPathComponent.prototype = {
get previousSibling()
{
if (!this._generalTreeElement.previousSibling)
var previousSibling = this._generalTreeElement.previousSibling;
while (previousSibling && previousSibling.hidden)
previousSibling = previousSibling.previousSibling;
if (!previousSibling)
return null;
return new WebInspector.GeneralTreeElementPathComponent(this._generalTreeElement.previousSibling);
return new WebInspector.GeneralTreeElementPathComponent(previousSibling);
},
get nextSibling()
{
if (!this._generalTreeElement.nextSibling)
var nextSibling = this._generalTreeElement.nextSibling;
while (nextSibling && nextSibling.hidden)
nextSibling = nextSibling.nextSibling;
if (!nextSibling)
return null;
return new WebInspector.GeneralTreeElementPathComponent(this._generalTreeElement.nextSibling);
return new WebInspector.GeneralTreeElementPathComponent(nextSibling);
},
// Private
......
......@@ -101,8 +101,14 @@ WebInspector.OverviewTimelineView.prototype = {
}
if (!this.currentTime !== oldCurrentTime) {
var selectedTreeElement = this.navigationSidebarTreeOutline.selectedTreeElement;
var selectionWasHidden = selectedTreeElement && selectedTreeElement.hidden;
// Check the filters again since the current time change might have revealed this node. Start and end time changes are handled by TimelineContentView.
WebInspector.timelineSidebarPanel.updateFilter();
if (selectedTreeElement && selectedTreeElement.hidden !== selectionWasHidden)
this.dispatchEventToListeners(WebInspector.TimelineView.Event.SelectionPathComponentsDidChange);
}
this._timelineRuler.updateLayout();
......@@ -124,6 +130,9 @@ WebInspector.OverviewTimelineView.prototype = {
if (!treeElement)
break;
if (treeElement.hidden)
return null;
var pathComponent = new WebInspector.GeneralTreeElementPathComponent(treeElement);
pathComponent.addEventListener(WebInspector.HierarchicalPathComponent.Event.SiblingWasSelected, this.treeElementPathComponentSelected, this);
pathComponents.unshift(pathComponent);
......
......@@ -404,6 +404,14 @@ WebInspector.TimelineContentView.prototype = {
this._currentTimelineView.endTime = this._timelineOverview.selectionStartTime + this._timelineOverview.selectionDuration;
// Delay until the next frame to stay in sync with the current timeline view's time-based layout changes.
requestAnimationFrame(function() { WebInspector.timelineSidebarPanel.updateFilter(); });
requestAnimationFrame(function() {
var selectedTreeElement = this._currentTimelineView && this._currentTimelineView.navigationSidebarTreeOutline ? this._currentTimelineView.navigationSidebarTreeOutline.selectedTreeElement : null;
var selectionWasHidden = selectedTreeElement && selectedTreeElement.hidden;
WebInspector.timelineSidebarPanel.updateFilter();
if (selectedTreeElement && selectedTreeElement.hidden !== selectionWasHidden)
this.dispatchEventToListeners(WebInspector.ContentView.Event.SelectionPathComponentsDidChange);
}.bind(this));
}
};
......@@ -63,7 +63,7 @@ WebInspector.TimelineView.prototype = {
get selectionPathComponents()
{
if (!this._contentTreeOutline.selectedTreeElement)
if (!this._contentTreeOutline.selectedTreeElement || this._contentTreeOutline.selectedTreeElement.hidden)
return null;
var pathComponent = new WebInspector.GeneralTreeElementPathComponent(this._contentTreeOutline.selectedTreeElement);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment