OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 /** | 272 /** |
273 * @param {!ConsoleAgent.CallFrame} callFrame | 273 * @param {!ConsoleAgent.CallFrame} callFrame |
274 * @return {?Element} | 274 * @return {?Element} |
275 */ | 275 */ |
276 _linkifyCallFrame: function(callFrame) | 276 _linkifyCallFrame: function(callFrame) |
277 { | 277 { |
278 console.assert(this._linkifier); | 278 console.assert(this._linkifier); |
279 var target = this._target(); | 279 var target = this._target(); |
280 if (!this._linkifier || !target) | 280 if (!this._linkifier || !target) |
281 return null; | 281 return null; |
282 // FIXME(62725): stack trace line/column numbers are one-based. | 282 var rawLocation = this._target().debuggerModel.createRawLocationByConsol
eCallFrame(callFrame); |
283 var lineNumber = callFrame.lineNumber ? callFrame.lineNumber - 1 : 0; | |
284 var columnNumber = callFrame.columnNumber ? callFrame.columnNumber - 1 :
0; | |
285 var rawLocation = new WebInspector.DebuggerModel.Location(target, callFr
ame.scriptId, lineNumber, columnNumber); | |
286 return this._linkifier.linkifyRawLocation(rawLocation, "console-message-
url"); | 283 return this._linkifier.linkifyRawLocation(rawLocation, "console-message-
url"); |
287 }, | 284 }, |
288 | 285 |
289 /** | 286 /** |
290 * @param {?Array.<!ConsoleAgent.CallFrame>} stackTrace | 287 * @param {?Array.<!ConsoleAgent.CallFrame>} stackTrace |
291 * @return {?ConsoleAgent.CallFrame} | 288 * @return {?ConsoleAgent.CallFrame} |
292 */ | 289 */ |
293 _callFrameAnchorFromStackTrace: function(stackTrace) | 290 _callFrameAnchorFromStackTrace: function(stackTrace) |
294 { | 291 { |
295 if (!stackTrace || !stackTrace.length) | 292 if (!stackTrace || !stackTrace.length) |
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1261 { | 1258 { |
1262 if (!this._wrapperElement) { | 1259 if (!this._wrapperElement) { |
1263 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); | 1260 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); |
1264 this._wrapperElement.classList.toggle("collapsed", this._collapsed); | 1261 this._wrapperElement.classList.toggle("collapsed", this._collapsed); |
1265 } | 1262 } |
1266 return this._wrapperElement; | 1263 return this._wrapperElement; |
1267 }, | 1264 }, |
1268 | 1265 |
1269 __proto__: WebInspector.ConsoleViewMessage.prototype | 1266 __proto__: WebInspector.ConsoleViewMessage.prototype |
1270 } | 1267 } |
OLD | NEW |