Title: [194151] trunk/Source/WebInspectorUI
- Revision
- 194151
- Author
- [email protected]
- Date
- 2015-12-16 09:44:10 -0800 (Wed, 16 Dec 2015)
Log Message
Web Inspector: Improve copy of console messages with multiple arguments - console.log(obj1, obj2)
https://bugs.webkit.org/show_bug.cgi?id=152330
Patch by Joseph Pecoraro <[email protected]> on 2015-12-16
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype.toClipboardString):
Copy the inner text of the extra arguments list as well, for
console messages with multiple objects. Rearrange the sections
that, if there is a stack trace it comes at the end after
multiple arguments. If there is no stack trace, include the
location info next to the top line, before multiple arguments.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (194150 => 194151)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-12-16 17:42:11 UTC (rev 194150)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-12-16 17:44:10 UTC (rev 194151)
@@ -1,5 +1,20 @@
2015-12-16 Joseph Pecoraro <[email protected]>
+ Web Inspector: Improve copy of console messages with multiple arguments - console.log(obj1, obj2)
+ https://bugs.webkit.org/show_bug.cgi?id=152330
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/ConsoleMessageView.js:
+ (WebInspector.ConsoleMessageView.prototype.toClipboardString):
+ Copy the inner text of the extra arguments list as well, for
+ console messages with multiple objects. Rearrange the sections
+ that, if there is a stack trace it comes at the end after
+ multiple arguments. If there is no stack trace, include the
+ location info next to the top line, before multiple arguments.
+
+2015-12-16 Joseph Pecoraro <[email protected]>
+
Web Inspector: Improve copy of console message containing Array and Map output
https://bugs.webkit.org/show_bug.cgi?id=152329
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js (194150 => 194151)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js 2015-12-16 17:42:11 UTC (rev 194150)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js 2015-12-16 17:44:10 UTC (rev 194151)
@@ -193,13 +193,7 @@
clipboardString = "console.trace()";
let hasStackTrace = this._shouldShowStackTrace();
- if (hasStackTrace) {
- this._message.stackTrace.callFrames.forEach(function(frame) {
- clipboardString += "\n\t" + (frame.functionName || WebInspector.UIString("(anonymous function)"));
- if (frame.sourceCodeLocation)
- clipboardString += " (" + frame.sourceCodeLocation.originalLocationString() + ")";
- });
- } else {
+ if (!hasStackTrace) {
let repeatString = this.repeatCount > 1 ? "x" + this.repeatCount : "";
let urlLine = "";
if (this._message.url) {
@@ -217,6 +211,17 @@
}
}
+ if (this._extraElementsList)
+ clipboardString += "\n" + this._extraElementsList.innerText.removeWordBreakCharacters().trim();
+
+ if (hasStackTrace) {
+ this._message.stackTrace.callFrames.forEach(function(frame) {
+ clipboardString += "\n\t" + (frame.functionName || WebInspector.UIString("(anonymous function)"));
+ if (frame.sourceCodeLocation)
+ clipboardString += " (" + frame.sourceCodeLocation.originalLocationString() + ")";
+ });
+ }
+
if (!isPrefixOptional || this._enforcesClipboardPrefixString())
return this._clipboardPrefixString() + clipboardString;
return clipboardString;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes