diff options
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r-- | components/script/script_task.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs index 5efbb6a1deb..a2defc328eb 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -729,6 +729,8 @@ impl ScriptTask { ConstellationControlMsg::WebDriverCommand(pipeline_id, msg) => { self.handle_webdriver_msg(pipeline_id, msg); } + ConstellationControlMsg::TickAllAnimations(pipeline_id) => + self.handle_tick_all_animations(pipeline_id), } } @@ -778,6 +780,8 @@ impl ScriptTask { devtools::handle_set_timeline_markers(&page, self, marker_types, reply), DevtoolScriptControlMsg::DropTimelineMarkers(_pipeline_id, marker_types) => devtools::handle_drop_timeline_markers(&page, self, marker_types), + DevtoolScriptControlMsg::RequestAnimationFrame(pipeline_id, callback) => + devtools::handle_request_animation_frame(&page, pipeline_id, callback), } } @@ -1018,6 +1022,13 @@ impl ScriptTask { return false; } + /// Handles when layout task finishes all animation in one tick + fn handle_tick_all_animations(&self, id: PipelineId) { + let page = get_page(&self.root_page(), id); + let document = page.document().root(); + document.r().invoke_animation_callbacks(); + } + /// The entry point to document loading. Defines bindings, sets up the window and document /// objects, parses HTML and CSS, and kicks off initial layout. fn load(&self, response: LoadResponse, incomplete: InProgressLoad) { |