Chromium Code Reviews| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 247 /** | 247 /** |
| 248 * @param {!ConsoleAgent.CallFrame} callFrame | 248 * @param {!ConsoleAgent.CallFrame} callFrame |
| 249 * @return {Element} | 249 * @return {Element} |
| 250 */ | 250 */ |
| 251 _linkifyCallFrame: function(callFrame) | 251 _linkifyCallFrame: function(callFrame) |
| 252 { | 252 { |
| 253 // FIXME(62725): stack trace line/column numbers are one-based. | 253 // FIXME(62725): stack trace line/column numbers are one-based. |
| 254 var lineNumber = callFrame.lineNumber ? callFrame.lineNumber - 1 : 0; | 254 var lineNumber = callFrame.lineNumber ? callFrame.lineNumber - 1 : 0; |
| 255 var columnNumber = callFrame.columnNumber ? callFrame.columnNumber - 1 : 0; | 255 var columnNumber = callFrame.columnNumber ? callFrame.columnNumber - 1 : 0; |
| 256 var rawLocation = new WebInspector.DebuggerModel.Location(callFrame.scri ptId, lineNumber, columnNumber); | 256 var rawLocation = new WebInspector.DebuggerModel.Location(callFrame.scri ptId, lineNumber, columnNumber); |
| 257 return this._linkifier.linkifyRawLocation(rawLocation, "console-message- url"); | 257 var linkElement = this._linkifier.linkifyRawLocation(rawLocation, "conso le-message-url"); |
| 258 return linkElement ? linkElement : this._linkifyLocation(callFrame.url, callFrame.lineNumber, callFrame.columnNumber); | |
|
pfeldman
2013/09/05 11:42:10
I've seen this in another patch.
| |
| 258 }, | 259 }, |
| 259 | 260 |
| 260 /** | 261 /** |
| 261 * @return {boolean} | 262 * @return {boolean} |
| 262 */ | 263 */ |
| 263 isErrorOrWarning: function() | 264 isErrorOrWarning: function() |
| 264 { | 265 { |
| 265 return (this.level === WebInspector.ConsoleMessage.MessageLevel.Warning || this.level === WebInspector.ConsoleMessage.MessageLevel.Error); | 266 return (this.level === WebInspector.ConsoleMessage.MessageLevel.Warning || this.level === WebInspector.ConsoleMessage.MessageLevel.Error); |
| 266 }, | 267 }, |
| 267 | 268 |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 967 /** | 968 /** |
| 968 * @return {WebInspector.ConsoleMessage} | 969 * @return {WebInspector.ConsoleMessage} |
| 969 */ | 970 */ |
| 970 clone: function() | 971 clone: function() |
| 971 { | 972 { |
| 972 return WebInspector.ConsoleMessage.create(this.source, this.level, this. _messageText, this.type, this.url, this.line, this.column, this.repeatCount, thi s._parameters, this._stackTrace, this._request ? this._request.requestId : undef ined, this._isOutdated); | 973 return WebInspector.ConsoleMessage.create(this.source, this.level, this. _messageText, this.type, this.url, this.line, this.column, this.repeatCount, thi s._parameters, this._stackTrace, this._request ? this._request.requestId : undef ined, this._isOutdated); |
| 973 }, | 974 }, |
| 974 | 975 |
| 975 __proto__: WebInspector.ConsoleMessage.prototype | 976 __proto__: WebInspector.ConsoleMessage.prototype |
| 976 } | 977 } |
| OLD | NEW |