script/layout: Refactor mouse_over since it now basically uses hit_test

This commit is contained in:
Emilio Cobos Álvarez 2016-02-20 21:36:24 +01:00
parent c3786437a3
commit 48dee6413d
3 changed files with 17 additions and 47 deletions

View file

@ -105,9 +105,7 @@ pub trait LayoutRPC {
/// Requests the geometry of this node. Used by APIs such as `clientTop`.
fn node_geometry(&self) -> NodeGeometryResponse;
/// Requests the node containing the point of interest
fn hit_test(&self, point: Point2D<f32>) -> Result<HitTestResponse, ()>;
/// Query layout for the topmost node under the mouse.
fn mouse_over(&self, point: Point2D<f32>) -> Result<MouseOverResponse, ()>;
fn hit_test(&self, point: Point2D<f32>, update_cursor: bool) -> Result<HitTestResponse, ()>;
/// Query layout for the resolved value of a given CSS property
fn resolved_style(&self) -> ResolvedStyleResponse;
fn offset_parent(&self) -> OffsetParentResponse;
@ -140,7 +138,6 @@ pub struct NodeGeometryResponse {
pub client_rect: Rect<i32>,
}
pub struct HitTestResponse(pub UntrustedNodeAddress);
pub struct MouseOverResponse(pub UntrustedNodeAddress);
pub struct ResolvedStyleResponse(pub Option<String>);
#[derive(Clone)]