aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_layout_interface/rpc.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2016-11-21 09:48:33 +0100
committerMartin Robinson <mrobinson@igalia.com>2016-11-29 22:12:16 +0100
commit0b56bb2237e1ae7d2ad9f3490f7da89a7999c06a (patch)
treec924c27d1239bfa531d14ec2bcb7879e1b0aac15 /components/script_layout_interface/rpc.rs
parent39845faf261672b795af59602b45e7ce096b9f33 (diff)
downloadservo-0b56bb2237e1ae7d2ad9f3490f7da89a7999c06a.tar.gz
servo-0b56bb2237e1ae7d2ad9f3490f7da89a7999c06a.zip
Reimplement scrolling to fragments
This reimplemntation of the feature uses ScrollRootIds to scroll particular scrollable areas of the page. Fixes #13736. Fixes #10753.
Diffstat (limited to 'components/script_layout_interface/rpc.rs')
-rw-r--r--components/script_layout_interface/rpc.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/script_layout_interface/rpc.rs b/components/script_layout_interface/rpc.rs
index 94deab19b2b..6e19b3f3bcf 100644
--- a/components/script_layout_interface/rpc.rs
+++ b/components/script_layout_interface/rpc.rs
@@ -5,6 +5,7 @@
use app_units::Au;
use euclid::point::Point2D;
use euclid::rect::Rect;
+use gfx_traits::ScrollRootId;
use script_traits::UntrustedNodeAddress;
use style::properties::longhands::{margin_top, margin_right, margin_bottom, margin_left, overflow_x};
@@ -27,6 +28,8 @@ pub trait LayoutRPC {
fn node_overflow(&self) -> NodeOverflowResponse;
/// Requests the scroll geometry of this node. Used by APIs such as `scrollTop`.
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
@@ -48,6 +51,8 @@ pub struct NodeGeometryResponse {
pub struct NodeOverflowResponse(pub Option<Point2D<overflow_x::computed_value::T>>);
+pub struct NodeScrollRootIdResponse(pub ScrollRootId);
+
pub struct HitTestResponse {
pub node_address: Option<UntrustedNodeAddress>,
}