diff options
author | Guro Bokum <jiojiajiu@gmail.com> | 2015-04-20 22:01:56 +0700 |
---|---|---|
committer | Guro Bokum <jiojiajiu@gmail.com> | 2015-05-06 02:08:39 +0700 |
commit | be2cb665de412c39748b925582646bc2d40725c2 (patch) | |
tree | b2998445a15a345cd717390ae6b8f9b25333bb51 /components/script/script_task.rs | |
parent | 6d2f70a4fd275510ca90c5da27bb841dd25d39bd (diff) | |
download | servo-be2cb665de412c39748b925582646bc2d40725c2.tar.gz servo-be2cb665de412c39748b925582646bc2d40725c2.zip |
Start using on_refresh_driver_tick #5681
Final
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) { |