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

Side by Side Diff: Source/devtools/front_end/timeline/TimelineView.js

Issue 324963002: Use appropriate UI utils when formatting details for timeline row (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 1063
1064 if (this._dataElement.firstChild) 1064 if (this._dataElement.firstChild)
1065 this._dataElement.removeChildren(); 1065 this._dataElement.removeChildren();
1066 1066
1067 this._warningElement.classList.toggle("hidden", !presentationRecord.hasW arnings() && !presentationRecord.childHasWarnings()); 1067 this._warningElement.classList.toggle("hidden", !presentationRecord.hasW arnings() && !presentationRecord.childHasWarnings());
1068 this._warningElement.classList.toggle("timeline-tree-item-child-warning" , presentationRecord.childHasWarnings() && !presentationRecord.hasWarnings()); 1068 this._warningElement.classList.toggle("timeline-tree-item-child-warning" , presentationRecord.childHasWarnings() && !presentationRecord.hasWarnings());
1069 1069
1070 if (presentationRecord.coalesced()) { 1070 if (presentationRecord.coalesced()) {
1071 this._dataElement.createTextChild(WebInspector.UIString("× %d", pres entationRecord.presentationChildren().length)); 1071 this._dataElement.createTextChild(WebInspector.UIString("× %d", pres entationRecord.presentationChildren().length));
1072 } else { 1072 } else {
1073 var detailsNode = WebInspector.TimelineUIUtils.buildDetailsNode(reco rd, this._linkifier, loadedFromFile); 1073 var detailsNode = record instanceof WebInspector.TimelineModel.Recor dImpl ?
1074 WebInspector.TimelineUIUtils.buildDetailsNode(record, this._link ifier, loadedFromFile) :
1075 WebInspector.TracingTimelineUIUtils.buildDetailsNodeForTraceEven t(record._event, this._linkifier, loadedFromFile, record.target());
1074 if (detailsNode) { 1076 if (detailsNode) {
1075 this._dataElement.appendChild(document.createTextNode("(")); 1077 this._dataElement.appendChild(document.createTextNode("("));
1076 this._dataElement.appendChild(detailsNode); 1078 this._dataElement.appendChild(detailsNode);
1077 this._dataElement.appendChild(document.createTextNode(")")); 1079 this._dataElement.appendChild(document.createTextNode(")"));
1078 } 1080 }
1079 } 1081 }
1080 1082
1081 this._expandArrowElement.classList.toggle("parent", presentationRecord.e xpandable()); 1083 this._expandArrowElement.classList.toggle("parent", presentationRecord.e xpandable());
1082 this._expandArrowElement.classList.toggle("expanded", !!presentationReco rd.visibleChildrenCount()); 1084 this._expandArrowElement.classList.toggle("expanded", !!presentationReco rd.visibleChildrenCount());
1083 this._record.setListRow(this); 1085 this._record.setListRow(this);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 this._element.classList.remove("hidden"); 1290 this._element.classList.remove("hidden");
1289 } else 1291 } else
1290 this._element.classList.add("hidden"); 1292 this._element.classList.add("hidden");
1291 }, 1293 },
1292 1294
1293 _dispose: function() 1295 _dispose: function()
1294 { 1296 {
1295 this._element.remove(); 1297 this._element.remove();
1296 } 1298 }
1297 } 1299 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698