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

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

Issue 2612363003: DevTools: Show FMP markers on timeline experiment (Closed)
Patch Set: tweaks Created 3 years, 11 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 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after
1633 new Timeline.TimelineUIUtils.EventDispatchTypeDescriptor(3, purple, ['keyd own', 'keyup', 'keypress']) 1633 new Timeline.TimelineUIUtils.EventDispatchTypeDescriptor(3, purple, ['keyd own', 'keyup', 'keypress'])
1634 ]; 1634 ];
1635 return Timeline.TimelineUIUtils._eventDispatchDesciptors; 1635 return Timeline.TimelineUIUtils._eventDispatchDesciptors;
1636 } 1636 }
1637 1637
1638 /** 1638 /**
1639 * @param {!SDK.TracingModel.Event} event 1639 * @param {!SDK.TracingModel.Event} event
1640 * @return {!Timeline.TimelineMarkerStyle} 1640 * @return {!Timeline.TimelineMarkerStyle}
1641 */ 1641 */
1642 static markerStyleForEvent(event) { 1642 static markerStyleForEvent(event) {
1643 var red = 'rgb(255, 0, 0)'; 1643 const red = 'rgb(255, 0, 0)';
1644 var blue = 'rgb(0, 0, 255)'; 1644 const blue = 'rgb(0, 0, 255)';
1645 var orange = 'rgb(255, 178, 23)'; 1645 const orange = 'rgb(255, 178, 23)';
1646 var green = 'rgb(0, 130, 0)'; 1646 const green = 'rgb(0, 130, 0)';
1647 var tallMarkerDashStyle = [10, 5]; 1647 const purple = '#a2f';
1648 1648 const tallMarkerDashStyle = [10, 5];
1649 var title = Timeline.TimelineUIUtils.eventTitle(event); 1649 const title = Timeline.TimelineUIUtils.eventTitle(event);
1650 1650
1651 if (event.hasCategory(TimelineModel.TimelineModel.Category.Console) || 1651 if (event.hasCategory(TimelineModel.TimelineModel.Category.Console) ||
1652 event.hasCategory(TimelineModel.TimelineModel.Category.UserTiming)) { 1652 event.hasCategory(TimelineModel.TimelineModel.Category.UserTiming)) {
1653 return { 1653 return {
1654 title: title, 1654 title: title,
1655 dashStyle: tallMarkerDashStyle, 1655 dashStyle: tallMarkerDashStyle,
1656 lineWidth: 0.5, 1656 lineWidth: 0.5,
1657 color: orange, 1657 color: event.hasCategory(TimelineModel.TimelineModel.Category.UserTiming ) ? purple : orange,
1658 tall: false, 1658 tall: false,
1659 lowPriority: false, 1659 lowPriority: false,
1660 }; 1660 };
1661 } 1661 }
1662 var recordTypes = TimelineModel.TimelineModel.RecordType; 1662 var recordTypes = TimelineModel.TimelineModel.RecordType;
1663 var tall = false; 1663 var tall = false;
1664 var color = green; 1664 var color = green;
1665 switch (event.name) { 1665 switch (event.name) {
1666 case recordTypes.MarkDOMContent: 1666 case recordTypes.MarkDOMContent:
1667 color = blue; 1667 color = blue;
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
2243 /** 2243 /**
2244 * @param {!SDK.TracingModel.Event} event 2244 * @param {!SDK.TracingModel.Event} event
2245 * @param {string=} warningType 2245 * @param {string=} warningType
2246 */ 2246 */
2247 appendWarningRow(event, warningType) { 2247 appendWarningRow(event, warningType) {
2248 var warning = Timeline.TimelineUIUtils.eventWarning(event, warningType); 2248 var warning = Timeline.TimelineUIUtils.eventWarning(event, warningType);
2249 if (warning) 2249 if (warning)
2250 this.appendElementRow(Common.UIString('Warning'), warning, true); 2250 this.appendElementRow(Common.UIString('Warning'), warning, true);
2251 } 2251 }
2252 }; 2252 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698