Title: [171783] trunk/Source/WebInspectorUI
- Revision
- 171783
- Author
- commit-qu...@webkit.org
- Date
- 2014-07-29 17:30:52 -0700 (Tue, 29 Jul 2014)
Log Message
Web Inspector: Eliminate more forced layouts during timeline recordings
https://bugs.webkit.org/show_bug.cgi?id=135397
Patch by Joseph Pecoraro <pecor...@apple.com> on 2014-07-29
Reviewed by Timothy Hatcher.
Instead of computing the secondsPerPixel in each overview graph,
we can ask the overview view itself which has a cached value.
The computation used to force a layout, now it doesn't need to.
* UserInterface/Views/LayoutTimelineOverviewGraph.js:
* UserInterface/Views/NetworkTimelineOverviewGraph.js:
* UserInterface/Views/ScriptTimelineOverviewGraph.js:
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph):
(WebInspector.TimelineOverviewGraph.prototype.get timelineOverview):
(WebInspector.TimelineOverviewGraph.prototype.set timelineOverview):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (171782 => 171783)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-07-30 00:17:45 UTC (rev 171782)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-07-30 00:30:52 UTC (rev 171783)
@@ -1,3 +1,24 @@
+2014-07-29 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: Eliminate more forced layouts during timeline recordings
+ https://bugs.webkit.org/show_bug.cgi?id=135397
+
+ Reviewed by Timothy Hatcher.
+
+ Instead of computing the secondsPerPixel in each overview graph,
+ we can ask the overview view itself which has a cached value.
+ The computation used to force a layout, now it doesn't need to.
+
+ * UserInterface/Views/LayoutTimelineOverviewGraph.js:
+ * UserInterface/Views/NetworkTimelineOverviewGraph.js:
+ * UserInterface/Views/ScriptTimelineOverviewGraph.js:
+ * UserInterface/Views/TimelineOverview.js:
+ (WebInspector.TimelineOverview):
+ * UserInterface/Views/TimelineOverviewGraph.js:
+ (WebInspector.TimelineOverviewGraph):
+ (WebInspector.TimelineOverviewGraph.prototype.get timelineOverview):
+ (WebInspector.TimelineOverviewGraph.prototype.set timelineOverview):
+
2014-07-28 Joseph Pecoraro <pecor...@apple.com>
Web Inspector: Incorrectly sized TimelineDataGrid event bubble
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineOverviewGraph.js (171782 => 171783)
--- trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineOverviewGraph.js 2014-07-30 00:17:45 UTC (rev 171782)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineOverviewGraph.js 2014-07-30 00:30:52 UTC (rev 171783)
@@ -58,8 +58,7 @@
{
WebInspector.TimelineOverviewGraph.prototype.updateLayout.call(this);
- var visibleWidth = this.element.offsetWidth;
- var secondsPerPixel = (this.endTime - this.startTime) / visibleWidth;
+ var secondsPerPixel = this.timelineOverview.secondsPerPixel;
var recordBarIndex = 0;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js (171782 => 171783)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js 2014-07-30 00:17:45 UTC (rev 171782)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js 2014-07-30 00:30:52 UTC (rev 171783)
@@ -75,8 +75,7 @@
{
WebInspector.TimelineOverviewGraph.prototype.updateLayout.call(this);
- var visibleWidth = this.element.offsetWidth;
- var secondsPerPixel = (this.endTime - this.startTime) / visibleWidth;
+ var secondsPerPixel = this.timelineOverview.secondsPerPixel;
var recordBarIndex = 0;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineOverviewGraph.js (171782 => 171783)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineOverviewGraph.js 2014-07-30 00:17:45 UTC (rev 171782)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineOverviewGraph.js 2014-07-30 00:30:52 UTC (rev 171783)
@@ -58,8 +58,7 @@
{
WebInspector.TimelineOverviewGraph.prototype.updateLayout.call(this);
- var visibleWidth = this.element.offsetWidth;
- var secondsPerPixel = (this.endTime - this.startTime) / visibleWidth;
+ var secondsPerPixel = this.timelineOverview.secondsPerPixel;
var recordBarIndex = 0;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js (171782 => 171783)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js 2014-07-30 00:17:45 UTC (rev 171782)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js 2014-07-30 00:30:52 UTC (rev 171783)
@@ -37,8 +37,10 @@
this._timelineOverviewGraphsMap = timelineOverviewGraphsMap;
- for (var timelineOverviewGraph of this._timelineOverviewGraphsMap.values())
+ for (var timelineOverviewGraph of this._timelineOverviewGraphsMap.values()) {
+ timelineOverviewGraph.timelineOverview = this;
this._graphsContainer.appendChild(timelineOverviewGraph.element);
+ }
this._timelineRuler = new WebInspector.TimelineRuler;
this._timelineRuler.allowsClippedLabels = true;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js (171782 => 171783)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js 2014-07-30 00:17:45 UTC (rev 171782)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js 2014-07-30 00:30:52 UTC (rev 171783)
@@ -34,6 +34,7 @@
this._startTime = 0;
this._endTime = 5;
this._currentTime = 0;
+ this._timelineOverview = null;
};
WebInspector.TimelineOverviewGraph.StyleClassName = "timeline-overview-graph";
@@ -107,6 +108,16 @@
this.needsLayout();
},
+ get timelineOverview()
+ {
+ return this._timelineOverview;
+ },
+
+ set timelineOverview(x)
+ {
+ this._timelineOverview = x;
+ },
+
reset: function()
{
// Implemented by sub-classes if needed.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes