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

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

Issue 2491823003: Timeline: add experiment to show events from subframes in the frames of their own (Closed)
Patch Set: rebased, adjusted name logic 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 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 span.appendChild(WebInspector.linkifyURLAsNode( 1731 span.appendChild(WebInspector.linkifyURLAsNode(
1732 'https://github.com/GoogleChrome/devtools-docs/issues/53', WebInspec tor.UIString('Not optimized'), 1732 'https://github.com/GoogleChrome/devtools-docs/issues/53', WebInspec tor.UIString('Not optimized'),
1733 undefined, true)); 1733 undefined, true));
1734 span.createTextChild(WebInspector.UIString(': %s', eventData['deoptReaso n'])); 1734 span.createTextChild(WebInspector.UIString(': %s', eventData['deoptReaso n']));
1735 break; 1735 break;
1736 default: 1736 default:
1737 console.assert(false, 'Unhandled TimelineModel.WarningType'); 1737 console.assert(false, 'Unhandled TimelineModel.WarningType');
1738 } 1738 }
1739 return span; 1739 return span;
1740 } 1740 }
1741
1742 /**
1743 * @param {!WebInspector.TimelineModel.PageFrame} frame
1744 * @param {number=} trimAt
1745 */
1746 static displayNameForFrame(frame, trimAt) {
1747 var url = frame.url;
1748 if (!trimAt)
1749 trimAt = 30;
1750 return url.startsWith('about:') ? `"${frame.name.trimMiddle(trimAt)}"` : fra me.url.trimEnd(trimAt);
1751 }
1741 }; 1752 };
1742 1753
1743 /** 1754 /**
1744 * @unrestricted 1755 * @unrestricted
1745 */ 1756 */
1746 WebInspector.TimelineRecordStyle = class { 1757 WebInspector.TimelineRecordStyle = class {
1747 /** 1758 /**
1748 * @param {string} title 1759 * @param {string} title
1749 * @param {!WebInspector.TimelineCategory} category 1760 * @param {!WebInspector.TimelineCategory} category
1750 * @param {boolean=} hidden 1761 * @param {boolean=} hidden
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
2213 /** 2224 /**
2214 * @param {!WebInspector.TracingModel.Event} event 2225 * @param {!WebInspector.TracingModel.Event} event
2215 * @param {string=} warningType 2226 * @param {string=} warningType
2216 */ 2227 */
2217 appendWarningRow(event, warningType) { 2228 appendWarningRow(event, warningType) {
2218 var warning = WebInspector.TimelineUIUtils.eventWarning(event, warningType); 2229 var warning = WebInspector.TimelineUIUtils.eventWarning(event, warningType);
2219 if (warning) 2230 if (warning)
2220 this.appendElementRow(WebInspector.UIString('Warning'), warning, true); 2231 this.appendElementRow(WebInspector.UIString('Warning'), warning, true);
2221 } 2232 }
2222 }; 2233 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698