Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js

Issue 1896793002: Rename (updateLayout/updateStyle).*.() to updateStyleAndLayout.*.() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 eventStyles[recordTypes.Program] = new WebInspector.TimelineRecordStyle(WebI nspector.UIString("Other"), categories["other"]); 63 eventStyles[recordTypes.Program] = new WebInspector.TimelineRecordStyle(WebI nspector.UIString("Other"), categories["other"]);
64 eventStyles[recordTypes.Animation] = new WebInspector.TimelineRecordStyle(We bInspector.UIString("Animation"), categories["rendering"]); 64 eventStyles[recordTypes.Animation] = new WebInspector.TimelineRecordStyle(We bInspector.UIString("Animation"), categories["rendering"]);
65 eventStyles[recordTypes.EventDispatch] = new WebInspector.TimelineRecordStyl e(WebInspector.UIString("Event"), categories["scripting"]); 65 eventStyles[recordTypes.EventDispatch] = new WebInspector.TimelineRecordStyl e(WebInspector.UIString("Event"), categories["scripting"]);
66 eventStyles[recordTypes.RequestMainThreadFrame] = new WebInspector.TimelineR ecordStyle(WebInspector.UIString("Request Main Thread Frame"), categories["rende ring"], true); 66 eventStyles[recordTypes.RequestMainThreadFrame] = new WebInspector.TimelineR ecordStyle(WebInspector.UIString("Request Main Thread Frame"), categories["rende ring"], true);
67 eventStyles[recordTypes.BeginFrame] = new WebInspector.TimelineRecordStyle(W ebInspector.UIString("Frame Start"), categories["rendering"], true); 67 eventStyles[recordTypes.BeginFrame] = new WebInspector.TimelineRecordStyle(W ebInspector.UIString("Frame Start"), categories["rendering"], true);
68 eventStyles[recordTypes.BeginMainThreadFrame] = new WebInspector.TimelineRec ordStyle(WebInspector.UIString("Frame Start (main thread)"), categories["renderi ng"], true); 68 eventStyles[recordTypes.BeginMainThreadFrame] = new WebInspector.TimelineRec ordStyle(WebInspector.UIString("Frame Start (main thread)"), categories["renderi ng"], true);
69 eventStyles[recordTypes.DrawFrame] = new WebInspector.TimelineRecordStyle(We bInspector.UIString("Draw Frame"), categories["rendering"], true); 69 eventStyles[recordTypes.DrawFrame] = new WebInspector.TimelineRecordStyle(We bInspector.UIString("Draw Frame"), categories["rendering"], true);
70 eventStyles[recordTypes.HitTest] = new WebInspector.TimelineRecordStyle(WebI nspector.UIString("Hit Test"), categories["rendering"]); 70 eventStyles[recordTypes.HitTest] = new WebInspector.TimelineRecordStyle(WebI nspector.UIString("Hit Test"), categories["rendering"]);
71 eventStyles[recordTypes.ScheduleStyleRecalculation] = new WebInspector.Timel ineRecordStyle(WebInspector.UIString("Schedule Style Recalculation"), categories ["rendering"], true); 71 eventStyles[recordTypes.ScheduleStyleRecalculation] = new WebInspector.Timel ineRecordStyle(WebInspector.UIString("Schedule Style Recalculation"), categories ["rendering"], true);
72 eventStyles[recordTypes.RecalculateStyles] = new WebInspector.TimelineRecord Style(WebInspector.UIString("Recalculate Style"), categories["rendering"]); 72 eventStyles[recordTypes.RecalculateStyles] = new WebInspector.TimelineRecord Style(WebInspector.UIString("Recalculate Style"), categories["rendering"]);
73 eventStyles[recordTypes.UpdateLayoutTree] = new WebInspector.TimelineRecordS tyle(WebInspector.UIString("Recalculate Style"), categories["rendering"]); 73 eventStyles[recordTypes.UpdateStyleAndLayoutTree] = new WebInspector.Timelin eRecordStyle(WebInspector.UIString("Recalculate Style"), categories["rendering"] );
74 eventStyles[recordTypes.InvalidateLayout] = new WebInspector.TimelineRecordS tyle(WebInspector.UIString("Invalidate Layout"), categories["rendering"], true); 74 eventStyles[recordTypes.InvalidateLayout] = new WebInspector.TimelineRecordS tyle(WebInspector.UIString("Invalidate Layout"), categories["rendering"], true);
75 eventStyles[recordTypes.Layout] = new WebInspector.TimelineRecordStyle(WebIn spector.UIString("Layout"), categories["rendering"]); 75 eventStyles[recordTypes.Layout] = new WebInspector.TimelineRecordStyle(WebIn spector.UIString("Layout"), categories["rendering"]);
76 eventStyles[recordTypes.PaintSetup] = new WebInspector.TimelineRecordStyle(W ebInspector.UIString("Paint Setup"), categories["painting"]); 76 eventStyles[recordTypes.PaintSetup] = new WebInspector.TimelineRecordStyle(W ebInspector.UIString("Paint Setup"), categories["painting"]);
77 eventStyles[recordTypes.PaintImage] = new WebInspector.TimelineRecordStyle(W ebInspector.UIString("Paint Image"), categories["painting"], true); 77 eventStyles[recordTypes.PaintImage] = new WebInspector.TimelineRecordStyle(W ebInspector.UIString("Paint Image"), categories["painting"], true);
78 eventStyles[recordTypes.UpdateLayer] = new WebInspector.TimelineRecordStyle( WebInspector.UIString("Update Layer"), categories["painting"], true); 78 eventStyles[recordTypes.UpdateLayer] = new WebInspector.TimelineRecordStyle( WebInspector.UIString("Update Layer"), categories["painting"], true);
79 eventStyles[recordTypes.UpdateLayerTree] = new WebInspector.TimelineRecordSt yle(WebInspector.UIString("Update Layer Tree"), categories["rendering"]); 79 eventStyles[recordTypes.UpdateLayerTree] = new WebInspector.TimelineRecordSt yle(WebInspector.UIString("Update Layer Tree"), categories["rendering"]);
80 eventStyles[recordTypes.Paint] = new WebInspector.TimelineRecordStyle(WebIns pector.UIString("Paint"), categories["painting"]); 80 eventStyles[recordTypes.Paint] = new WebInspector.TimelineRecordStyle(WebIns pector.UIString("Paint"), categories["painting"]);
81 eventStyles[recordTypes.RasterTask] = new WebInspector.TimelineRecordStyle(W ebInspector.UIString("Rasterize Paint"), categories["painting"]); 81 eventStyles[recordTypes.RasterTask] = new WebInspector.TimelineRecordStyle(W ebInspector.UIString("Rasterize Paint"), categories["painting"]);
82 eventStyles[recordTypes.ScrollLayer] = new WebInspector.TimelineRecordStyle( WebInspector.UIString("Scroll"), categories["rendering"]); 82 eventStyles[recordTypes.ScrollLayer] = new WebInspector.TimelineRecordStyle( WebInspector.UIString("Scroll"), categories["rendering"]);
83 eventStyles[recordTypes.CompositeLayers] = new WebInspector.TimelineRecordSt yle(WebInspector.UIString("Composite Layers"), categories["painting"]); 83 eventStyles[recordTypes.CompositeLayers] = new WebInspector.TimelineRecordSt yle(WebInspector.UIString("Composite Layers"), categories["painting"]);
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 case recordTypes.DrawLazyPixelRef: 797 case recordTypes.DrawLazyPixelRef:
798 relatedNodeLabel = WebInspector.UIString("Owner Element"); 798 relatedNodeLabel = WebInspector.UIString("Owner Element");
799 if (event.url) 799 if (event.url)
800 contentHelper.appendElementRow(WebInspector.UIString("Image URL"), W ebInspector.linkifyResourceAsNode(event.url)); 800 contentHelper.appendElementRow(WebInspector.UIString("Image URL"), W ebInspector.linkifyResourceAsNode(event.url));
801 break; 801 break;
802 case recordTypes.ParseAuthorStyleSheet: 802 case recordTypes.ParseAuthorStyleSheet:
803 var url = eventData["styleSheetUrl"]; 803 var url = eventData["styleSheetUrl"];
804 if (url) 804 if (url)
805 contentHelper.appendElementRow(WebInspector.UIString("Stylesheet URL "), WebInspector.linkifyResourceAsNode(url)); 805 contentHelper.appendElementRow(WebInspector.UIString("Stylesheet URL "), WebInspector.linkifyResourceAsNode(url));
806 break; 806 break;
807 case recordTypes.UpdateLayoutTree: // We don't want to see default details. 807 case recordTypes.UpdateStyleAndLayoutTree: // We don't want to see default d etails.
808 case recordTypes.RecalculateStyles: 808 case recordTypes.RecalculateStyles:
809 contentHelper.appendTextRow(WebInspector.UIString("Elements Affected"), event.args["elementCount"]); 809 contentHelper.appendTextRow(WebInspector.UIString("Elements Affected"), event.args["elementCount"]);
810 break; 810 break;
811 case recordTypes.Layout: 811 case recordTypes.Layout:
812 var beginData = event.args["beginData"]; 812 var beginData = event.args["beginData"];
813 contentHelper.appendTextRow(WebInspector.UIString("Nodes That Need Layou t"), beginData["dirtyObjects"]); 813 contentHelper.appendTextRow(WebInspector.UIString("Nodes That Need Layou t"), beginData["dirtyObjects"]);
814 relatedNodeLabel = WebInspector.UIString("Layout root"); 814 relatedNodeLabel = WebInspector.UIString("Layout root");
815 break; 815 break;
816 case recordTypes.ConsoleTime: 816 case recordTypes.ConsoleTime:
817 contentHelper.appendTextRow(WebInspector.UIString("Message"), event.name ); 817 contentHelper.appendTextRow(WebInspector.UIString("Message"), event.name );
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 switch (event.name) { 1074 switch (event.name) {
1075 case recordTypes.TimerFire: 1075 case recordTypes.TimerFire:
1076 callSiteStackLabel = WebInspector.UIString("Timer Installed"); 1076 callSiteStackLabel = WebInspector.UIString("Timer Installed");
1077 break; 1077 break;
1078 case recordTypes.FireAnimationFrame: 1078 case recordTypes.FireAnimationFrame:
1079 callSiteStackLabel = WebInspector.UIString("Animation Frame Requested"); 1079 callSiteStackLabel = WebInspector.UIString("Animation Frame Requested");
1080 break; 1080 break;
1081 case recordTypes.FireIdleCallback: 1081 case recordTypes.FireIdleCallback:
1082 callSiteStackLabel = WebInspector.UIString("Idle Callback Requested"); 1082 callSiteStackLabel = WebInspector.UIString("Idle Callback Requested");
1083 break; 1083 break;
1084 case recordTypes.UpdateLayoutTree: 1084 case recordTypes.UpdateStyleAndLayoutTree:
1085 case recordTypes.RecalculateStyles: 1085 case recordTypes.RecalculateStyles:
1086 stackLabel = WebInspector.UIString("Recalculation Forced"); 1086 stackLabel = WebInspector.UIString("Recalculation Forced");
1087 break; 1087 break;
1088 case recordTypes.Layout: 1088 case recordTypes.Layout:
1089 callSiteStackLabel = WebInspector.UIString("First Layout Invalidation"); 1089 callSiteStackLabel = WebInspector.UIString("First Layout Invalidation");
1090 stackLabel = WebInspector.UIString("Layout Forced"); 1090 stackLabel = WebInspector.UIString("Layout Forced");
1091 break; 1091 break;
1092 } 1092 }
1093 1093
1094 // Direct cause. 1094 // Direct cause.
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2218 var time = /** @type {number} */ (decoration.data()); 2218 var time = /** @type {number} */ (decoration.data());
2219 var text = WebInspector.UIString("%.1f\xa0ms", time); 2219 var text = WebInspector.UIString("%.1f\xa0ms", time);
2220 var intensity = Number.constrain(Math.log10(1 + 2 * time) / 5, 0.02, 1); 2220 var intensity = Number.constrain(Math.log10(1 + 2 * time) / 5, 0.02, 1);
2221 var element = createElementWithClass("div", "text-editor-line-marker -performance"); 2221 var element = createElementWithClass("div", "text-editor-line-marker -performance");
2222 element.textContent = text; 2222 element.textContent = text;
2223 element.style.backgroundColor = `hsla(44, 100%, 50%, ${intensity.toF ixed(3)})`; 2223 element.style.backgroundColor = `hsla(44, 100%, 50%, ${intensity.toF ixed(3)})`;
2224 textEditor.setGutterDecoration(decoration.line(), decoration.type(), element); 2224 textEditor.setGutterDecoration(decoration.line(), decoration.type(), element);
2225 } 2225 }
2226 } 2226 }
2227 } 2227 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698