RESOLVED FIXED 128092
Web Inspector: RuntimeManager should not use view object WebInspector.quickConsole
https://bugs.webkit.org/show_bug.cgi?id=128092
Summary Web Inspector: RuntimeManager should not use view object WebInspector.quickCo...
Blaze Burg
Reported 2014-02-02 18:52:19 PST
This seems to be a straightforward model/view layering violation. The "active" context identifier should live in the RuntimeManager instead. With this fixed, we will be able to use RuntimeAgent.evaluateInInspectedWindow() within inspector-protocol tests that test the model, instead of blitzing raw "RuntimeAgent.evaluate" messages.
Attachments
patch (2.23 KB, patch)
2014-02-19 23:31 PST, Gergő Balogh
timothy: review-
proposed patch (1.68 KB, patch)
2014-03-26 05:09 PDT, Gergő Balogh
no flags
Proposed Fix (15.67 KB, patch)
2016-06-27 16:39 PDT, Blaze Burg
no flags
Radar WebKit Bug Importer
Comment 1 2014-02-02 18:52:33 PST
Gergő Balogh
Comment 2 2014-02-19 23:31:07 PST
Timothy Hatcher
Comment 3 2014-02-20 08:35:20 PST
Comment on attachment 224720 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=224720&action=review > Source/WebInspectorUI/UserInterface/RuntimeManager.js:76 > + if (!contextId) { > + contextId = WebInspector.quickConsole.executionContextIdentifier; > + } Passing in the contextId (preferably contextIdentifier) is the right approach. The idea of this bug was to remove the use of WebInspector.quickConsole altogether, not just hide it behind an optional argument. I also don't see where anyone is passing a context to evaluateInInspectedWindow in this patch, so nothing has really changed.
Blaze Burg
Comment 4 2014-02-20 09:01:59 PST
I think the correct fix here is to store/load the last user-selected execution context on the WebInspector.Frame. The frame already stores WebInspector.ExecutionContext's and WebInspector.ExecutionContextList.
Timothy Hatcher
Comment 5 2014-02-20 09:09:30 PST
Yeah, that sounds good to me.
Gergő Balogh
Comment 6 2014-03-26 05:09:42 PDT
Created attachment 227844 [details] proposed patch I can not find any case when the value of contextID in the original version is not undefined. Maybe I miss something, but I think this is a left over from other fixes. Based on these guess I simple remove it.
Timothy Hatcher
Comment 7 2014-03-26 07:51:15 PDT
comtextId is pickable from a popup menu in the console input area when there are Safari extensions or frames on the page. Removing this line breaks that feature.
Blaze Burg
Comment 8 2016-06-27 16:39:19 PDT
Created attachment 282186 [details] Proposed Fix
Joseph Pecoraro
Comment 9 2016-06-27 17:22:12 PDT
Comment on attachment 282186 [details] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=282186&action=review > LayoutTests/inspector/runtime/change-execution-context-identifier-expected.txt:16 > +Passphrase in selected frame: rosewater > +PASS: The passphrase should match the phrase defined in the subframe. Style: InspectorTest.expectThat would output PASS: ...
WebKit Commit Bot
Comment 10 2016-06-27 17:23:28 PDT
Comment on attachment 282186 [details] Proposed Fix Clearing flags on attachment: 282186 Committed r202522: <http://trac.webkit.org/changeset/202522>
WebKit Commit Bot
Comment 11 2016-06-27 17:23:32 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.