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

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

Issue 2512353002: [DevTools] Refactor Linkifier to unify link processing. (Closed)
Patch Set: unified click handler Created 4 years, 1 month 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 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 contentHelper.appendElementRow('', filmStripPreview); 1523 contentHelper.appendElementRow('', filmStripPreview);
1524 filmStripPreview.addEventListener('click', frameClicked.bind(null, filmStr ipFrame), false); 1524 filmStripPreview.addEventListener('click', frameClicked.bind(null, filmStr ipFrame), false);
1525 } 1525 }
1526 var durationInMillis = frame.endTime - frame.startTime; 1526 var durationInMillis = frame.endTime - frame.startTime;
1527 contentHelper.appendTextRow(Common.UIString('FPS'), Math.floor(1000 / durati onInMillis)); 1527 contentHelper.appendTextRow(Common.UIString('FPS'), Math.floor(1000 / durati onInMillis));
1528 contentHelper.appendTextRow(Common.UIString('CPU time'), Number.millisToStri ng(frame.cpuTime, true)); 1528 contentHelper.appendTextRow(Common.UIString('CPU time'), Number.millisToStri ng(frame.cpuTime, true));
1529 1529
1530 if (Runtime.experiments.isEnabled('layersPanel') && frame.layerTree) { 1530 if (Runtime.experiments.isEnabled('layersPanel') && frame.layerTree) {
1531 contentHelper.appendElementRow( 1531 contentHelper.appendElementRow(
1532 Common.UIString('Layer tree'), 1532 Common.UIString('Layer tree'),
1533 Components.Linkifier.linkifyUsingRevealer(frame.layerTree, Common.UISt ring('show'))); 1533 Components.Linkifier.linkifyRevealable(frame.layerTree, Common.UIStrin g('show')));
1534 } 1534 }
1535 1535
1536 /** 1536 /**
1537 * @param {!Element} image 1537 * @param {!Element} image
1538 * @param {?string} data 1538 * @param {?string} data
1539 */ 1539 */
1540 function onGotImageData(image, data) { 1540 function onGotImageData(image, data) {
1541 if (data) 1541 if (data)
1542 image.src = 'data:image/jpg;base64,' + data; 1542 image.src = 'data:image/jpg;base64,' + data;
1543 } 1543 }
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
2233 /** 2233 /**
2234 * @param {!SDK.TracingModel.Event} event 2234 * @param {!SDK.TracingModel.Event} event
2235 * @param {string=} warningType 2235 * @param {string=} warningType
2236 */ 2236 */
2237 appendWarningRow(event, warningType) { 2237 appendWarningRow(event, warningType) {
2238 var warning = Timeline.TimelineUIUtils.eventWarning(event, warningType); 2238 var warning = Timeline.TimelineUIUtils.eventWarning(event, warningType);
2239 if (warning) 2239 if (warning)
2240 this.appendElementRow(Common.UIString('Warning'), warning, true); 2240 this.appendElementRow(Common.UIString('Warning'), warning, true);
2241 } 2241 }
2242 }; 2242 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698