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

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

Issue 2644753002: DevTools: untruncate links on copy (Closed)
Patch Set: ac Created 3 years, 8 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 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 return this._message.messageText; 1059 return this._message.messageText;
1060 } 1060 }
1061 1061
1062 /** 1062 /**
1063 * @return {string} 1063 * @return {string}
1064 */ 1064 */
1065 toExportString() { 1065 toExportString() {
1066 var lines = []; 1066 var lines = [];
1067 var nodes = this.contentElement().childTextNodes(); 1067 var nodes = this.contentElement().childTextNodes();
1068 var messageContent = ''; 1068 var messageContent = '';
1069 for (var i = 0; i < nodes.length; ++i) { 1069 for (var i = 0; i < nodes.length; ++i)
1070 var originalLinkText = Components.Linkifier.originalLinkText(nodes[i].pare ntElement); 1070 messageContent += Components.DOMPresentationUtils.originalNodeText(nodes[i ]);
1071 messageContent += typeof originalLinkText === 'string' ? originalLinkText : nodes[i].textContent;
1072 }
1073 for (var i = 0; i < this.repeatCount(); ++i) 1071 for (var i = 0; i < this.repeatCount(); ++i)
1074 lines.push(messageContent); 1072 lines.push(messageContent);
1075 return lines.join('\n'); 1073 return lines.join('\n');
1076 } 1074 }
1077 1075
1078 /** 1076 /**
1079 * @param {?RegExp} regex 1077 * @param {?RegExp} regex
1080 */ 1078 */
1081 setSearchRegex(regex) { 1079 setSearchRegex(regex) {
1082 if (this._searchHiglightNodeChanges && this._searchHiglightNodeChanges.lengt h) 1080 if (this._searchHiglightNodeChanges && this._searchHiglightNodeChanges.lengt h)
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 toMessageElement() { 1245 toMessageElement() {
1248 if (!this._element) { 1246 if (!this._element) {
1249 super.toMessageElement(); 1247 super.toMessageElement();
1250 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); 1248 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon');
1251 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem ent.firstChild); 1249 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem ent.firstChild);
1252 this.setCollapsed(this._collapsed); 1250 this.setCollapsed(this._collapsed);
1253 } 1251 }
1254 return this._element; 1252 return this._element;
1255 } 1253 }
1256 }; 1254 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698