mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Add scrollWidth/Height to element interface
Add the scrollWidth and scrollHeight extensions to the element interface.
This commit is contained in:
parent
5fbed88248
commit
16d2778ece
10 changed files with 234 additions and 39 deletions
|
@ -1106,6 +1106,13 @@ impl Window {
|
|||
self.layout_rpc.hit_test().node_address
|
||||
}
|
||||
|
||||
pub fn scroll_area_query(&self, node: TrustedNodeAddress) -> Rect<i32> {
|
||||
self.reflow(ReflowGoal::ForScriptQuery,
|
||||
ReflowQueryType::NodeScrollGeometryQuery(node),
|
||||
ReflowReason::Query);
|
||||
self.layout_rpc.node_scroll_area().client_rect
|
||||
}
|
||||
|
||||
pub fn resolved_style_query(&self,
|
||||
element: TrustedNodeAddress,
|
||||
pseudo: Option<PseudoElement>,
|
||||
|
@ -1459,6 +1466,7 @@ fn debug_reflow_events(id: PipelineId, goal: &ReflowGoal, query_type: &ReflowQue
|
|||
ReflowQueryType::ContentBoxesQuery(_n) => "\tContentBoxesQuery",
|
||||
ReflowQueryType::HitTestQuery(_n, _o) => "\tHitTestQuery",
|
||||
ReflowQueryType::NodeGeometryQuery(_n) => "\tNodeGeometryQuery",
|
||||
ReflowQueryType::NodeScrollGeometryQuery(_n) => "\tNodeScrollGeometryQuery",
|
||||
ReflowQueryType::ResolvedStyleQuery(_, _, _) => "\tResolvedStyleQuery",
|
||||
ReflowQueryType::OffsetParentQuery(_n) => "\tOffsetParentQuery",
|
||||
ReflowQueryType::MarginStyleQuery(_n) => "\tMarginStyleQuery",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue