Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js

Issue 2902273002: DevTools: convert linkifyURL params into options object (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
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( 287 anchorElement = Components.Linkifier.linkifyURL(
288 this._message.url, undefined, undefined, undefined, undefined, undefin ed, 288 {url: this._message.url, maxLength: Console.ConsoleViewMessage.MaxLeng thForLinks});
289 Console.ConsoleViewMessage.MaxLengthForLinks);
290 } 289 }
291 290
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 // Append a space to prevent the anchor text from being glued to the console message when the user selects and copies the console messages.
293 if (anchorElement) { 292 if (anchorElement) {
294 var anchorWrapperElement = createElementWithClass('span', 'console-message -anchor'); 293 var anchorWrapperElement = createElementWithClass('span', 'console-message -anchor');
295 anchorWrapperElement.appendChild(anchorElement); 294 anchorWrapperElement.appendChild(anchorElement);
296 anchorWrapperElement.createTextChild(' '); 295 anchorWrapperElement.createTextChild(' ');
297 return anchorWrapperElement; 296 return anchorWrapperElement;
298 } 297 }
299 return null; 298 return null;
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 } 1276 }
1278 return this._element; 1277 return this._element;
1279 } 1278 }
1280 }; 1279 };
1281 1280
1282 /** 1281 /**
1283 * @const 1282 * @const
1284 * @type {number} 1283 * @type {number}
1285 */ 1284 */
1286 Console.ConsoleViewMessage.MaxLengthForLinks = 40; 1285 Console.ConsoleViewMessage.MaxLengthForLinks = 40;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698