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

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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 case recordTypes.DrawLazyPixelRef: 753 case recordTypes.DrawLazyPixelRef:
754 relatedNodeLabel = WebInspector.UIString("Owner Element"); 754 relatedNodeLabel = WebInspector.UIString("Owner Element");
755 if (event.url) 755 if (event.url)
756 contentHelper.appendElementRow(WebInspector.UIString("Image URL"), W ebInspector.linkifyResourceAsNode(event.url)); 756 contentHelper.appendElementRow(WebInspector.UIString("Image URL"), W ebInspector.linkifyResourceAsNode(event.url));
757 break; 757 break;
758 case recordTypes.ParseAuthorStyleSheet: 758 case recordTypes.ParseAuthorStyleSheet:
759 var url = eventData["styleSheetUrl"]; 759 var url = eventData["styleSheetUrl"];
760 if (url) 760 if (url)
761 contentHelper.appendElementRow(WebInspector.UIString("Stylesheet URL "), WebInspector.linkifyResourceAsNode(url)); 761 contentHelper.appendElementRow(WebInspector.UIString("Stylesheet URL "), WebInspector.linkifyResourceAsNode(url));
762 break; 762 break;
763 case recordTypes.UpdateLayoutTree: // We don't want to see default details. 763 case recordTypes.UpdateStyleAndLayoutTree: // We don't want to see default d etails.
764 case recordTypes.RecalculateStyles: 764 case recordTypes.RecalculateStyles:
765 contentHelper.appendTextRow(WebInspector.UIString("Elements Affected"), event.args["elementCount"]); 765 contentHelper.appendTextRow(WebInspector.UIString("Elements Affected"), event.args["elementCount"]);
766 break; 766 break;
767 case recordTypes.Layout: 767 case recordTypes.Layout:
768 var beginData = event.args["beginData"]; 768 var beginData = event.args["beginData"];
769 contentHelper.appendTextRow(WebInspector.UIString("Nodes That Need Layou t"), beginData["dirtyObjects"]); 769 contentHelper.appendTextRow(WebInspector.UIString("Nodes That Need Layou t"), beginData["dirtyObjects"]);
770 relatedNodeLabel = WebInspector.UIString("Layout root"); 770 relatedNodeLabel = WebInspector.UIString("Layout root");
771 break; 771 break;
772 case recordTypes.ConsoleTime: 772 case recordTypes.ConsoleTime:
773 contentHelper.appendTextRow(WebInspector.UIString("Message"), event.name ); 773 contentHelper.appendTextRow(WebInspector.UIString("Message"), event.name );
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 switch (event.name) { 1030 switch (event.name) {
1031 case recordTypes.TimerFire: 1031 case recordTypes.TimerFire:
1032 callSiteStackLabel = WebInspector.UIString("Timer Installed"); 1032 callSiteStackLabel = WebInspector.UIString("Timer Installed");
1033 break; 1033 break;
1034 case recordTypes.FireAnimationFrame: 1034 case recordTypes.FireAnimationFrame:
1035 callSiteStackLabel = WebInspector.UIString("Animation Frame Requested"); 1035 callSiteStackLabel = WebInspector.UIString("Animation Frame Requested");
1036 break; 1036 break;
1037 case recordTypes.FireIdleCallback: 1037 case recordTypes.FireIdleCallback:
1038 callSiteStackLabel = WebInspector.UIString("Idle Callback Requested"); 1038 callSiteStackLabel = WebInspector.UIString("Idle Callback Requested");
1039 break; 1039 break;
1040 case recordTypes.UpdateLayoutTree: 1040 case recordTypes.UpdateStyleAndLayoutTree:
1041 case recordTypes.RecalculateStyles: 1041 case recordTypes.RecalculateStyles:
1042 stackLabel = WebInspector.UIString("Recalculation Forced"); 1042 stackLabel = WebInspector.UIString("Recalculation Forced");
1043 break; 1043 break;
1044 case recordTypes.Layout: 1044 case recordTypes.Layout:
1045 callSiteStackLabel = WebInspector.UIString("First Layout Invalidation"); 1045 callSiteStackLabel = WebInspector.UIString("First Layout Invalidation");
1046 stackLabel = WebInspector.UIString("Layout Forced"); 1046 stackLabel = WebInspector.UIString("Layout Forced");
1047 break; 1047 break;
1048 } 1048 }
1049 1049
1050 // Direct cause. 1050 // Direct cause.
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2174 var time = /** @type {number} */ (decoration.data()); 2174 var time = /** @type {number} */ (decoration.data());
2175 var text = WebInspector.UIString("%.1f\xa0ms", time); 2175 var text = WebInspector.UIString("%.1f\xa0ms", time);
2176 var intensity = Number.constrain(Math.log10(1 + 2 * time) / 5, 0.02, 1); 2176 var intensity = Number.constrain(Math.log10(1 + 2 * time) / 5, 0.02, 1);
2177 var element = createElementWithClass("div", "text-editor-line-marker -performance"); 2177 var element = createElementWithClass("div", "text-editor-line-marker -performance");
2178 element.textContent = text; 2178 element.textContent = text;
2179 element.style.backgroundColor = `hsla(44, 100%, 50%, ${intensity.toF ixed(3)})`; 2179 element.style.backgroundColor = `hsla(44, 100%, 50%, ${intensity.toF ixed(3)})`;
2180 textEditor.setGutterDecoration(decoration.line(), decoration.type(), element); 2180 textEditor.setGutterDecoration(decoration.line(), decoration.type(), element);
2181 } 2181 }
2182 } 2182 }
2183 } 2183 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698