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

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

Issue 2449973005: DevTools: ConsoleViewMessage pass linkifier into formatting functions (Closed)
Patch Set: linkifier Created 4 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 flatValues.push(rowValue[columnNames[j]]); 177 flatValues.push(rowValue[columnNames[j]]);
178 } 178 }
179 columnNames.unshift(WebInspector.UIString("(index)")); 179 columnNames.unshift(WebInspector.UIString("(index)"));
180 180
181 if (flatValues.length) { 181 if (flatValues.length) {
182 this._dataGrid = WebInspector.SortableDataGrid.create(columnNames, f latValues); 182 this._dataGrid = WebInspector.SortableDataGrid.create(columnNames, f latValues);
183 183
184 var formattedResult = createElement("span"); 184 var formattedResult = createElement("span");
185 var tableElement = formattedResult.createChild("div", "console-messa ge-formatted-table"); 185 var tableElement = formattedResult.createChild("div", "console-messa ge-formatted-table");
186 var dataGridContainer = tableElement.createChild("span"); 186 var dataGridContainer = tableElement.createChild("span");
187 tableElement.appendChild(this._formatParameter(table, true)); 187 tableElement.appendChild(this._formatParameter(table, this._linkifie r, true));
188 dataGridContainer.appendChild(this._dataGrid.element); 188 dataGridContainer.appendChild(this._dataGrid.element);
189 formattedMessage.appendChild(formattedResult); 189 formattedMessage.appendChild(formattedResult);
190 this._dataGrid.renderInline(); 190 this._dataGrid.renderInline();
191 } 191 }
192 return formattedMessage; 192 return formattedMessage;
193 }, 193 },
194 194
195 /** 195 /**
196 * @return {!Element} 196 * @return {!Element}
197 */ 197 */
(...skipping 20 matching lines...) Expand all
218 var obj = consoleMessage.parameters ? consoleMessage.parameters[ 0] : undefined; 218 var obj = consoleMessage.parameters ? consoleMessage.parameters[ 0] : undefined;
219 var args = ["%O", obj]; 219 var args = ["%O", obj];
220 messageElement = this._format(args); 220 messageElement = this._format(args);
221 break; 221 break;
222 case WebInspector.ConsoleMessage.MessageType.Profile: 222 case WebInspector.ConsoleMessage.MessageType.Profile:
223 case WebInspector.ConsoleMessage.MessageType.ProfileEnd: 223 case WebInspector.ConsoleMessage.MessageType.ProfileEnd:
224 messageElement = this._format([consoleMessage.messageText]); 224 messageElement = this._format([consoleMessage.messageText]);
225 break; 225 break;
226 default: 226 default:
227 if (consoleMessage.parameters && consoleMessage.parameters.lengt h === 1 && consoleMessage.parameters[0].type === "string") 227 if (consoleMessage.parameters && consoleMessage.parameters.lengt h === 1 && consoleMessage.parameters[0].type === "string")
228 messageElement = this._tryFormatAsError(/** @type {string} * /(consoleMessage.parameters[0].value)); 228 messageElement = this._tryFormatAsError(/** @type {string} * /(consoleMessage.parameters[0].value), this._linkifier);
229 var args = consoleMessage.parameters || [consoleMessage.messageT ext]; 229 var args = consoleMessage.parameters || [consoleMessage.messageT ext];
230 messageElement = messageElement || this._format(args); 230 messageElement = messageElement || this._format(args);
231 } 231 }
232 } else if (consoleMessage.source === WebInspector.ConsoleMessage.Message Source.Network) { 232 } else if (consoleMessage.source === WebInspector.ConsoleMessage.Message Source.Network) {
233 if (consoleMessage.request) { 233 if (consoleMessage.request) {
234 messageElement = createElement("span"); 234 messageElement = createElement("span");
235 if (consoleMessage.level === WebInspector.ConsoleMessage.Message Level.Error || consoleMessage.level === WebInspector.ConsoleMessage.MessageLevel .RevokedError) { 235 if (consoleMessage.level === WebInspector.ConsoleMessage.Message Level.Error || consoleMessage.level === WebInspector.ConsoleMessage.MessageLevel .RevokedError) {
236 messageElement.createTextChildren(consoleMessage.request.req uestMethod, " "); 236 messageElement.createTextChildren(consoleMessage.request.req uestMethod, " ");
237 messageElement.appendChild(WebInspector.Linkifier.linkifyUsi ngRevealer(consoleMessage.request, consoleMessage.request.url, consoleMessage.re quest.url)); 237 messageElement.appendChild(WebInspector.Linkifier.linkifyUsi ngRevealer(consoleMessage.request, consoleMessage.request.url, consoleMessage.re quest.url));
238 if (consoleMessage.request.failed) 238 if (consoleMessage.request.failed)
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 if (parameters.length) 394 if (parameters.length)
395 formattedResult.createTextChild(" "); 395 formattedResult.createTextChild(" ");
396 } 396 }
397 397
398 // Single parameter, or unused substitutions from above. 398 // Single parameter, or unused substitutions from above.
399 for (var i = 0; i < parameters.length; ++i) { 399 for (var i = 0; i < parameters.length; ++i) {
400 // Inline strings when formatting. 400 // Inline strings when formatting.
401 if (shouldFormatMessage && parameters[i].type === "string") 401 if (shouldFormatMessage && parameters[i].type === "string")
402 formattedResult.appendChild(WebInspector.linkifyStringAsFragment (parameters[i].description)); 402 formattedResult.appendChild(WebInspector.linkifyStringAsFragment (parameters[i].description));
403 else 403 else
404 formattedResult.appendChild(this._formatParameter(parameters[i], false, true, showUndefinedsInArrays)); 404 formattedResult.appendChild(this._formatParameter(parameters[i], this._linkifier, false, true, showUndefinedsInArrays));
405 if (i < parameters.length - 1) 405 if (i < parameters.length - 1)
406 formattedResult.createTextChild(" "); 406 formattedResult.createTextChild(" ");
407 } 407 }
408 return formattedResult; 408 return formattedResult;
409 }, 409 },
410 410
411 /** 411 /**
412 * @param {!WebInspector.RemoteObject} output 412 * @param {!WebInspector.RemoteObject} output
413 * @param {!WebInspector.Linkifier} linkifier
413 * @param {boolean=} forceObjectFormat 414 * @param {boolean=} forceObjectFormat
414 * @param {boolean=} includePreview 415 * @param {boolean=} includePreview
415 * @param {boolean=} showUndefinedsInArrays 416 * @param {boolean=} showUndefinedsInArrays
416 * @return {!Element} 417 * @return {!Element}
417 */ 418 */
418 _formatParameter: function(output, forceObjectFormat, includePreview, showUn definedsInArrays) 419 _formatParameter: function(output, linkifier, forceObjectFormat, includePrev iew, showUndefinedsInArrays)
419 { 420 {
420 if (output.customPreview()) 421 if (output.customPreview())
421 return (new WebInspector.CustomPreviewComponent(output)).element; 422 return (new WebInspector.CustomPreviewComponent(output)).element;
422 423
423 var type = forceObjectFormat ? "object" : (output.subtype || output.type ); 424 var type = forceObjectFormat ? "object" : (output.subtype || output.type );
424 var element; 425 var element;
425 switch (type) { 426 switch (type) {
426 case "array": 427 case "array":
427 case "typedarray": 428 case "typedarray":
428 element = this._formatParameterAsArray(output, showUndefinedsInArray s); 429 element = this._formatParameterAsArray(output, linkifier, showUndefi nedsInArrays);
429 break; 430 break;
430 case "error": 431 case "error":
431 element = this._formatParameterAsError(output); 432 element = this._formatParameterAsError(output, linkifier);
432 break; 433 break;
433 case "function": 434 case "function":
434 case "generator": 435 case "generator":
435 element = this._formatParameterAsFunction(output, includePreview); 436 element = this._formatParameterAsFunction(output, includePreview);
436 break; 437 break;
437 case "iterator": 438 case "iterator":
438 case "map": 439 case "map":
439 case "object": 440 case "object":
440 case "promise": 441 case "promise":
441 case "proxy": 442 case "proxy":
442 case "set": 443 case "set":
443 element = this._formatParameterAsObject(output, includePreview); 444 element = this._formatParameterAsObject(output, linkifier, includePr eview);
444 break; 445 break;
445 case "node": 446 case "node":
446 element = this._formatParameterAsNode(output); 447 element = this._formatParameterAsNode(output, linkifier);
447 break; 448 break;
448 case "string": 449 case "string":
449 element = this._formatParameterAsString(output); 450 element = this._formatParameterAsString(output);
450 break; 451 break;
451 case "boolean": 452 case "boolean":
452 case "date": 453 case "date":
453 case "null": 454 case "null":
454 case "number": 455 case "number":
455 case "regexp": 456 case "regexp":
456 case "symbol": 457 case "symbol":
(...skipping 17 matching lines...) Expand all
474 { 475 {
475 var result = createElement("span"); 476 var result = createElement("span");
476 result.createTextChild(obj.description || ""); 477 result.createTextChild(obj.description || "");
477 if (obj.objectId) 478 if (obj.objectId)
478 result.addEventListener("contextmenu", this._contextMenuEventFired.b ind(this, obj), false); 479 result.addEventListener("contextmenu", this._contextMenuEventFired.b ind(this, obj), false);
479 return result; 480 return result;
480 }, 481 },
481 482
482 /** 483 /**
483 * @param {!WebInspector.RemoteObject} obj 484 * @param {!WebInspector.RemoteObject} obj
485 * @param {!WebInspector.Linkifier} linkifier
484 * @param {boolean=} includePreview 486 * @param {boolean=} includePreview
485 * @return {!Element} 487 * @return {!Element}
486 */ 488 */
487 _formatParameterAsObject: function(obj, includePreview) 489 _formatParameterAsObject: function(obj, linkifier, includePreview)
488 { 490 {
489 var titleElement = createElement("span"); 491 var titleElement = createElement("span");
490 if (includePreview && obj.preview) { 492 if (includePreview && obj.preview) {
491 titleElement.classList.add("console-object-preview"); 493 titleElement.classList.add("console-object-preview");
492 this._previewFormatter.appendObjectPreview(titleElement, obj.preview ); 494 this._previewFormatter.appendObjectPreview(titleElement, obj.preview );
493 } else if (obj.type === "function") { 495 } else if (obj.type === "function") {
494 WebInspector.ObjectPropertiesSection.formatObjectAsFunction(obj, tit leElement, false); 496 WebInspector.ObjectPropertiesSection.formatObjectAsFunction(obj, tit leElement, false);
495 titleElement.classList.add("object-value-function"); 497 titleElement.classList.add("object-value-function");
496 } else { 498 } else {
497 titleElement.createTextChild(obj.description || ""); 499 titleElement.createTextChild(obj.description || "");
498 } 500 }
499 501
500 var section = new WebInspector.ObjectPropertiesSection(obj, titleElement , this._linkifier); 502 var section = new WebInspector.ObjectPropertiesSection(obj, titleElement , linkifier);
501 section.element.classList.add("console-view-object-properties-section"); 503 section.element.classList.add("console-view-object-properties-section");
502 section.enableContextMenu(); 504 section.enableContextMenu();
503 return section.element; 505 return section.element;
504 }, 506 },
505 507
506 /** 508 /**
507 * @param {!WebInspector.RemoteObject} func 509 * @param {!WebInspector.RemoteObject} func
508 * @param {boolean=} includePreview 510 * @param {boolean=} includePreview
509 * @return {!Element} 511 * @return {!Element}
510 */ 512 */
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 _renderPropertyPreviewOrAccessor: function(object, propertyPath) 552 _renderPropertyPreviewOrAccessor: function(object, propertyPath)
551 { 553 {
552 var property = propertyPath.peekLast(); 554 var property = propertyPath.peekLast();
553 if (property.type === "accessor") 555 if (property.type === "accessor")
554 return this._formatAsAccessorProperty(object, propertyPath.map(prope rty => property.name), false); 556 return this._formatAsAccessorProperty(object, propertyPath.map(prope rty => property.name), false);
555 return this._previewFormatter.renderPropertyPreview(property.type, /** @ type {string} */ (property.subtype), property.value); 557 return this._previewFormatter.renderPropertyPreview(property.type, /** @ type {string} */ (property.subtype), property.value);
556 }, 558 },
557 559
558 /** 560 /**
559 * @param {!WebInspector.RemoteObject} object 561 * @param {!WebInspector.RemoteObject} object
562 * @param {!WebInspector.Linkifier} linkifier
560 * @return {!Element} 563 * @return {!Element}
561 */ 564 */
562 _formatParameterAsNode: function(object) 565 _formatParameterAsNode: function(object, linkifier)
563 { 566 {
564 var result = createElement("span"); 567 var result = createElement("span");
565 WebInspector.Renderer.renderPromise(object).then(appendRenderer.bind(thi s), failedToRender.bind(this)); 568 WebInspector.Renderer.renderPromise(object).then(appendRenderer.bind(thi s), failedToRender.bind(this));
566 return result; 569 return result;
567 570
568 /** 571 /**
569 * @param {!Element} rendererElement 572 * @param {!Element} rendererElement
570 * @this {WebInspector.ConsoleViewMessage} 573 * @this {WebInspector.ConsoleViewMessage}
571 */ 574 */
572 function appendRenderer(rendererElement) 575 function appendRenderer(rendererElement)
573 { 576 {
574 result.appendChild(rendererElement); 577 result.appendChild(rendererElement);
575 this._formattedParameterAsNodeForTest(); 578 this._formattedParameterAsNodeForTest();
576 } 579 }
577 580
578 /** 581 /**
579 * @this {WebInspector.ConsoleViewMessage} 582 * @this {WebInspector.ConsoleViewMessage}
580 */ 583 */
581 function failedToRender() 584 function failedToRender()
582 { 585 {
583 result.appendChild(this._formatParameterAsObject(object, false)); 586 result.appendChild(this._formatParameterAsObject(object, linkifier, false));
584 } 587 }
585 }, 588 },
586 589
587 _formattedParameterAsNodeForTest: function() 590 _formattedParameterAsNodeForTest: function()
588 { 591 {
589 }, 592 },
590 593
591 /** 594 /**
592 * @param {!WebInspector.RemoteObject} array 595 * @param {!WebInspector.RemoteObject} array
596 * @param {!WebInspector.Linkifier} linkifier
593 * @param {boolean=} showUndefinedsInArrays 597 * @param {boolean=} showUndefinedsInArrays
594 * @return {!Element} 598 * @return {!Element}
595 */ 599 */
596 _formatParameterAsArray: function(array, showUndefinedsInArrays) 600 _formatParameterAsArray: function(array, linkifier, showUndefinedsInArrays)
597 { 601 {
598 var isLongArray = array.arrayLength() > 100; 602 var isLongArray = array.arrayLength() > 100;
599 if (!showUndefinedsInArrays || isLongArray) 603 if (!showUndefinedsInArrays || isLongArray)
600 return this._formatParameterAsObject(array, !showUndefinedsInArrays || !isLongArray); 604 return this._formatParameterAsObject(array, linkifier, !showUndefine dsInArrays || !isLongArray);
601 var result = createElement("span"); 605 var result = createElement("span");
602 array.getAllProperties(false, printArrayResult.bind(this)); 606 array.getAllProperties(false, printArrayResult.bind(this));
603 return result; 607 return result;
604 608
605 /** 609 /**
606 * @param {?Array.<!WebInspector.RemoteObjectProperty>} properties 610 * @param {?Array.<!WebInspector.RemoteObjectProperty>} properties
607 * @this {!WebInspector.ConsoleViewMessage} 611 * @this {!WebInspector.ConsoleViewMessage}
608 */ 612 */
609 function printArrayResult(properties) 613 function printArrayResult(properties)
610 { 614 {
611 if (!properties) { 615 if (!properties) {
612 result.appendChild(this._formatParameterAsObject(array, false)); 616 result.appendChild(this._formatParameterAsObject(array, linkifie r, false));
613 return; 617 return;
614 } 618 }
615 619
616 var titleElement = createElement("span"); 620 var titleElement = createElement("span");
617 var elements = {}; 621 var elements = {};
618 for (var i = 0; i < properties.length; ++i) { 622 for (var i = 0; i < properties.length; ++i) {
619 var property = properties[i]; 623 var property = properties[i];
620 var name = property.name; 624 var name = property.name;
621 if (isNaN(name)) 625 if (isNaN(name))
622 continue; 626 continue;
(...skipping 27 matching lines...) Expand all
650 654
651 titleElement.appendChild(element); 655 titleElement.appendChild(element);
652 lastNonEmptyIndex = i; 656 lastNonEmptyIndex = i;
653 if (i < length - 1) 657 if (i < length - 1)
654 titleElement.createTextChild(", "); 658 titleElement.createTextChild(", ");
655 } 659 }
656 appendUndefined(titleElement, length); 660 appendUndefined(titleElement, length);
657 661
658 titleElement.createTextChild("]"); 662 titleElement.createTextChild("]");
659 663
660 var section = new WebInspector.ObjectPropertiesSection(array, titleE lement, this._linkifier); 664 var section = new WebInspector.ObjectPropertiesSection(array, titleE lement, linkifier);
661 section.element.classList.add("console-view-object-properties-sectio n"); 665 section.element.classList.add("console-view-object-properties-sectio n");
662 section.enableContextMenu(); 666 section.enableContextMenu();
663 result.appendChild(section.element); 667 result.appendChild(section.element);
664 } 668 }
665 }, 669 },
666 670
667 /** 671 /**
668 * @param {!WebInspector.RemoteObject} output 672 * @param {!WebInspector.RemoteObject} output
669 * @return {!Element} 673 * @return {!Element}
670 */ 674 */
671 _formatParameterAsString: function(output) 675 _formatParameterAsString: function(output)
672 { 676 {
673 var span = createElement("span"); 677 var span = createElement("span");
674 span.appendChild(WebInspector.linkifyStringAsFragment(output.description || "")); 678 span.appendChild(WebInspector.linkifyStringAsFragment(output.description || ""));
675 679
676 var result = createElement("span"); 680 var result = createElement("span");
677 result.createChild("span", "object-value-string-quote").textContent = "\ ""; 681 result.createChild("span", "object-value-string-quote").textContent = "\ "";
678 result.appendChild(span); 682 result.appendChild(span);
679 result.createChild("span", "object-value-string-quote").textContent = "\ ""; 683 result.createChild("span", "object-value-string-quote").textContent = "\ "";
680 return result; 684 return result;
681 }, 685 },
682 686
683 /** 687 /**
684 * @param {!WebInspector.RemoteObject} output 688 * @param {!WebInspector.RemoteObject} output
689 * @param {!WebInspector.Linkifier} linkifier
685 * @return {!Element} 690 * @return {!Element}
686 */ 691 */
687 _formatParameterAsError: function(output) 692 _formatParameterAsError: function(output, linkifier)
688 { 693 {
689 var result = createElement("span"); 694 var result = createElement("span");
690 var errorSpan = this._tryFormatAsError(output.description || ""); 695 var errorSpan = this._tryFormatAsError(output.description || "", linkifi er);
691 result.appendChild(errorSpan ? errorSpan : WebInspector.linkifyStringAsF ragment(output.description || "")); 696 result.appendChild(errorSpan ? errorSpan : WebInspector.linkifyStringAsF ragment(output.description || ""));
692 return result; 697 return result;
693 }, 698 },
694 699
695 /** 700 /**
696 * @param {!WebInspector.RemoteObject} output 701 * @param {!WebInspector.RemoteObject} output
697 * @return {!Element} 702 * @return {!Element}
698 */ 703 */
699 _formatAsArrayEntry: function(output) 704 _formatAsArrayEntry: function(output)
700 { 705 {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 var formatters = {}; 762 var formatters = {};
758 763
759 /** 764 /**
760 * @param {boolean} force 765 * @param {boolean} force
761 * @param {!WebInspector.RemoteObject} obj 766 * @param {!WebInspector.RemoteObject} obj
762 * @return {!Element} 767 * @return {!Element}
763 * @this {WebInspector.ConsoleViewMessage} 768 * @this {WebInspector.ConsoleViewMessage}
764 */ 769 */
765 function parameterFormatter(force, obj) 770 function parameterFormatter(force, obj)
766 { 771 {
767 return this._formatParameter(obj, force, false, showUndefinedsInArra ys); 772 return this._formatParameter(obj, this._linkifier, force, false, sho wUndefinedsInArrays);
768 } 773 }
769 774
770 function stringFormatter(obj) 775 function stringFormatter(obj)
771 { 776 {
772 return obj.description; 777 return obj.description;
773 } 778 }
774 779
775 function floatFormatter(obj) 780 function floatFormatter(obj)
776 { 781 {
777 if (typeof obj.value !== "number") 782 if (typeof obj.value !== "number")
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 /** 1110 /**
1106 * @return {!Element} 1111 * @return {!Element}
1107 */ 1112 */
1108 searchHighlightNode: function(index) 1113 searchHighlightNode: function(index)
1109 { 1114 {
1110 return this._searchHighlightNodes[index]; 1115 return this._searchHighlightNodes[index];
1111 }, 1116 },
1112 1117
1113 /** 1118 /**
1114 * @param {string} string 1119 * @param {string} string
1120 * @param {!WebInspector.Linkifier} linkifier
1115 * @return {?Element} 1121 * @return {?Element}
1116 */ 1122 */
1117 _tryFormatAsError: function(string) 1123 _tryFormatAsError: function(string, linkifier)
1118 { 1124 {
1119 /** 1125 /**
1120 * @param {string} prefix 1126 * @param {string} prefix
1121 */ 1127 */
1122 function startsWith(prefix) 1128 function startsWith(prefix)
1123 { 1129 {
1124 return string.startsWith(prefix); 1130 return string.startsWith(prefix);
1125 } 1131 }
1126 1132
1127 var errorPrefixes = ["EvalError", "ReferenceError", "SyntaxError", "Type Error", "RangeError", "Error", "URIError"]; 1133 var errorPrefixes = ["EvalError", "ReferenceError", "SyntaxError", "Type Error", "RangeError", "Error", "URIError"];
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 links.push({url: url, positionLeft: position + left, positionRight: position + right, lineNumber: splitResult.lineNumber, columnNumber: splitResult. columnNumber}); 1179 links.push({url: url, positionLeft: position + left, positionRight: position + right, lineNumber: splitResult.lineNumber, columnNumber: splitResult. columnNumber});
1174 } 1180 }
1175 1181
1176 if (!links.length) 1182 if (!links.length)
1177 return null; 1183 return null;
1178 1184
1179 var formattedResult = createElement("span"); 1185 var formattedResult = createElement("span");
1180 var start = 0; 1186 var start = 0;
1181 for (var i = 0; i < links.length; ++i) { 1187 for (var i = 0; i < links.length; ++i) {
1182 formattedResult.appendChild(WebInspector.linkifyStringAsFragment(str ing.substring(start, links[i].positionLeft))); 1188 formattedResult.appendChild(WebInspector.linkifyStringAsFragment(str ing.substring(start, links[i].positionLeft)));
1183 formattedResult.appendChild(this._linkifier.linkifyScriptLocation(ta rget, null, links[i].url, links[i].lineNumber, links[i].columnNumber)); 1189 formattedResult.appendChild(linkifier.linkifyScriptLocation(target, null, links[i].url, links[i].lineNumber, links[i].columnNumber));
1184 start = links[i].positionRight; 1190 start = links[i].positionRight;
1185 } 1191 }
1186 1192
1187 if (start !== string.length) 1193 if (start !== string.length)
1188 formattedResult.appendChild(WebInspector.linkifyStringAsFragment(str ing.substring(start))); 1194 formattedResult.appendChild(WebInspector.linkifyStringAsFragment(str ing.substring(start)));
1189 1195
1190 return formattedResult; 1196 return formattedResult;
1191 } 1197 }
1192 }; 1198 };
1193 1199
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 { 1238 {
1233 if (!this._element) { 1239 if (!this._element) {
1234 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); 1240 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this );
1235 this._element.classList.toggle("collapsed", this._collapsed); 1241 this._element.classList.toggle("collapsed", this._collapsed);
1236 } 1242 }
1237 return this._element; 1243 return this._element;
1238 }, 1244 },
1239 1245
1240 __proto__: WebInspector.ConsoleViewMessage.prototype 1246 __proto__: WebInspector.ConsoleViewMessage.prototype
1241 }; 1247 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698