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

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

Powered by Google App Engine
This is Rietveld 408576698