Skip to content
Permalink
Browse files
Web Inspector: Make TimelineOverview's graph container a subview
https://bugs.webkit.org/show_bug.cgi?id=152235

Reviewed by Brian Burg.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
Create graph container subview.
(WebInspector.TimelineOverview.prototype._instrumentAdded):
Add overview to the graph container view.
(WebInspector.TimelineOverview.prototype._instrumentRemoved):
Remove overview from the graph container view.
(WebInspector.TimelineOverview.prototype.layout):
No longer necessary to manually lay out overview graphs.
(WebInspector.TimelineOverview.prototype._needsLayout): Deleted.
Removed dead code.


Canonical link: https://commits.webkit.org/170351@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
LuckyKobold committed Dec 14, 2015
1 parent 5ea8fab commit de0e5a3c4a231de8c40f36ee2ec1696e07dacb96
Showing with 24 additions and 18 deletions.
  1. +19 −0 Source/WebInspectorUI/ChangeLog
  2. +5 −18 Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js
@@ -1,3 +1,22 @@
2015-12-13 Matt Baker <mattbaker@apple.com>

Web Inspector: Make TimelineOverview's graph container a subview
https://bugs.webkit.org/show_bug.cgi?id=152235

Reviewed by Brian Burg.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
Create graph container subview.
(WebInspector.TimelineOverview.prototype._instrumentAdded):
Add overview to the graph container view.
(WebInspector.TimelineOverview.prototype._instrumentRemoved):
Remove overview from the graph container view.
(WebInspector.TimelineOverview.prototype.layout):
No longer necessary to manually lay out overview graphs.
(WebInspector.TimelineOverview.prototype._needsLayout): Deleted.
Removed dead code.

2015-12-12 Matt Baker <mattbaker@apple.com>

Web Inspector: CodeMirrorTokenTrackingController handles symbols in class definitions incorrectly
@@ -43,9 +43,9 @@ WebInspector.TimelineOverview = class TimelineOverview extends WebInspector.View
this.element.addEventListener("gesturechange", this._handleGestureChange.bind(this));
this.element.addEventListener("gestureend", this._handleGestureEnd.bind(this));

this._graphsContainerElement = document.createElement("div");
this._graphsContainerElement.classList.add("graphs-container");
this.element.appendChild(this._graphsContainerElement);
this._graphsContainerView = new WebInspector.View;
this._graphsContainerView.element.classList.add("graphs-container");
this.addSubview(this._graphsContainerView);

this._timelineOverviewGraphsMap = new Map;

@@ -378,7 +378,6 @@ WebInspector.TimelineOverview = class TimelineOverview extends WebInspector.View
timelineOverviewGraph.startTime = scrollStartTime;
timelineOverviewGraph.currentTime = this._currentTime;
timelineOverviewGraph.endTime = scrollStartTime + visibleDuration;
timelineOverviewGraph.updateLayout();
}
}

@@ -391,17 +390,6 @@ WebInspector.TimelineOverview = class TimelineOverview extends WebInspector.View
element.style.width = newWidth + "px";
}

_needsLayout()
{
if (!this._visible)
return;

if (this._scheduledLayoutUpdateIdentifier)
return;

this._scheduledLayoutUpdateIdentifier = requestAnimationFrame(this.updateLayout.bind(this));
}

_handleScrollEvent(event)
{
if (this._ignoreNextScrollEvent) {
@@ -521,8 +509,7 @@ WebInspector.TimelineOverview = class TimelineOverview extends WebInspector.View
overviewGraph.addEventListener(WebInspector.TimelineOverviewGraph.Event.RecordSelected, this._recordSelected, this);
this._timelineOverviewGraphsMap.set(timeline, overviewGraph);

// FIXME: use View.prototype.addSubview(overviewGraph) once <https://webkit.org/b/150982> is fixed.
this._graphsContainerElement.appendChild(overviewGraph.element);
this._graphsContainerView.addSubview(overviewGraph);
}

_instrumentRemoved(event)
@@ -538,7 +525,7 @@ WebInspector.TimelineOverview = class TimelineOverview extends WebInspector.View

let overviewGraph = this._timelineOverviewGraphsMap.take(timeline);
overviewGraph.removeEventListener(WebInspector.TimelineOverviewGraph.Event.RecordSelected, this._recordSelected, this);
overviewGraph.element.remove();
this._graphsContainerView.removeSubview(overviewGraph);
}

_markerAdded(event)

0 comments on commit de0e5a3

Please sign in to comment.