RESOLVED FIXED 112689
Web Inspector: factor out node search controller from inspector.js
https://bugs.webkit.org/show_bug.cgi?id=112689
Summary Web Inspector: factor out node search controller from inspector.js
Andrey Kosyakov
Reported 2013-03-19 06:24:13 PDT
This extracts the node search logic from inspector.js into a separate file, so it's easier to extend.
Attachments
Patch (17.70 KB, patch)
2013-03-19 06:34 PDT, Andrey Kosyakov
no flags
Patch (13.08 KB, patch)
2013-03-19 10:28 PDT, Andrey Kosyakov
no flags
Patch (16.37 KB, patch)
2013-03-19 10:49 PDT, Andrey Kosyakov
no flags
Patch (17.52 KB, patch)
2013-03-20 06:31 PDT, Andrey Kosyakov
no flags
Patch (16.37 KB, patch)
2013-03-22 10:46 PDT, Andrey Kosyakov
pfeldman: review+
Andrey Kosyakov
Comment 1 2013-03-19 06:34:30 PDT
Pavel Feldman
Comment 2 2013-03-19 09:34:34 PDT
Comment on attachment 193810 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=193810&action=review > Source/WebCore/inspector/front-end/AdvancedSearchController.js:47 > + return WebInspector.KeyboardShortcut.makeDescriptor("f", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta | WebInspector.KeyboardShortcut.Modifiers.Shift); It was Alt > Source/WebCore/inspector/front-end/InspectorFrontendAPI.js:110 > + if (WebInspector.nodeSearchController) This is now called inspectElementMode
Andrey Kosyakov
Comment 3 2013-03-19 10:28:15 PDT
Andrey Kosyakov
Comment 4 2013-03-19 10:28:54 PDT
(In reply to comment #2) > (From update of attachment 193810 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=193810&action=review > > > Source/WebCore/inspector/front-end/AdvancedSearchController.js:47 > > + return WebInspector.KeyboardShortcut.makeDescriptor("f", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta | WebInspector.KeyboardShortcut.Modifiers.Shift); > > It was Alt Oops! Thanks, rolled this part out. > > Source/WebCore/inspector/front-end/InspectorFrontendAPI.js:110 > > + if (WebInspector.nodeSearchController) > > This is now called inspectElementMode Renamed to elementInspectionController.
WebKit Review Bot
Comment 5 2013-03-19 10:33:14 PDT
Comment on attachment 193854 [details] Patch Attachment 193854 [details] did not pass cr-linux-debug-ews (chromium-xvfb): Output: http://webkit-commit-queue.appspot.com/results/17192608
Early Warning System Bot
Comment 6 2013-03-19 10:33:27 PDT
WebKit Review Bot
Comment 7 2013-03-19 10:33:50 PDT
Comment on attachment 193854 [details] Patch Attachment 193854 [details] did not pass chromium-ews (chromium-xvfb): Output: http://webkit-commit-queue.appspot.com/results/17242092
Early Warning System Bot
Comment 8 2013-03-19 10:37:00 PDT
Peter Beverloo (cr-android ews)
Comment 9 2013-03-19 10:47:31 PDT
Comment on attachment 193854 [details] Patch Attachment 193854 [details] did not pass cr-android-ews (chromium-android): Output: http://webkit-commit-queue.appspot.com/results/17196514
Andrey Kosyakov
Comment 10 2013-03-19 10:49:58 PDT
Pavel Feldman
Comment 11 2013-03-20 00:44:45 PDT
Comment on attachment 193860 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=193860&action=review > Source/WebCore/WebCore.vcproj/WebCore.vcproj:77701 > + RelativePath="..\inspector\front-end\ElementInspectionController.js" InspectElementModeController? > Source/WebCore/inspector/front-end/ElementInspectionController.js:34 > + this.toggleSearchButton = new WebInspector.StatusBarButton(WebInspector.UIString("Select an element in the page to inspect it."), "node-search-status-bar-item"); Lets hide it. > Source/WebCore/inspector/front-end/inspector.js:97 > + mainStatusBar.insertBefore(this.elementInspectionController.toggleSearchButton.element, bottomStatusBarContainer); You should encapsulate (hide) toggleSearchButton. > Source/WebCore/inspector/front-end/inspector.js:677 > + section.addKey(elementInspectionShortcut, WebInspector.UIString("Select node to inspect")); Why is "Select node to inspect" string here? > Source/WebCore/inspector/front-end/inspector.js:969 > + if (WebInspector.elementInspectionController && WebInspector.elementInspectionController.enabled()) { Can it be missing?
Andrey Kosyakov
Comment 12 2013-03-20 06:31:50 PDT
Andrey Kosyakov
Comment 13 2013-03-20 06:33:11 PDT
(In reply to comment #11) > View in context: https://bugs.webkit.org/attachment.cgi?id=193860&action=review > > > Source/WebCore/WebCore.vcproj/WebCore.vcproj:77701 > > + RelativePath="..\inspector\front-end\ElementInspectionController.js" > > InspectElementModeController? Done. > > Source/WebCore/inspector/front-end/ElementInspectionController.js:34 > > + this.toggleSearchButton = new WebInspector.StatusBarButton(WebInspector.UIString("Select an element in the page to inspect it."), "node-search-status-bar-item"); > > Lets hide it. Done. > > Source/WebCore/inspector/front-end/inspector.js:97 > > + mainStatusBar.insertBefore(this.elementInspectionController.toggleSearchButton.element, bottomStatusBarContainer); > > You should encapsulate (hide) toggleSearchButton. Done. > > Source/WebCore/inspector/front-end/inspector.js:677 > > + section.addKey(elementInspectionShortcut, WebInspector.UIString("Select node to inspect")); > > Why is "Select node to inspect" string here? This is done consistently with other shortcuts there. Am I missing something? > > Source/WebCore/inspector/front-end/inspector.js:969 > > + if (WebInspector.elementInspectionController && WebInspector.elementInspectionController.enabled()) { > > Can it be missing? Yes, worker inspectors don't have it.
Pavel Feldman
Comment 14 2013-03-20 23:03:47 PDT
Comment on attachment 194038 [details] Patch Wrong patch?
Andrey Kosyakov
Comment 15 2013-03-22 10:46:54 PDT
Andrey Kosyakov
Comment 16 2013-03-22 10:47:25 PDT
(In reply to comment #14) > (From update of attachment 194038 [details]) > Wrong patch? Yup, sorry for the mess. Fixed!
Andrey Kosyakov
Comment 17 2013-03-28 06:25:59 PDT
Note You need to log in before you can comment on or make changes to this bug.