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

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

Issue 212953003: TimelinePanel: provide scriptId in FunctionCall event. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor change Created 6 years, 8 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 | « Source/devtools/front_end/TimelineUIUtils.js ('k') | 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 } else { 532 } else {
533 if (!listRowElement) { 533 if (!listRowElement) {
534 listRowElement = new WebInspector.TimelineRecordListRow(this ._linkifier, selectRecordCallback, scheduleRefreshCallback).element; 534 listRowElement = new WebInspector.TimelineRecordListRow(this ._linkifier, selectRecordCallback, scheduleRefreshCallback).element;
535 this._sidebarListElement.appendChild(listRowElement); 535 this._sidebarListElement.appendChild(listRowElement);
536 } 536 }
537 if (!graphRowElement) { 537 if (!graphRowElement) {
538 graphRowElement = new WebInspector.TimelineRecordGraphRow(th is._itemsGraphsElement, selectRecordCallback, scheduleRefreshCallback).element; 538 graphRowElement = new WebInspector.TimelineRecordGraphRow(th is._itemsGraphsElement, selectRecordCallback, scheduleRefreshCallback).element;
539 this._graphRowsElement.appendChild(graphRowElement); 539 this._graphRowsElement.appendChild(graphRowElement);
540 } 540 }
541 541
542 listRowElement.row.update(record, visibleTop); 542 listRowElement.row.update(record, visibleTop, this._model.loaded FromFile());
543 graphRowElement.row.update(record, this._calculator, this._expan dOffset, i); 543 graphRowElement.row.update(record, this._calculator, this._expan dOffset, i);
544 if (this._lastSelectedRecord === record) { 544 if (this._lastSelectedRecord === record) {
545 listRowElement.row.renderAsSelected(true); 545 listRowElement.row.renderAsSelected(true);
546 graphRowElement.row.renderAsSelected(true); 546 graphRowElement.row.renderAsSelected(true);
547 } 547 }
548 548
549 listRowElement = listRowElement.nextSibling; 549 listRowElement = listRowElement.nextSibling;
550 graphRowElement = graphRowElement.nextSibling; 550 graphRowElement = graphRowElement.nextSibling;
551 } 551 }
552 } 552 }
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 998
999 this._dataElement = this.element.createChild("span", "data dimmed"); 999 this._dataElement = this.element.createChild("span", "data dimmed");
1000 this._scheduleRefresh = scheduleRefresh; 1000 this._scheduleRefresh = scheduleRefresh;
1001 this._selectRecord = selectRecord; 1001 this._selectRecord = selectRecord;
1002 } 1002 }
1003 1003
1004 WebInspector.TimelineRecordListRow.prototype = { 1004 WebInspector.TimelineRecordListRow.prototype = {
1005 /** 1005 /**
1006 * @param {!WebInspector.TimelinePresentationModel.Record} presentationRecor d 1006 * @param {!WebInspector.TimelinePresentationModel.Record} presentationRecor d
1007 * @param {number} offset 1007 * @param {number} offset
1008 * @param {boolean} loadedFromFile
1008 */ 1009 */
1009 update: function(presentationRecord, offset) 1010 update: function(presentationRecord, offset, loadedFromFile)
1010 { 1011 {
1011 this._record = presentationRecord; 1012 this._record = presentationRecord;
1012 var record = presentationRecord.record(); 1013 var record = presentationRecord.record();
1013 this._offset = offset; 1014 this._offset = offset;
1014 1015
1015 this.element.className = "timeline-tree-item timeline-category-" + recor d.category.name; 1016 this.element.className = "timeline-tree-item timeline-category-" + recor d.category.name;
1016 var paddingLeft = 5; 1017 var paddingLeft = 5;
1017 var step = -3; 1018 var step = -3;
1018 for (var currentRecord = presentationRecord.presentationParent() ? prese ntationRecord.presentationParent().presentationParent() : null; currentRecord; c urrentRecord = currentRecord.presentationParent()) 1019 for (var currentRecord = presentationRecord.presentationParent() ? prese ntationRecord.presentationParent().presentationParent() : null; currentRecord; c urrentRecord = currentRecord.presentationParent())
1019 paddingLeft += 12 / (Math.max(1, step++)); 1020 paddingLeft += 12 / (Math.max(1, step++));
1020 this.element.style.paddingLeft = paddingLeft + "px"; 1021 this.element.style.paddingLeft = paddingLeft + "px";
1021 if (record.thread) 1022 if (record.thread)
1022 this.element.classList.add("background"); 1023 this.element.classList.add("background");
1023 1024
1024 this._typeElement.textContent = record.title(); 1025 this._typeElement.textContent = record.title();
1025 1026
1026 if (this._dataElement.firstChild) 1027 if (this._dataElement.firstChild)
1027 this._dataElement.removeChildren(); 1028 this._dataElement.removeChildren();
1028 1029
1029 this._warningElement.classList.toggle("hidden", !presentationRecord.hasW arnings() && !presentationRecord.childHasWarnings()); 1030 this._warningElement.classList.toggle("hidden", !presentationRecord.hasW arnings() && !presentationRecord.childHasWarnings());
1030 this._warningElement.classList.toggle("timeline-tree-item-child-warning" , presentationRecord.childHasWarnings() && !presentationRecord.hasWarnings()); 1031 this._warningElement.classList.toggle("timeline-tree-item-child-warning" , presentationRecord.childHasWarnings() && !presentationRecord.hasWarnings());
1031 1032
1032 if (presentationRecord.coalesced()) { 1033 if (presentationRecord.coalesced()) {
1033 this._dataElement.createTextChild(WebInspector.UIString("× %d", pres entationRecord.presentationChildren().length)); 1034 this._dataElement.createTextChild(WebInspector.UIString("× %d", pres entationRecord.presentationChildren().length));
1034 } else { 1035 } else {
1035 var detailsNode = WebInspector.TimelineUIUtils.buildDetailsNode(reco rd, this._linkifier); 1036 var detailsNode = WebInspector.TimelineUIUtils.buildDetailsNode(reco rd, this._linkifier, loadedFromFile);
1036 if (detailsNode) { 1037 if (detailsNode) {
1037 this._dataElement.appendChild(document.createTextNode("(")); 1038 this._dataElement.appendChild(document.createTextNode("("));
1038 this._dataElement.appendChild(detailsNode); 1039 this._dataElement.appendChild(detailsNode);
1039 this._dataElement.appendChild(document.createTextNode(")")); 1040 this._dataElement.appendChild(document.createTextNode(")"));
1040 } 1041 }
1041 } 1042 }
1042 1043
1043 this._expandArrowElement.classList.toggle("parent", presentationRecord.e xpandable()); 1044 this._expandArrowElement.classList.toggle("parent", presentationRecord.e xpandable());
1044 this._expandArrowElement.classList.toggle("expanded", !!presentationReco rd.visibleChildrenCount()); 1045 this._expandArrowElement.classList.toggle("expanded", !!presentationReco rd.visibleChildrenCount());
1045 this._record.setListRow(this); 1046 this._record.setListRow(this);
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 this._element.classList.remove("hidden"); 1254 this._element.classList.remove("hidden");
1254 } else 1255 } else
1255 this._element.classList.add("hidden"); 1256 this._element.classList.add("hidden");
1256 }, 1257 },
1257 1258
1258 _dispose: function() 1259 _dispose: function()
1259 { 1260 {
1260 this._element.remove(); 1261 this._element.remove();
1261 } 1262 }
1262 } 1263 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/TimelineUIUtils.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698