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

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

Issue 2571713005: DevTools: untruncate links on console export (Closed)
Patch Set: rebase Created 3 years, 11 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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 * @param {!Common.OutputStream} stream 657 * @param {!Common.OutputStream} stream
658 * @param {string=} error 658 * @param {string=} error
659 * @this {Console.ConsoleView} 659 * @this {Console.ConsoleView}
660 */ 660 */
661 function writeNextChunk(stream, error) { 661 function writeNextChunk(stream, error) {
662 if (messageIndex >= this.itemCount() || error) { 662 if (messageIndex >= this.itemCount() || error) {
663 stream.close(); 663 stream.close();
664 progressIndicator.done(); 664 progressIndicator.done();
665 return; 665 return;
666 } 666 }
667 var lines = []; 667 var messageContents = [];
668 for (var i = 0; i < chunkSize && i + messageIndex < this.itemCount(); ++i) { 668 for (var i = 0; i < chunkSize && i + messageIndex < this.itemCount(); ++i) {
669 var message = this.itemElement(messageIndex + i); 669 var message = this.itemElement(messageIndex + i);
670 var messageContent = message.contentElement().deepTextContent(); 670 messageContents.push(message.toExportString());
671 for (var j = 0; j < message.repeatCount(); ++j)
672 lines.push(messageContent);
673 } 671 }
674 messageIndex += i; 672 messageIndex += i;
675 stream.write(lines.join('\n') + '\n', writeNextChunk.bind(this)); 673 stream.write(messageContents.join('\n') + '\n', writeNextChunk.bind(this)) ;
676 progressIndicator.setWorked(messageIndex); 674 progressIndicator.setWorked(messageIndex);
677 } 675 }
678 } 676 }
679 677
680 /** 678 /**
681 * @param {!Console.ConsoleViewMessage} lastMessage 679 * @param {!Console.ConsoleViewMessage} lastMessage
682 * @param {?Console.ConsoleViewMessage=} viewMessage 680 * @param {?Console.ConsoleViewMessage=} viewMessage
683 * @return {boolean} 681 * @return {boolean}
684 */ 682 */
685 _tryToCollapseMessages(lastMessage, viewMessage) { 683 _tryToCollapseMessages(lastMessage, viewMessage) {
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 return true; 1334 return true;
1337 } 1335 }
1338 return false; 1336 return false;
1339 } 1337 }
1340 }; 1338 };
1341 1339
1342 /** 1340 /**
1343 * @typedef {{messageIndex: number, matchIndex: number}} 1341 * @typedef {{messageIndex: number, matchIndex: number}}
1344 */ 1342 */
1345 Console.ConsoleView.RegexMatchRange; 1343 Console.ConsoleView.RegexMatchRange;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698