diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2016-05-24 18:40:39 -0700 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2016-05-31 14:12:51 -0700 |
commit | a86f77e36d310737ce9e87e1ab49340cfdd89ed7 (patch) | |
tree | 30528e057adaba030572a475c97b88d1a30dc0d1 /components/script/layout_interface.rs | |
parent | 55b0bb027caba9ca4f3fb091c55a53c24380dccb (diff) | |
download | servo-a86f77e36d310737ce9e87e1ab49340cfdd89ed7.tar.gz servo-a86f77e36d310737ce9e87e1ab49340cfdd89ed7.zip |
script: Keep the DOM-side viewport up to date when scrolling happens in
WebRender.
This happens asynchronously, just as it does in non-WebRender mode.
This functionality is a prerequisite for doing proper display-list-based
hit testing in WebRender, since it moves the scroll offsets into Servo
(and, specifically, into the script thread, enabling iframe event
forwarding) instead of keeping them private to WebRender.
Requires servo/webrender_traits#55 and servo/webrender#277.
Partially addresses #11108.
Diffstat (limited to 'components/script/layout_interface.rs')
-rw-r--r-- | components/script/layout_interface.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/layout_interface.rs b/components/script/layout_interface.rs index b0327305665..29dff179525 100644 --- a/components/script/layout_interface.rs +++ b/components/script/layout_interface.rs @@ -15,8 +15,8 @@ use ipc_channel::ipc::{IpcReceiver, IpcSender}; use msg::constellation_msg::{PanicMsg, PipelineId, WindowSizeData}; use net_traits::image_cache_thread::ImageCacheThread; use profile_traits::mem::ReportsChan; -use script_traits::UntrustedNodeAddress; use script_traits::{ConstellationControlMsg, LayoutControlMsg, LayoutMsg as ConstellationMsg}; +use script_traits::{StackingContextScrollState, UntrustedNodeAddress}; use std::sync::Arc; use std::sync::mpsc::{Receiver, Sender}; use string_cache::Atom; @@ -85,6 +85,9 @@ pub enum Msg { /// Set the final Url. SetFinalUrl(Url), + + /// Tells layout about the new scrolling offsets of each scrollable stacking context. + SetStackingContextScrollStates(Vec<StackingContextScrollState>), } /// Synchronous messages that script can send to layout. |