OLD | NEW |
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 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1472 */ | 1472 */ |
1473 WebInspector.TimelineUIUtils.categories = function() | 1473 WebInspector.TimelineUIUtils.categories = function() |
1474 { | 1474 { |
1475 if (WebInspector.TimelineUIUtils._categories) | 1475 if (WebInspector.TimelineUIUtils._categories) |
1476 return WebInspector.TimelineUIUtils._categories; | 1476 return WebInspector.TimelineUIUtils._categories; |
1477 WebInspector.TimelineUIUtils._categories = { | 1477 WebInspector.TimelineUIUtils._categories = { |
1478 loading: new WebInspector.TimelineCategory("loading", WebInspector.UIStr
ing("Loading"), true, "hsl(214, 67%, 74%)", "hsl(214, 67%, 66%)"), | 1478 loading: new WebInspector.TimelineCategory("loading", WebInspector.UIStr
ing("Loading"), true, "hsl(214, 67%, 74%)", "hsl(214, 67%, 66%)"), |
1479 scripting: new WebInspector.TimelineCategory("scripting", WebInspector.U
IString("Scripting"), true, "hsl(43, 83%, 72%)", "hsl(43, 83%, 64%) "), | 1479 scripting: new WebInspector.TimelineCategory("scripting", WebInspector.U
IString("Scripting"), true, "hsl(43, 83%, 72%)", "hsl(43, 83%, 64%) "), |
1480 rendering: new WebInspector.TimelineCategory("rendering", WebInspector.U
IString("Rendering"), true, "hsl(256, 67%, 76%)", "hsl(256, 67%, 70%)"), | 1480 rendering: new WebInspector.TimelineCategory("rendering", WebInspector.U
IString("Rendering"), true, "hsl(256, 67%, 76%)", "hsl(256, 67%, 70%)"), |
1481 painting: new WebInspector.TimelineCategory("painting", WebInspector.UIS
tring("Painting"), true, "hsl(109, 33%, 64%)", "hsl(109, 33%, 55%)"), | 1481 painting: new WebInspector.TimelineCategory("painting", WebInspector.UIS
tring("Painting"), true, "hsl(109, 33%, 64%)", "hsl(109, 33%, 55%)"), |
1482 gpu: new WebInspector.TimelineCategory("gpu", WebInspector.UIString("GPU
"), false, "hsl(240, 24%, 73%)", "hsl(240, 24%, 66%)"), | 1482 gpu: new WebInspector.TimelineCategory("gpu", WebInspector.UIString("GPU
"), false, "hsl(109, 33%, 64%)", "hsl(109, 33%, 55%)"), |
1483 other: new WebInspector.TimelineCategory("other", WebInspector.UIString(
"Other"), false, "hsl(0, 0%, 87%)", "hsl(0, 0%, 79%)"), | 1483 other: new WebInspector.TimelineCategory("other", WebInspector.UIString(
"Other"), false, "hsl(0, 0%, 87%)", "hsl(0, 0%, 79%)"), |
1484 idle: new WebInspector.TimelineCategory("idle", WebInspector.UIString("I
dle"), false, "hsl(0, 100%, 100%)", "hsl(0, 100%, 100%)") | 1484 idle: new WebInspector.TimelineCategory("idle", WebInspector.UIString("I
dle"), false, "hsl(0, 100%, 100%)", "hsl(0, 100%, 100%)") |
1485 }; | 1485 }; |
1486 return WebInspector.TimelineUIUtils._categories; | 1486 return WebInspector.TimelineUIUtils._categories; |
1487 }; | 1487 }; |
1488 | 1488 |
1489 /** | 1489 /** |
1490 * @constructor | 1490 * @constructor |
1491 * @param {string} title | 1491 * @param {string} title |
1492 */ | 1492 */ |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2135 var time = /** @type {number} */ (decoration.data()); | 2135 var time = /** @type {number} */ (decoration.data()); |
2136 var text = WebInspector.UIString("%.1f\xa0ms", time); | 2136 var text = WebInspector.UIString("%.1f\xa0ms", time); |
2137 var intensity = Number.constrain(Math.log10(1 + 2 * time) / 5, 0.02,
1); | 2137 var intensity = Number.constrain(Math.log10(1 + 2 * time) / 5, 0.02,
1); |
2138 var element = createElementWithClass("div", "text-editor-line-marker
-performance"); | 2138 var element = createElementWithClass("div", "text-editor-line-marker
-performance"); |
2139 element.textContent = text; | 2139 element.textContent = text; |
2140 element.style.backgroundColor = `hsla(44, 100%, 50%, ${intensity.toF
ixed(3)})`; | 2140 element.style.backgroundColor = `hsla(44, 100%, 50%, ${intensity.toF
ixed(3)})`; |
2141 textEditor.setGutterDecoration(decoration.line(), decoration.type(),
element); | 2141 textEditor.setGutterDecoration(decoration.line(), decoration.type(),
element); |
2142 } | 2142 } |
2143 } | 2143 } |
2144 } | 2144 } |
OLD | NEW |