| 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 if (this._message.source !== ConsoleModel.ConsoleMessage.MessageSource.Netwo
rk || this._message.request) { | 277 if (this._message.source !== ConsoleModel.ConsoleMessage.MessageSource.Netwo
rk || this._message.request) { |
| 278 if (this._message.scriptId) { | 278 if (this._message.scriptId) { |
| 279 anchorElement = this._linkifyScriptId( | 279 anchorElement = this._linkifyScriptId( |
| 280 this._message.scriptId, this._message.url || '', this._message.line,
this._message.column); | 280 this._message.scriptId, this._message.url || '', this._message.line,
this._message.column); |
| 281 } else if (this._message.stackTrace && this._message.stackTrace.callFrames
.length) { | 281 } else if (this._message.stackTrace && this._message.stackTrace.callFrames
.length) { |
| 282 anchorElement = this._linkifyStackTraceTopFrame(this._message.stackTrace
); | 282 anchorElement = this._linkifyStackTraceTopFrame(this._message.stackTrace
); |
| 283 } else if (this._message.url && this._message.url !== 'undefined') { | 283 } else if (this._message.url && this._message.url !== 'undefined') { |
| 284 anchorElement = this._linkifyLocation(this._message.url, this._message.l
ine, this._message.column); | 284 anchorElement = this._linkifyLocation(this._message.url, this._message.l
ine, this._message.column); |
| 285 } | 285 } |
| 286 } else if (this._message.url) { | 286 } else if (this._message.url) { |
| 287 anchorElement = Components.Linkifier.linkifyURL(this._message.url, undefin
ed); | 287 anchorElement = Components.Linkifier.linkifyURL( |
| 288 this._message.url, undefined, undefined, undefined, undefined, undefin
ed, |
| 289 Console.ConsoleViewMessage.MaxLengthForLinks); |
| 288 } | 290 } |
| 289 | 291 |
| 290 // Append a space to prevent the anchor text from being glued to the console
message when the user selects and copies the console messages. | 292 // Append a space to prevent the anchor text from being glued to the console
message when the user selects and copies the console messages. |
| 291 if (anchorElement) { | 293 if (anchorElement) { |
| 292 var anchorWrapperElement = createElementWithClass('span', 'console-message
-anchor'); | 294 var anchorWrapperElement = createElementWithClass('span', 'console-message
-anchor'); |
| 293 anchorWrapperElement.appendChild(anchorElement); | 295 anchorWrapperElement.appendChild(anchorElement); |
| 294 anchorWrapperElement.createTextChild(' '); | 296 anchorWrapperElement.createTextChild(' '); |
| 295 return anchorWrapperElement; | 297 return anchorWrapperElement; |
| 296 } | 298 } |
| 297 return null; | 299 return null; |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1269 toMessageElement() { | 1271 toMessageElement() { |
| 1270 if (!this._element) { | 1272 if (!this._element) { |
| 1271 super.toMessageElement(); | 1273 super.toMessageElement(); |
| 1272 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); | 1274 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); |
| 1273 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem
ent.firstChild); | 1275 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem
ent.firstChild); |
| 1274 this.setCollapsed(this._collapsed); | 1276 this.setCollapsed(this._collapsed); |
| 1275 } | 1277 } |
| 1276 return this._element; | 1278 return this._element; |
| 1277 } | 1279 } |
| 1278 }; | 1280 }; |
| 1281 |
| 1282 /** |
| 1283 * @const |
| 1284 * @type {number} |
| 1285 */ |
| 1286 Console.ConsoleViewMessage.MaxLengthForLinks = 40; |
| OLD | NEW |