-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add a keyboard shortcut to reload the current page #11686
Copy link
Copy link
Closed
Labels
A-content/scriptRelated to the script threadRelated to the script threadA-gfx/compositingC-assignedThere is someone working on resolving the issueThere is someone working on resolving the issueE-more-complexVariable effort required; may require a mentor. Recommended solution is clearly described in the issVariable effort required; may require a mentor. Recommended solution is clearly described in the iss
Metadata
Metadata
Assignees
Labels
A-content/scriptRelated to the script threadRelated to the script threadA-gfx/compositingC-assignedThere is someone working on resolving the issueThere is someone working on resolving the issueE-more-complexVariable effort required; may require a mentor. Recommended solution is clearly described in the issVariable 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:
WindowEventvariantWindow::handle_keythat enqueues the new event type (guarded by a preference check like the one for handling escape)ConstellationMsgvariantCompositor::handle_window_messagethat sends the new message to the constellation (seeon_navigation_window_eventfor a good model)ConstellationControlMsgvariant that includes aPipelineIdargumentConstellation::handle_request_from_compositorthat gets the root pipeline and sends the new message to its script channel (seeConstellation::handle_key_msgfor an example), passing the root pipeline idScriptThread::handle_msg_from_constellationthat replicates the behaviour ofhandle_reloadindevtools.rsThere's no way to write an automated test for this as far as I know, so testing manually will be our only option here.
Code:
components/compositing/windowing.rs,ports/glutin/window.rs,components/compositing/compositor.rs,components/constellation/constellation.rs,components/script/script_thread.rs,components/msg/constellation_msg.rs,components/script_traits/lib.rs