Title: [164918] trunk/Source/WebInspectorUI
Revision
164918
Author
[email protected]
Date
2014-03-01 09:51:27 -0800 (Sat, 01 Mar 2014)

Log Message

Label _javascript_ forced layouts as such in the Timeline.

https://bugs.webkit.org/show_bug.cgi?id=129546

Reviewed by David Kilzer.

* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
* UserInterface/Models/LayoutTimelineRecord.js:
(WebInspector.LayoutTimelineRecord.EventType.displayName):
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (164917 => 164918)


--- trunk/Source/WebInspectorUI/ChangeLog	2014-03-01 16:26:15 UTC (rev 164917)
+++ trunk/Source/WebInspectorUI/ChangeLog	2014-03-01 17:51:27 UTC (rev 164918)
@@ -1,3 +1,20 @@
+2014-03-01  Timothy Hatcher  <[email protected]>
+
+        Label _javascript_ forced layouts as such in the Timeline.
+
+        https://bugs.webkit.org/show_bug.cgi?id=129546
+
+        Reviewed by David Kilzer.
+
+        * Localizations/en.lproj/localizedStrings.js: Updated.
+        * UserInterface/Controllers/TimelineManager.js:
+        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
+        (WebInspector.TimelineManager.prototype.eventRecorded):
+        * UserInterface/Models/LayoutTimelineRecord.js:
+        (WebInspector.LayoutTimelineRecord.EventType.displayName):
+        * UserInterface/Views/TimelineRecordTreeElement.js:
+        (WebInspector.TimelineRecordTreeElement):
+
 2014-02-28  Timothy Hatcher  <[email protected]>
 
         Enable breakpoints when adding a new breakpoint or enabling an existing breakpoint.

Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (164917 => 164918)


--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2014-03-01 16:26:15 UTC (rev 164917)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2014-03-01 17:51:27 UTC (rev 164918)
@@ -187,6 +187,7 @@
 localizedStrings["Flows"] = "Flows";
 localizedStrings["Font"] = "Font";
 localizedStrings["Fonts"] = "Fonts";
+localizedStrings["Forced Layout"] = "Forced Layout";
 localizedStrings["Forced Pseudo-Classes"] = "Forced Pseudo-Classes";
 localizedStrings["Forward (%s)"] = "Forward (%s)";
 localizedStrings["Fragment"] = "Fragment";
@@ -424,4 +425,3 @@
 localizedStrings["line "] = "line ";
 localizedStrings["originally %s"] = "originally %s";
 localizedStrings["undefined \xD7 %d"] = "undefined \xD7 %d";
-localizedStrings["via inspector"] = "via inspector";

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (164917 => 164918)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js	2014-03-01 16:26:15 UTC (rev 164917)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js	2014-03-01 17:51:27 UTC (rev 164918)
@@ -177,12 +177,14 @@
                 break;
 
             case TimelineAgent.EventType.Layout:
+                var layoutRecordType = sourceCodeLocation ? WebInspector.LayoutTimelineRecord.EventType.ForcedLayout : WebInspector.LayoutTimelineRecord.EventType.Layout;
+
                 // COMPATIBILITY (iOS 6): Layout records did not contain area properties. This is not exposed via a quad "root".
                 var quad = recordPayload.data.root ? new WebInspector.Quad(recordPayload.data.root) : null;
                 if (quad)
-                    this._addRecord(new WebInspector.LayoutTimelineRecord(WebInspector.LayoutTimelineRecord.EventType.Layout, startTime, endTime, callFrames, sourceCodeLocation, quad.points[0].x, quad.points[0].y, quad.width, quad.height, quad));
+                    this._addRecord(new WebInspector.LayoutTimelineRecord(layoutRecordType, startTime, endTime, callFrames, sourceCodeLocation, quad.points[0].x, quad.points[0].y, quad.width, quad.height, quad));
                 else
-                    this._addRecord(new WebInspector.LayoutTimelineRecord(WebInspector.LayoutTimelineRecord.EventType.Layout, startTime, endTime, callFrames, sourceCodeLocation));
+                    this._addRecord(new WebInspector.LayoutTimelineRecord(layoutRecordType, startTime, endTime, callFrames, sourceCodeLocation));
                 break;
 
             case TimelineAgent.EventType.Paint:

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/LayoutTimelineRecord.js (164917 => 164918)


--- trunk/Source/WebInspectorUI/UserInterface/Models/LayoutTimelineRecord.js	2014-03-01 16:26:15 UTC (rev 164917)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/LayoutTimelineRecord.js	2014-03-01 17:51:27 UTC (rev 164918)
@@ -44,6 +44,7 @@
     InvalidateStyles: "layout-timeline-record-invalidate-styles",
     RecalculateStyles: "layout-timeline-record-recalculate-styles",
     InvalidateLayout: "layout-timeline-record-invalidate-layout",
+    ForcedLayout: "layout-timeline-record-forced-layout",
     Layout: "layout-timeline-record-layout",
     Paint: "layout-timeline-record-paint"
 };
@@ -57,6 +58,8 @@
         return WebInspector.UIString("Styles Recalculated");
     case WebInspector.LayoutTimelineRecord.EventType.InvalidateLayout:
         return WebInspector.UIString("Layout Invalidated");
+    case WebInspector.LayoutTimelineRecord.EventType.ForcedLayout:
+        return WebInspector.UIString("Forced Layout");
     case WebInspector.LayoutTimelineRecord.EventType.Layout:
         return WebInspector.UIString("Layout");
     case WebInspector.LayoutTimelineRecord.EventType.Paint:

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordTreeElement.js (164917 => 164918)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordTreeElement.js	2014-03-01 16:26:15 UTC (rev 164917)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordTreeElement.js	2014-03-01 17:51:27 UTC (rev 164918)
@@ -54,6 +54,7 @@
             iconStyleClass = WebInspector.TimelineRecordTreeElement.StyleRecordIconStyleClass;
             break;
         case WebInspector.LayoutTimelineRecord.EventType.InvalidateLayout:
+        case WebInspector.LayoutTimelineRecord.EventType.ForcedLayout:
         case WebInspector.LayoutTimelineRecord.EventType.Layout:
             iconStyleClass = WebInspector.TimelineRecordTreeElement.LayoutRecordIconStyleClass;
             break;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to