mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Improve the name the NodeGeometryQuery
This query is used to get the clientTop, clientWidth, clientHeight, clientLeft properties of DOM objects. "NodeGeometry" doesn't really capture what these properties do as they often are returning the width of element border.
This commit is contained in:
parent
5f55cd5d71
commit
740211d191
5 changed files with 18 additions and 18 deletions
|
@ -1763,7 +1763,7 @@ impl Window {
|
|||
}
|
||||
|
||||
pub fn client_rect_query(&self, node: &Node) -> UntypedRect<i32> {
|
||||
if !self.layout_reflow(QueryMsg::NodeGeometryQuery(node.to_opaque())) {
|
||||
if !self.layout_reflow(QueryMsg::ClientRectQuery(node.to_opaque())) {
|
||||
return Rect::zero();
|
||||
}
|
||||
self.layout_rpc.node_geometry().client_rect
|
||||
|
@ -2351,7 +2351,7 @@ fn debug_reflow_events(id: PipelineId, reflow_goal: &ReflowGoal, reason: &Reflow
|
|||
&QueryMsg::ContentBoxQuery(_n) => "\tContentBoxQuery",
|
||||
&QueryMsg::ContentBoxesQuery(_n) => "\tContentBoxesQuery",
|
||||
&QueryMsg::NodesFromPointQuery(..) => "\tNodesFromPointQuery",
|
||||
&QueryMsg::NodeGeometryQuery(_n) => "\tNodeGeometryQuery",
|
||||
&QueryMsg::ClientRectQuery(_n) => "\tClientRectQuery",
|
||||
&QueryMsg::NodeScrollGeometryQuery(_n) => "\tNodeScrollGeometryQuery",
|
||||
&QueryMsg::NodeScrollIdQuery(_n) => "\tNodeScrollIdQuery",
|
||||
&QueryMsg::ResolvedStyleQuery(_, _, _) => "\tResolvedStyleQuery",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue