diff options
author | Martin Robinson <mrobinson@igalia.com> | 2017-04-19 14:45:47 +0200 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2017-04-20 08:51:38 +0200 |
commit | d150cc9f95c45f80a96678a3ed1c8e076f005382 (patch) | |
tree | d3f7dded41ee67b2cc86948207bcc7c74dc3f4cf /components/layout/query.rs | |
parent | 7919e591a46274c0d7f3a7c7c99d2643d55d60f1 (diff) | |
download | servo-d150cc9f95c45f80a96678a3ed1c8e076f005382.tar.gz servo-d150cc9f95c45f80a96678a3ed1c8e076f005382.zip |
Eliminate ScrollRootId
Just use WebRender's ClipId directly. This will allow us to create and
use ReferenceFrames in the future, if we need to do that. It will also
make it easier to have Servo responsible for creating the root
scrolling area, which will allow removing some old hacks in the future.
Diffstat (limited to 'components/layout/query.rs')
-rw-r--r-- | components/layout/query.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/components/layout/query.rs b/components/layout/query.rs index b4008d24c60..88aca41ae30 100644 --- a/components/layout/query.rs +++ b/components/layout/query.rs @@ -13,9 +13,9 @@ use euclid::size::Size2D; use flow::{self, Flow}; use fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo}; use gfx::display_list::{DisplayItemMetadata, DisplayList, OpaqueNode, ScrollOffsetMap}; -use gfx_traits::ScrollRootId; use inline::LAST_FRAGMENT_OF_ELEMENT; use ipc_channel::ipc::IpcSender; +use msg::constellation_msg::PipelineId; use opaque_node::OpaqueNodeMethods; use script_layout_interface::PendingImage; use script_layout_interface::rpc::{ContentBoxResponse, ContentBoxesResponse}; @@ -41,6 +41,7 @@ use style::selector_parser::PseudoElement; use style::stylist::Stylist; use style_traits::ToCss; use style_traits::cursor::Cursor; +use webrender_traits::ClipId; use wrapper::{LayoutNodeHelpers, LayoutNodeLayoutData}; /// Mutable data belonging to the LayoutThread. @@ -69,7 +70,7 @@ pub struct LayoutThreadData { pub hit_test_response: (Option<DisplayItemMetadata>, bool), /// A queued response for the scroll root id for a given node. - pub scroll_root_id_response: Option<ScrollRootId>, + pub scroll_root_id_response: Option<ClipId>, /// A pair of overflow property in x and y pub overflow_response: NodeOverflowResponse, @@ -650,9 +651,11 @@ pub fn process_node_geometry_request<N: LayoutNode>(requested_node: N, layout_ro iterator.client_rect } -pub fn process_node_scroll_root_id_request<N: LayoutNode>(requested_node: N) -> ScrollRootId { +pub fn process_node_scroll_root_id_request<N: LayoutNode>(id: PipelineId, + requested_node: N) + -> ClipId { let layout_node = requested_node.to_threadsafe(); - layout_node.scroll_root_id() + layout_node.generate_scroll_root_id(id) } pub fn process_node_scroll_area_request< N: LayoutNode>(requested_node: N, layout_root: &mut Flow) |