aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_interface.rs
diff options
context:
space:
mode:
authorTill Schneidereit <till@tillschneidereit.net>2015-07-19 15:04:50 +0200
committerTill Schneidereit <till@tillschneidereit.net>2015-07-19 15:04:50 +0200
commit162ecd0aac1ce8cd924b4f7853f7bfe6ca015348 (patch)
tree9c7d94e9f57508064d956ebf495072b0f35be836 /components/script/layout_interface.rs
parentacf47a02cf38b5c82e7c78cc1f6660a7daa9969a (diff)
downloadservo-162ecd0aac1ce8cd924b4f7853f7bfe6ca015348.tar.gz
servo-162ecd0aac1ce8cd924b4f7853f7bfe6ca015348.zip
Implement client{Top, Left, Height, Width} element properties
Diffstat (limited to 'components/script/layout_interface.rs')
-rw-r--r--components/script/layout_interface.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/layout_interface.rs b/components/script/layout_interface.rs
index 3c26f062214..60270a80c4b 100644
--- a/components/script/layout_interface.rs
+++ b/components/script/layout_interface.rs
@@ -95,6 +95,8 @@ pub trait LayoutRPC {
fn content_box(&self) -> ContentBoxResponse;
/// Requests the dimensions of all the content boxes, as in the `getClientRects()` call.
fn content_boxes(&self) -> ContentBoxesResponse;
+ /// Requests the clientTop.
+ fn node_geometry(&self) -> NodeGeometryResponse;
/// Requests the node containing the point of interest
fn hit_test(&self, node: TrustedNodeAddress, point: Point2D<f32>) -> Result<HitTestResponse, ()>;
fn mouse_over(&self, node: TrustedNodeAddress, point: Point2D<f32>) -> Result<MouseOverResponse, ()>;
@@ -102,6 +104,9 @@ pub trait LayoutRPC {
pub struct ContentBoxResponse(pub Rect<Au>);
pub struct ContentBoxesResponse(pub Vec<Rect<Au>>);
+pub struct NodeGeometryResponse {
+ pub client_rect: Rect<i32>,
+}
pub struct HitTestResponse(pub UntrustedNodeAddress);
pub struct MouseOverResponse(pub Vec<UntrustedNodeAddress>);
@@ -120,6 +125,7 @@ pub enum ReflowQueryType {
NoQuery,
ContentBoxQuery(TrustedNodeAddress),
ContentBoxesQuery(TrustedNodeAddress),
+ NodeGeometryQuery(TrustedNodeAddress),
}
/// Information needed for a reflow.