Title: [171738] branches/safari-600.1-branch/Source/WebInspectorUI

Diff

Modified: branches/safari-600.1-branch/Source/WebInspectorUI/ChangeLog (171737 => 171738)


--- branches/safari-600.1-branch/Source/WebInspectorUI/ChangeLog	2014-07-29 08:49:05 UTC (rev 171737)
+++ branches/safari-600.1-branch/Source/WebInspectorUI/ChangeLog	2014-07-29 08:50:57 UTC (rev 171738)
@@ -1,5 +1,32 @@
 2014-07-29  Lucas Forschler  <[email protected]>
 
+        Merge r171720
+
+    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-29  Lucas Forschler  <[email protected]>
+
         Merge r171716
 
     2014-07-28  Timothy Hatcher  <[email protected]>

Modified: branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineOverviewGraph.js (171737 => 171738)


--- branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineOverviewGraph.js	2014-07-29 08:49:05 UTC (rev 171737)
+++ branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineOverviewGraph.js	2014-07-29 08:50:57 UTC (rev 171738)
@@ -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: branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js (171737 => 171738)


--- branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js	2014-07-29 08:49:05 UTC (rev 171737)
+++ branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js	2014-07-29 08:50:57 UTC (rev 171738)
@@ -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: branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineOverviewGraph.js (171737 => 171738)


--- branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineOverviewGraph.js	2014-07-29 08:49:05 UTC (rev 171737)
+++ branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineOverviewGraph.js	2014-07-29 08:50:57 UTC (rev 171738)
@@ -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: branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js (171737 => 171738)


--- branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js	2014-07-29 08:49:05 UTC (rev 171737)
+++ branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js	2014-07-29 08:50:57 UTC (rev 171738)
@@ -246,9 +246,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

Reply via email to