You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a keyboard shortcut to reload the current page #11686
A-content/scriptRelated to the script threadA-gfx/compositingC-assignedThere is someone working on resolving the issueE-more-complexVariable effort required; may require a mentor. Recommended solution is clearly described in the iss
We would like Ctr+R/Apple+R to reload the current page (with a preference to disable this behaviour, too). We'll need to:
add a new WindowEvent variant
add a handler to Window::handle_key that enqueues the new event type (guarded by a preference check like the one for handling escape)
add a new ConstellationMsg variant
add a handler for the new window event in Compositor::handle_window_message that sends the new message to the constellation (see on_navigation_window_event for a good model)
add a new ConstellationControlMsg variant that includes a PipelineId argument
add a handler for the new constellation message in Constellation::handle_request_from_compositor that gets the root pipeline and sends the new message to its script channel (see Constellation::handle_key_msg for an example), passing the root pipeline id
add a handler for the new message sent from the constellation to ScriptThread::handle_msg_from_constellation that replicates the behaviour of handle_reload in devtools.rs
There's no way to write an automated test for this as far as I know, so testing manually will be our only option here.
We don't want this to affect browserhtml. So maybe we should rename the preference shell.quit-on-escape.enabled to shell.builtin-key-shortcuts.enabled, and allow quit on escape and reload on ctrl-r only if that pref is enabled.
A-content/scriptRelated to the script threadA-gfx/compositingC-assignedThere is someone working on resolving the issueE-more-complexVariable effort required; may require a mentor. Recommended solution is clearly described in the iss
Activity
mrmiywj commentedon Jun 9, 2016
I'll pick this up.
paulrouget commentedon Jun 10, 2016
We don't want this to affect browserhtml. So maybe we should rename the preference
shell.quit-on-escape.enabledtoshell.builtin-key-shortcuts.enabled, and allow quit on escape and reload on ctrl-r only if that pref is enabled.servo/resources/prefs.json
Line 61 in 2cfef13
jdm commentedon Jun 10, 2016
@mrmiywj Go for it :)
mrmiywj commentedon Jun 11, 2016
Hmm,
WindowEvent::Refreshdoes not matched the event here?Auto merge of #11735 - mrmiywj:reload-page-shortcut, r=jdm