WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
141742
Web Inspector: Add context menu item to Reload the Inspector
https://bugs.webkit.org/show_bug.cgi?id=141742
Summary
Web Inspector: Add context menu item to Reload the Inspector
Nikita Vasilyev
Reported
2015-02-17 19:53:16 PST
Created
attachment 246793
[details]
Reload Inspector context menu Currently, it is possible to reload the Inspector by inspecting it and pressing Command R. There should be a way to do that without opening another Inspector instance. We could add a context menu or/and introduce a shortcut.
Attachments
Reload Inspector context menu
(25.65 KB, image/png)
2015-02-17 19:53 PST
,
Nikita Vasilyev
no flags
Details
Proposed Fix
(3.10 KB, patch)
2015-11-27 10:53 PST
,
Blaze Burg
timothy
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-02-17 19:53:49 PST
<
rdar://problem/19870852
>
Brian Burg
Comment 2
2015-02-19 09:22:05 PST
what about closing and reopening it? This will force a new WKWebView to be created and cause a new navigation. Note that either option will not reload new resources from the source directory, so you would have to still run the WebInspectorUI build step.
Brian Burg
Comment 3
2015-02-19 09:40:27 PST
Anyway, to implement this, here's a sketch: 1. We need to set a WKPageContextMenuClient in InspectorProxy.cpp, near where the other clients are initialized. 2. The callback in there needs to create an array with proposed menu items. I think these are added before Inspect Element, which is generated deep inside WebCore. 3. The item is created using WKContextMenuItemCreateAsAction(kWKContextMenuItemTagReload, WKStringCreateWithUTF8CString("Reload Inspector"), true) 4. Profit!
Blaze Burg
Comment 4
2015-11-27 10:53:40 PST
Created
attachment 266202
[details]
Proposed Fix This patch won't apply without the dependent patch.
Nikita Vasilyev
Comment 5
2015-11-27 20:32:23 PST
Command-Option-R toggles responsive design mode in Safari. Now, pressing Command-Option-R once enters responsive design mode. Pressing it again, toggles the right sidebar.
https://cloudup.com/c-qJT91xLhK
Nikita Vasilyev
Comment 6
2015-11-27 20:32:47 PST
(In reply to
comment #5
)
> Command-Option-R toggles responsive design mode in Safari. > Now, pressing Command-Option-R once enters responsive design mode. > Pressing it again, toggles the right sidebar. >
https://cloudup.com/c-qJT91xLhK
Whoops, wrong bug.
Nikita Vasilyev
Comment 7
2015-11-27 20:35:28 PST
Thanks for working on this! While we are at it, would it make sense to add a keyboard shortcut too? Maybe Cmd-Ctrl-R.
Timothy Hatcher
Comment 8
2015-11-28 13:31:54 PST
Comment on
attachment 266202
[details]
Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=266202&action=review
> Source/WebInspectorUI/UserInterface/Base/Main.js:888 > + return string;
Worthy of a comment.
> Source/WebInspectorUI/UserInterface/Base/Main.js:1342 > + proposedContextMenu.appendItem(WebInspector.unlocalizedString("Reload Web Inspector"), () => {
Might want to add a separator item.
Blaze Burg
Comment 9
2015-11-28 15:25:42 PST
(In reply to
comment #7
)
> Thanks for working on this! > > While we are at it, would it make sense to add a keyboard shortcut too? > Maybe Cmd-Ctrl-R.
I held back from this since we have several reload-related shortcuts already. Do we have a clear system to distinguish shortcuts that affect the inspector vs inspected page? I have been using Cmd-Option- as a prefix for some shortcuts that would typically be in the "View" menu.
Blaze Burg
Comment 10
2015-11-29 16:45:12 PST
(In reply to
comment #7
)
> Thanks for working on this! > > While we are at it, would it make sense to add a keyboard shortcut too? > Maybe Cmd-Ctrl-R.
I will add it as Cmd-Opt-Shift-R. This matches Cmd-Opt-Shift-D (Toggle Debug UI). We generally don't use Ctrl and Cmd in shortcuts, since they are the same thing on other platforms.
Blaze Burg
Comment 11
2015-11-29 16:56:33 PST
Committed
r192790
: <
http://trac.webkit.org/changeset/192790
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug