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

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: rebase and ac 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.source !== ConsoleModel.ConsoleMessage.MessageSource.Netwo rk || this._message.request) { 278 if (this._message.source !== ConsoleModel.ConsoleMessage.MessageSource.Netwo rk || this._message.request) {
279 if (this._message.scriptId) { 279 if (this._message.scriptId) {
280 anchorElement = this._linkifyScriptId( 280 anchorElement = this._linkifyScriptId(
281 this._message.scriptId, this._message.url || '', this._message.line, this._message.column); 281 this._message.scriptId, this._message.url || '', this._message.line, this._message.column);
282 } else if (this._message.stackTrace && this._message.stackTrace.callFrames .length) { 282 } else if (this._message.stackTrace && this._message.stackTrace.callFrames .length) {
283 anchorElement = this._linkifyStackTraceTopFrame(this._message.stackTrace ); 283 anchorElement = this._linkifyStackTraceTopFrame(this._message.stackTrace );
284 } else if (this._message.url && this._message.url !== 'undefined') { 284 } else if (this._message.url && this._message.url !== 'undefined') {
285 anchorElement = this._linkifyLocation(this._message.url, this._message.l ine, this._message.column); 285 anchorElement = this._linkifyLocation(this._message.url, this._message.l ine, this._message.column);
286 } 286 }
287 } else if (this._message.url) { 287 } else if (this._message.url) {
288 anchorElement = Components.Linkifier.linkifyURL( 288 anchorElement =
289 this._message.url, undefined, undefined, undefined, undefined, undefin ed, 289 Components.Linkifier.linkifyURL(this._message.url, {maxLength: Console .ConsoleViewMessage.MaxLengthForLinks});
290 Console.ConsoleViewMessage.MaxLengthForLinks);
291 } 290 }
292 291
293 // 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.
294 if (anchorElement) { 293 if (anchorElement) {
295 var anchorWrapperElement = createElementWithClass('span', 'console-message -anchor'); 294 var anchorWrapperElement = createElementWithClass('span', 'console-message -anchor');
296 anchorWrapperElement.appendChild(anchorElement); 295 anchorWrapperElement.appendChild(anchorElement);
297 anchorWrapperElement.createTextChild(' '); 296 anchorWrapperElement.createTextChild(' ');
298 return anchorWrapperElement; 297 return anchorWrapperElement;
299 } 298 }
300 return null; 299 return null;
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 } 1277 }
1279 return this._element; 1278 return this._element;
1280 } 1279 }
1281 }; 1280 };
1282 1281
1283 /** 1282 /**
1284 * @const 1283 * @const
1285 * @type {number} 1284 * @type {number}
1286 */ 1285 */
1287 Console.ConsoleViewMessage.MaxLengthForLinks = 40; 1286 Console.ConsoleViewMessage.MaxLengthForLinks = 40;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698