Title: [171720] trunk/Source/WebInspectorUI
- Revision
- 171720
- Author
- [email protected]
- Date
- 2014-07-28 21:14:39 -0700 (Mon, 28 Jul 2014)
Log Message
Web Inspector: Reduce work creating the initial WebInspector.TimelineRecordBar
https://bugs.webkit.org/show_bug.cgi?id=135373
Patch by Joseph Pecoraro <[email protected]> on 2014-07-28
Reviewed by Timothy Hatcher.
Eliminate a bit of extra work creating TimelineRecordBars. Previously
the constructor would setup an empty list of records, and then we would
immediately after replace them. Now just set them in the constructor.
* UserInterface/Views/LayoutTimelineOverviewGraph.js:
(WebInspector.LayoutTimelineOverviewGraph.prototype.updateLayout.createBar):
(WebInspector.LayoutTimelineOverviewGraph.prototype.updateLayout):
* UserInterface/Views/NetworkTimelineOverviewGraph.js:
(WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout.createBar):
(WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout):
* UserInterface/Views/ScriptTimelineOverviewGraph.js:
(WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout.createBar):
(WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout):
* UserInterface/Views/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.refreshGraph.createBar):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (171719 => 171720)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-07-29 02:11:46 UTC (rev 171719)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-07-29 04:14:39 UTC (rev 171720)
@@ -1,3 +1,26 @@
+2014-07-28 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Reduce work creating the initial WebInspector.TimelineRecordBar
+ https://bugs.webkit.org/show_bug.cgi?id=135373
+
+ Reviewed by Timothy Hatcher.
+
+ Eliminate a bit of extra work creating TimelineRecordBars. Previously
+ the constructor would setup an empty list of records, and then we would
+ immediately after replace them. Now just set them in the constructor.
+
+ * UserInterface/Views/LayoutTimelineOverviewGraph.js:
+ (WebInspector.LayoutTimelineOverviewGraph.prototype.updateLayout.createBar):
+ (WebInspector.LayoutTimelineOverviewGraph.prototype.updateLayout):
+ * UserInterface/Views/NetworkTimelineOverviewGraph.js:
+ (WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout.createBar):
+ (WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout):
+ * UserInterface/Views/ScriptTimelineOverviewGraph.js:
+ (WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout.createBar):
+ (WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout):
+ * UserInterface/Views/TimelineDataGridNode.js:
+ (WebInspector.TimelineDataGridNode.prototype.refreshGraph.createBar):
+
2014-07-28 Timothy Hatcher <[email protected]>
Web Inspector: Unexpected dark border on selected but window inactive timeline
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineOverviewGraph.js (171719 => 171720)
--- trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineOverviewGraph.js 2014-07-29 02:11:46 UTC (rev 171719)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineOverviewGraph.js 2014-07-29 04:14:39 UTC (rev 171720)
@@ -67,9 +67,11 @@
{
var timelineRecordBar = this._timelineRecordBars[recordBarIndex];
if (!timelineRecordBar)
- timelineRecordBar = this._timelineRecordBars[recordBarIndex] = new WebInspector.TimelineRecordBar;
- timelineRecordBar.renderMode = renderMode;
- timelineRecordBar.records = records;
+ timelineRecordBar = this._timelineRecordBars[recordBarIndex] = new WebInspector.TimelineRecordBar(records, renderMode);
+ else {
+ timelineRecordBar.renderMode = renderMode;
+ timelineRecordBar.records = records;
+ }
timelineRecordBar.refresh(this);
if (!timelineRecordBar.element.parentNode)
this.element.appendChild(timelineRecordBar.element);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js (171719 => 171720)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js 2014-07-29 02:11:46 UTC (rev 171719)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js 2014-07-29 04:14:39 UTC (rev 171720)
@@ -84,9 +84,11 @@
{
var timelineRecordBar = rowRecordBars[recordBarIndex];
if (!timelineRecordBar)
- timelineRecordBar = rowRecordBars[recordBarIndex] = new WebInspector.TimelineRecordBar;
- timelineRecordBar.renderMode = renderMode;
- timelineRecordBar.records = records;
+ timelineRecordBar = rowRecordBars[recordBarIndex] = new WebInspector.TimelineRecordBar(records, renderMode);
+ else {
+ timelineRecordBar.renderMode = renderMode;
+ timelineRecordBar.records = records;
+ }
timelineRecordBar.refresh(this);
if (!timelineRecordBar.element.parentNode)
rowElement.appendChild(timelineRecordBar.element);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineOverviewGraph.js (171719 => 171720)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineOverviewGraph.js 2014-07-29 02:11:46 UTC (rev 171719)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineOverviewGraph.js 2014-07-29 04:14:39 UTC (rev 171720)
@@ -67,9 +67,11 @@
{
var timelineRecordBar = this._timelineRecordBars[recordBarIndex];
if (!timelineRecordBar)
- timelineRecordBar = this._timelineRecordBars[recordBarIndex] = new WebInspector.TimelineRecordBar;
- timelineRecordBar.renderMode = renderMode;
- timelineRecordBar.records = records;
+ timelineRecordBar = this._timelineRecordBars[recordBarIndex] = new WebInspector.TimelineRecordBar(records, renderMode);
+ else {
+ timelineRecordBar.renderMode = renderMode;
+ timelineRecordBar.records = records;
+ }
timelineRecordBar.refresh(this);
if (!timelineRecordBar.element.parentNode)
this.element.appendChild(timelineRecordBar.element);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js (171719 => 171720)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js 2014-07-29 02:11:46 UTC (rev 171719)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js 2014-07-29 04:14:39 UTC (rev 171720)
@@ -248,9 +248,11 @@
{
var timelineRecordBar = this._timelineRecordBars[recordBarIndex];
if (!timelineRecordBar)
- timelineRecordBar = this._timelineRecordBars[recordBarIndex] = new WebInspector.TimelineRecordBar;
- timelineRecordBar.renderMode = renderMode;
- timelineRecordBar.records = records;
+ timelineRecordBar = this._timelineRecordBars[recordBarIndex] = new WebInspector.TimelineRecordBar(records, renderMode);
+ else {
+ timelineRecordBar.renderMode = renderMode;
+ timelineRecordBar.records = records;
+ }
timelineRecordBar.refresh(this._graphDataSource);
if (!timelineRecordBar.element.parentNode)
this._graphContainerElement.appendChild(timelineRecordBar.element);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes