* Summary Web Inspector: Should be able to evaluate "{a:1, b:2}" in the console * Notes - Looks like this regressed when adding the console evaluation names - The sourceURL is appended to the evaluation text before runtime manager has looked at it - And runtime manager is where we add the convenience > consolePromptTextCommitted(prompt, text) > { > ... > text = appendWebInspectorConsoleEvaluationSourceURL(text); > > WebInspector.runtimeManager.evaluateInInspectedWindow(text, WebInspector.RuntimeManager.ConsoleObjectGroup, true, false, false, true, true, printResult.bind(this)); > } > evaluateInInspectedWindow(expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, saveResult, callback) > { > if (!expression) { > // There is no expression, so the completion should happen against global properties. > expression = "this"; > } else if (/^\s*\{/.test(expression) && /\}\s*$/.test(expression)) { > // Transform {a:1} to ({a:1}) so it is treated like an object literal instead of a block with a label. > expression = "(" + expression + ")"; > } > ...
Lets just move the convenience to consolePromptTextCommitted. It really is the only place I think we expect this to happen right now.
<rdar://problem/26708513>
Created attachment 280866 [details] [PATCH] Proposed Fix
Comment on attachment 280866 [details] [PATCH] Proposed Fix Clearing flags on attachment: 280866 Committed r201855: <http://trac.webkit.org/changeset/201855>
All reviewed patches have been landed. Closing bug.