diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 8ef650ecee9..1a69c10dcfa 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -1281,19 +1281,21 @@ impl ScriptThread { fn handle_msg_from_script(&self, msg: MainThreadScriptMsg) { match msg { - MainThreadScriptMsg::Navigate(parent_pipeline_id, load_data, replace) => - self.handle_navigate(parent_pipeline_id, None, load_data, replace), - MainThreadScriptMsg::ExitWindow(id) => - self.handle_exit_window_msg(id), + MainThreadScriptMsg::Navigate(parent_pipeline_id, load_data, replace) => { + self.handle_navigate(parent_pipeline_id, None, load_data, replace) + }, + MainThreadScriptMsg::ExitWindow(id) => { + self.handle_exit_window_msg(id) + }, MainThreadScriptMsg::Common(CommonScriptMsg::RunnableMsg(_, runnable)) => { - // The category of the runnable is ignored by the pattern, however - // it is still respected by profiling (see categorize_msg). runnable.main_thread_handler(self) } - MainThreadScriptMsg::Common(CommonScriptMsg::CollectReports(reports_chan)) => - self.collect_reports(reports_chan), - MainThreadScriptMsg::WorkletLoaded(pipeline_id) => - self.handle_worklet_loaded(pipeline_id), + MainThreadScriptMsg::Common(CommonScriptMsg::CollectReports(chan)) => { + self.collect_reports(chan) + }, + MainThreadScriptMsg::WorkletLoaded(pipeline_id) => { + self.handle_worklet_loaded(pipeline_id) + }, } } diff --git a/components/script/task_source/dom_manipulation.rs b/components/script/task_source/dom_manipulation.rs index 18721539693..636b99f87bf 100644 --- a/components/script/task_source/dom_manipulation.rs +++ b/components/script/task_source/dom_manipulation.rs @@ -25,11 +25,14 @@ impl fmt::Debug for DOMManipulationTaskSource { } impl TaskSource for DOMManipulationTaskSource { - fn queue_with_wrapper(&self, - msg: Box, - wrapper: &RunnableWrapper) - -> Result<(), ()> - where T: Runnable + Send + 'static { + fn queue_with_wrapper( + &self, + msg: Box, + wrapper: &RunnableWrapper, + ) -> Result<(), ()> + where + T: Runnable + Send + 'static, + { let msg = MainThreadScriptMsg::Common(CommonScriptMsg::RunnableMsg( ScriptThreadEventCategory::ScriptEvent, wrapper.wrap_runnable(msg), diff --git a/components/script/task_source/user_interaction.rs b/components/script/task_source/user_interaction.rs index 753c090df9e..9456d940416 100644 --- a/components/script/task_source/user_interaction.rs +++ b/components/script/task_source/user_interaction.rs @@ -25,11 +25,14 @@ impl fmt::Debug for UserInteractionTaskSource { } impl TaskSource for UserInteractionTaskSource { - fn queue_with_wrapper(&self, - msg: Box, - wrapper: &RunnableWrapper) - -> Result<(), ()> - where T: Runnable + Send + 'static { + fn queue_with_wrapper( + &self, + msg: Box, + wrapper: &RunnableWrapper, + ) -> Result<(), ()> + where + T: Runnable + Send + 'static, + { let msg = MainThreadScriptMsg::Common(CommonScriptMsg::RunnableMsg( ScriptThreadEventCategory::InputEvent, wrapper.wrap_runnable(msg),