Title: [194029] trunk/Source/WebInspectorUI
- Revision
- 194029
- Author
- [email protected]
- Date
- 2015-12-13 23:24:01 -0800 (Sun, 13 Dec 2015)
Log Message
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.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (194028 => 194029)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-12-14 06:37:48 UTC (rev 194028)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-12-14 07:24:01 UTC (rev 194029)
@@ -1,3 +1,22 @@
+2015-12-13 Matt Baker <[email protected]>
+
+ 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 <[email protected]>
Web Inspector: CodeMirrorTokenTrackingController handles symbols in class definitions incorrectly
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js (194028 => 194029)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js 2015-12-14 06:37:48 UTC (rev 194028)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js 2015-12-14 07:24:01 UTC (rev 194029)
@@ -43,9 +43,9 @@
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 @@
timelineOverviewGraph.startTime = scrollStartTime;
timelineOverviewGraph.currentTime = this._currentTime;
timelineOverviewGraph.endTime = scrollStartTime + visibleDuration;
- timelineOverviewGraph.updateLayout();
}
}
@@ -391,17 +390,6 @@
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 @@
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 @@
let overviewGraph = this._timelineOverviewGraphsMap.take(timeline);
overviewGraph.removeEventListener(WebInspector.TimelineOverviewGraph.Event.RecordSelected, this._recordSelected, this);
- overviewGraph.element.remove();
+ this._graphsContainerView.removeSubview(overviewGraph);
}
_markerAdded(event)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes