RESOLVED FIXED 19872
Inspector should allow evaluating expressions in iframes
https://bugs.webkit.org/show_bug.cgi?id=19872
Summary Inspector should allow evaluating expressions in iframes
Keishi Hattori
Reported 2008-07-03 06:41:01 PDT
Inspector should support cd(window) in the command line for Firebug parity.
Attachments
Patch (26.44 KB, patch)
2011-07-27 02:51 PDT, Yury Semikhatsky
no flags
Screenshot with the patch applied (74.28 KB, image/png)
2011-07-27 04:25 PDT, Yury Semikhatsky
no flags
Patch (26.00 KB, patch)
2011-07-27 05:52 PDT, Yury Semikhatsky
no flags
Patch (25.23 KB, patch)
2011-07-27 06:21 PDT, Yury Semikhatsky
pfeldman: review+
Adam Roben (:aroben)
Comment 1 2008-07-11 14:07:30 PDT
Yury Semikhatsky
Comment 2 2011-07-27 02:51:17 PDT
WebKit Review Bot
Comment 3 2011-07-27 02:54:43 PDT
Attachment 102113 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/http..." exit_code: 1 Source/WebCore/inspector/InspectorRuntimeAgent.h:57: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Source/WebCore/inspector/InspectorRuntimeAgent.cpp:62: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Total errors found: 2 in 17 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yury Semikhatsky
Comment 4 2011-07-27 04:25:24 PDT
Created attachment 102121 [details] Screenshot with the patch applied
Pavel Feldman
Comment 5 2011-07-27 05:03:15 PDT
Comment on attachment 102113 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=102113&action=review > LayoutTests/http/tests/inspector/console-cd.html:11 > + WebInspector.drawer.immediatelyFinishAnimation(); This is worth a separate InspectorTest.showConsole() function. > Source/WebCore/inspector/Inspector.json:262 > + { "name": "type", "type": "string", "enum": ["frame"], "description": "Type of the context." }, Context id should not be composite (or at least should be opaque to the front-end side). > Source/WebCore/inspector/Inspector.json:275 > + { "name": "context", "$ref": "ContextId", "optional": true, "description": "Specifies in which context to perform evaluation" } Can we use frame id here instead? > Source/WebCore/inspector/front-end/ConsoleView.js:195 > + get _currentEvaluationContextId() We generally don't do private getters. > Source/WebCore/inspector/front-end/ContextManager.js:1 > +/* The name is too generic. JavaScriptWorldManager? How does this correlate with the workers contexts? DebuggerModel?
Yury Semikhatsky
Comment 6 2011-07-27 05:52:51 PDT
Yury Semikhatsky
Comment 7 2011-07-27 05:53:50 PDT
(In reply to comment #5) > (From update of attachment 102113 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=102113&action=review > > > LayoutTests/http/tests/inspector/console-cd.html:11 > > + WebInspector.drawer.immediatelyFinishAnimation(); > > This is worth a separate InspectorTest.showConsole() function. > Done. > > Source/WebCore/inspector/Inspector.json:262 > > + { "name": "type", "type": "string", "enum": ["frame"], "description": "Type of the context." }, > > Context id should not be composite (or at least should be opaque to the front-end side). > Replaced with frameId as discussed offline. > > Source/WebCore/inspector/Inspector.json:275 > > + { "name": "context", "$ref": "ContextId", "optional": true, "description": "Specifies in which context to perform evaluation" } > > Can we use frame id here instead? > Done. > > Source/WebCore/inspector/front-end/ConsoleView.js:195 > > + get _currentEvaluationContextId() > > We generally don't do private getters. > Fixed. > > Source/WebCore/inspector/front-end/ContextManager.js:1 > > +/* > > The name is too generic. JavaScriptWorldManager? How does this correlate with the workers contexts? DebuggerModel? Renamed to JavaScriptContextManager.js
WebKit Review Bot
Comment 8 2011-07-27 05:56:43 PDT
Attachment 102136 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/http..." exit_code: 1 Source/WebCore/inspector/InspectorRuntimeAgent.h:57: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Source/WebCore/inspector/InspectorRuntimeAgent.cpp:62: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Total errors found: 2 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
Pavel Feldman
Comment 9 2011-07-27 06:07:12 PDT
Comment on attachment 102136 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=102136&action=review > Source/WebCore/inspector/InspectorRuntimeAgent.cpp:66 > + if (!m_pageAgent) { You should implement an abstract method fetching evaluation context instead.
Yury Semikhatsky
Comment 10 2011-07-27 06:21:43 PDT
Pavel Feldman
Comment 11 2011-07-27 06:25:23 PDT
Comment on attachment 102138 [details] Patch Please add the new file to the vcproj.
WebKit Review Bot
Comment 12 2011-07-27 06:25:39 PDT
Attachment 102138 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/http..." exit_code: 1 Source/WebCore/inspector/InspectorRuntimeAgent.h:56: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Source/WebCore/inspector/InspectorRuntimeAgent.cpp:60: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Total errors found: 2 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yury Semikhatsky
Comment 13 2011-07-27 06:37:31 PDT
Adam Roben (:aroben)
Comment 14 2011-07-27 07:23:50 PDT
Why was this bug repurposed? This bug was specifically about supporting the cd(window) command-line API from Firebug.
Pavel Feldman
Comment 15 2011-07-27 14:37:22 PDT
(In reply to comment #14) > Why was this bug repurposed? This bug was specifically about supporting the cd(window) command-line API from Firebug. I filed a new issue for it: https://bugs.webkit.org/show_bug.cgi?id=65285. Overall, cd(frame) does not sound like a great idea. Imagine several cd() calls within single evaluated expression, especially crossing origin boundaries. So chances are high it will stay open for quite some time.
Adam Roben (:aroben)
Comment 16 2011-07-27 14:41:31 PDT
Thanks for filing the new bug.
Note You need to log in before you can comment on or make changes to this bug.