| 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 }, | 270 }, |
| 271 | 271 |
| 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) |
| 281 return null; | 281 return null; |
| 282 // FIXME(62725): stack trace line/column numbers are one-based. | 282 // FIXME(62725): stack trace line/column numbers are one-based. |
| 283 var lineNumber = callFrame.lineNumber ? callFrame.lineNumber - 1 : 0; | 283 var lineNumber = callFrame.lineNumber ? callFrame.lineNumber - 1 : 0; |
| 284 var columnNumber = callFrame.columnNumber ? callFrame.columnNumber - 1 :
0; | 284 var columnNumber = callFrame.columnNumber ? callFrame.columnNumber - 1 :
0; |
| 285 var rawLocation = new WebInspector.DebuggerModel.Location(target, callFr
ame.scriptId, lineNumber, columnNumber); | 285 return this._linkifier.linkifyLocationByScriptId(target, callFrame.scrip
tId, callFrame.url, lineNumber, columnNumber, "console-message-url"); |
| 286 return this._linkifier.linkifyRawLocation(rawLocation, "console-message-
url"); | |
| 287 }, | 286 }, |
| 288 | 287 |
| 289 /** | 288 /** |
| 290 * @param {?Array.<!ConsoleAgent.CallFrame>} stackTrace | 289 * @param {?Array.<!ConsoleAgent.CallFrame>} stackTrace |
| 291 * @return {?ConsoleAgent.CallFrame} | 290 * @return {?ConsoleAgent.CallFrame} |
| 292 */ | 291 */ |
| 293 _callFrameAnchorFromStackTrace: function(stackTrace) | 292 _callFrameAnchorFromStackTrace: function(stackTrace) |
| 294 { | 293 { |
| 295 if (!stackTrace || !stackTrace.length) | 294 if (!stackTrace || !stackTrace.length) |
| 296 return null; | 295 return null; |
| (...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 { | 1260 { |
| 1262 if (!this._wrapperElement) { | 1261 if (!this._wrapperElement) { |
| 1263 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); | 1262 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); |
| 1264 this._wrapperElement.classList.toggle("collapsed", this._collapsed); | 1263 this._wrapperElement.classList.toggle("collapsed", this._collapsed); |
| 1265 } | 1264 } |
| 1266 return this._wrapperElement; | 1265 return this._wrapperElement; |
| 1267 }, | 1266 }, |
| 1268 | 1267 |
| 1269 __proto__: WebInspector.ConsoleViewMessage.prototype | 1268 __proto__: WebInspector.ConsoleViewMessage.prototype |
| 1270 } | 1269 } |
| OLD | NEW |