Switch to using WebRender hit testing

This trades quite a bit of complicated code in Servo for few more
messages and a significant performance improvement. In particular,
WebRender can search the entire display list at once instead of
ping-ponging down the pipeline tree. This allows us to send mouse
events to the correct pipeline immediately.
This commit is contained in:
Martin Robinson 2017-09-30 15:50:47 +02:00
parent 00e2a1c62a
commit b5d51dd263
20 changed files with 381 additions and 555 deletions

View file

@ -29,17 +29,15 @@ pub trait LayoutRPC {
fn node_scroll_area(&self) -> NodeGeometryResponse;
/// Requests the scroll root id of this node. Used by APIs such as `scrollTop`
fn node_scroll_root_id(&self) -> NodeScrollRootIdResponse;
/// Requests the node containing the point of interest
fn hit_test(&self) -> HitTestResponse;
/// Query layout for the resolved value of a given CSS property
fn resolved_style(&self) -> ResolvedStyleResponse;
fn offset_parent(&self) -> OffsetParentResponse;
/// Query layout for the resolve values of the margin properties for an element.
fn margin_style(&self) -> MarginStyleResponse;
fn text_index(&self) -> TextIndexResponse;
/// Requests the list of nodes from the given point.
fn nodes_from_point_response(&self) -> Vec<UntrustedNodeAddress>;
fn text_index(&self) -> TextIndexResponse;
}
pub struct ContentBoxResponse(pub Option<Rect<Au>>);
@ -54,10 +52,6 @@ pub struct NodeOverflowResponse(pub Option<Point2D<overflow_x::computed_value::T
pub struct NodeScrollRootIdResponse(pub ClipId);
pub struct HitTestResponse {
pub node_address: Option<UntrustedNodeAddress>,
}
pub struct ResolvedStyleResponse(pub String);
#[derive(Clone)]