Type: "a\"b" in console Expected output: "a"b" Actual output: "a\"b"
Created attachment 45061 [details] [PATCH] Proposed fix
style-queue ran check-webkit-style on attachment 45061 [details] without any errors.
You expected the output to be "a"b"? That is not copy + paste-able. Could you explain a little about why you expected to see that? My thoughts are that, for primitives, the output is copy+paste-able values. Much like JSON.stringify(...). In your case I can think of other solutions that might appease us both: - make the quotes on the edges different to denote they are not part of the output. - remove the artificially added quotes, and output values in color so it is immediately obvious that it is a string. (We already have styles for JavaScript and CSS, we might be able to carry over the same styles).
Couple weak arguments that make me think it is worth committing: 1) Messages are for humans, not for pasting them somewhere. 2) I like when console acts in a feature & bug-compatible way with Firebug. It might be based on the feedback in their case.
(In reply to comment #3) > You expected the output to be "a"b"? That is not copy + paste-able. Could you > explain a little about why you expected to see that? My thoughts are that, for > primitives, the output is copy+paste-able values. Much like > JSON.stringify(...). > > In your case I can think of other solutions that might appease us both: > - make the quotes on the edges different to denote they are not part of the > output. > - remove the artificially added quotes, and output values in color so it is > immediately obvious that it is a string. (We already have styles for JavaScript > and CSS, we might be able to carry over the same styles). Now that I've read it to the end, I agree that we should do either of these :) Let me play with it.
Created attachment 45429 [details] [IMAGE] Added some color to the console. Patch will follow shortly.
Created attachment 45434 [details] [PATCH] Proposed fix.
style-queue ran check-webkit-style on attachment 45434 [details] without any errors.
Committing to http://svn.webkit.org/repository/webkit/trunk ... M LayoutTests/ChangeLog M LayoutTests/inspector/console-format-expected.txt M LayoutTests/inspector/console-format.html M WebCore/ChangeLog M WebCore/inspector/InspectorController.cpp M WebCore/inspector/front-end/ConsoleView.js M WebCore/inspector/front-end/InjectedScript.js M WebCore/inspector/front-end/ObjectPropertiesSection.js M WebCore/inspector/front-end/ObjectProxy.js M WebCore/inspector/front-end/inspector.css Committed r52544