Changeset 63757 in webkit
- Timestamp:
- Jul 20, 2010 10:53:44 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r63753 r63757 1 2010-07-20 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 WebInspector: It is possible to show full call stack instead of top frame for Caller 6 and Call Site properties in Timeline panel. 7 https://bugs.webkit.org/show_bug.cgi?id=42620 8 9 * English.lproj/localizedStrings.js: 10 * inspector/front-end/TimelinePanel.js: 11 (WebInspector.TimelinePanel.FormattedRecord): 12 (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): 13 (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): 14 (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendElementRow): 15 (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendLinkRow): 16 (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendStackTrace): 17 * inspector/front-end/inspector.css: 18 (.timeline-details): 19 (.timeline-function-name): 20 (.timeline-stacktrace-title): 21 1 22 2010-07-20 Leon Clarke <leonclarke@google.com> 2 23 -
trunk/WebCore/inspector/front-end/TimelinePanel.js
r62647 r63757 842 842 this._lastChildEndTime = this.endTime; 843 843 this.originalRecordForTests = record; 844 if (record.stackTrace && record.stackTrace.length) { 845 this.callerScriptName = record.stackTrace[0].scriptName; 846 this.callerScriptLine = record.stackTrace[0].lineNumber; 847 } 844 if (record.stackTrace && record.stackTrace.length) 845 this.stackTrace = record.stackTrace; 848 846 this.totalHeapSize = record.totalHeapSize; 849 847 this.usedHeapSize = record.usedHeapSize; … … 878 876 var timerInstalledRecord = panel._timerRecords[record.data.timerId]; 879 877 if (timerInstalledRecord) { 880 this.callSiteScriptName = timerInstalledRecord.callerScriptName; 881 this.callSiteScriptLine = timerInstalledRecord.callerScriptLine; 878 this.callSiteStackTrace = timerInstalledRecord.stackTrace; 882 879 this.timeout = timerInstalledRecord.timeout; 883 880 this.singleShot = timerInstalledRecord.singleShot; … … 941 938 contentHelper._appendTextRow(WebInspector.UIString("Repeats"), !this.singleShot); 942 939 } 943 if (typeof this.callSiteScriptLine === "number")944 contentHelper._appendLinkRow(WebInspector.UIString("Call Site"), this.callSiteScriptName, this.callSiteScriptLine);945 940 break; 946 941 case recordTypes.FunctionCall: … … 980 975 contentHelper._appendLinkRow(WebInspector.UIString("Function Call"), this.data.scriptName, this.data.scriptLine); 981 976 982 if (this.callerScriptName && this.type !== recordTypes.GCEvent)983 contentHelper._appendLinkRow(WebInspector.UIString("Caller"), this.callerScriptName, this.callerScriptLine);984 985 977 if (this.usedHeapSize) 986 978 contentHelper._appendTextRow(WebInspector.UIString("Used Heap Size"), WebInspector.UIString("%s of %s", Number.bytesToString(this.usedHeapSize, WebInspector.UIString), Number.bytesToString(this.totalHeapSize, WebInspector.UIString))); 979 980 if (this.callSiteStackTrace && this.callSiteStackTrace.length) 981 contentHelper._appendStackTrace(WebInspector.UIString("Call Site stack"), this.callSiteStackTrace); 982 983 if (this.stackTrace) 984 contentHelper._appendStackTrace(WebInspector.UIString("Call Stack"), this.stackTrace); 987 985 988 986 return contentHelper._contentTable; … … 1004 1002 case WebInspector.TimelineAgent.RecordType.TimerInstall: 1005 1003 case WebInspector.TimelineAgent.RecordType.TimerRemove: 1006 return this. callerScriptName ? WebInspector.linkifyResourceAsNode(this.callerScriptName, "scripts", this.callerScriptLine, "", "") : record.data.timerId;1004 return this.stackTrace ? WebInspector.linkifyResourceAsNode(this.stackTrace[0].scriptName, "scripts", this.stackTrace[0].lineNumber, "", "") : record.data.timerId; 1007 1005 case WebInspector.TimelineAgent.RecordType.ParseHTML: 1008 1006 case WebInspector.TimelineAgent.RecordType.RecalculateStyles: 1009 return this. callerScriptName ? WebInspector.linkifyResourceAsNode(this.callerScriptName, "scripts", this.callerScriptLine, "", "") : null;1007 return this.stackTrace ? WebInspector.linkifyResourceAsNode(this.stackTrace[0].scriptName, "scripts", this.stackTrace[0].lineNumber, "", "") : null; 1010 1008 case WebInspector.TimelineAgent.RecordType.EvaluateScript: 1011 1009 return record.data.url ? WebInspector.linkifyResourceAsNode(record.data.url, "scripts", record.data.lineNumber, "", "") : null; … … 1076 1074 }, 1077 1075 1078 _appendElementRow: function(title, content )1076 _appendElementRow: function(title, content, titleStyle) 1079 1077 { 1080 1078 var row = document.createElement("tr"); 1081 row.appendChild(this._createCell(title, "timeline-details-row-title")); 1079 var titleCell = this._createCell(title, "timeline-details-row-title"); 1080 if (titleStyle) 1081 titleCell.addStyleClass(titleStyle); 1082 row.appendChild(titleCell); 1082 1083 var cell = document.createElement("td"); 1084 cell.className = "timeline-details"; 1083 1085 cell.appendChild(content); 1084 1086 row.appendChild(cell); … … 1090 1092 var link = WebInspector.linkifyResourceAsNode(scriptName, "scripts", scriptLine, "timeline-details"); 1091 1093 this._appendElementRow(title, link); 1094 }, 1095 1096 _appendStackTrace: function(title, stackTrace) 1097 { 1098 this._appendTextRow("", ""); 1099 var framesTable = document.createElement("table"); 1100 for (var i = 0; i < stackTrace.length; ++i) { 1101 var stackFrame = stackTrace[i]; 1102 var row = document.createElement("tr"); 1103 row.className = "timeline-details"; 1104 row.appendChild(this._createCell(stackFrame.functionName ? stackFrame.functionName : WebInspector.UIString("(anonymous function)"), "timeline-function-name")); 1105 row.appendChild(this._createCell(" @ ")); 1106 var linkCell = document.createElement("td"); 1107 linkCell.appendChild(WebInspector.linkifyResourceAsNode(stackFrame.scriptName, "scripts", stackFrame.lineNumber, "timeline-details")); 1108 row.appendChild(linkCell); 1109 framesTable.appendChild(row); 1110 } 1111 this._appendElementRow(title, framesTable, "timeline-stacktrace-title"); 1092 1112 } 1093 1113 } -
trunk/WebCore/inspector/front-end/inspector.css
r63662 r63757 3694 3694 .timeline-details { 3695 3695 -webkit-user-select: text; 3696 vertical-align: top; 3697 } 3698 3699 .timeline-function-name { 3700 text-align: right; 3701 } 3702 3703 .timeline-stacktrace-title { 3704 padding-top: 4px; 3696 3705 } 3697 3706
Note: See TracChangeset
for help on using the changeset viewer.