diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-03-12 00:19:24 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-03-12 00:19:24 +0530 |
commit | 7ff7932a8cb15c42a436958e953cc904ba7a0bd8 (patch) | |
tree | 176de8d0000a4a08ce75232333c904dd4d75e5f6 /components/script/layout_interface.rs | |
parent | 059edc3287909ce705ba90804c778ee50f1e157e (diff) | |
parent | 16d2778ece77e317cc7b664b490c60d949f827a3 (diff) | |
download | servo-7ff7932a8cb15c42a436958e953cc904ba7a0bd8.tar.gz servo-7ff7932a8cb15c42a436958e953cc904ba7a0bd8.zip |
Auto merge of #9824 - danlrobertson:element1, r=asajeffrey
Add the scrollWidth and scrollHeight extensions to the element interface
Add the `scrollWidth` and `scrollHeight` extensions to the element interface. My goal was to create a method that encompassed getting `scrollWidth`, `scrollHeight`, `scrollTop`, and `scrollLeft`.
I also noted that `clientHeight` and `clientWidth` to not handle the root element and the body element correctly.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9824)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/layout_interface.rs')
-rw-r--r-- | components/script/layout_interface.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/components/script/layout_interface.rs b/components/script/layout_interface.rs index 9a8cddf97e1..0d063f47bc1 100644 --- a/components/script/layout_interface.rs +++ b/components/script/layout_interface.rs @@ -104,6 +104,8 @@ pub trait LayoutRPC { fn content_boxes(&self) -> ContentBoxesResponse; /// Requests the geometry of this node. Used by APIs such as `clientTop`. fn node_geometry(&self) -> NodeGeometryResponse; + /// Requests the scroll geometry of this node. Used by APIs such as `scrollTop`. + fn node_scroll_area(&self) -> NodeGeometryResponse; /// Requests the node containing the point of interest fn hit_test(&self) -> HitTestResponse; /// Query layout for the resolved value of a given CSS property @@ -165,6 +167,7 @@ pub enum ReflowQueryType { ContentBoxesQuery(TrustedNodeAddress), HitTestQuery(Point2D<f32>, bool), NodeGeometryQuery(TrustedNodeAddress), + NodeScrollGeometryQuery(TrustedNodeAddress), ResolvedStyleQuery(TrustedNodeAddress, Option<PseudoElement>, Atom), OffsetParentQuery(TrustedNodeAddress), MarginStyleQuery(TrustedNodeAddress), |