mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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.
This commit is contained in:
parent
7919e591a4
commit
d150cc9f95
24 changed files with 226 additions and 281 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue