mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
layout: Round clientTop
, etc queries to pixels properly (#31187)
* layout: Round getClientRect queries to pixels properly Instead of just flooring all pixels in getClientRect queries, we should round the rectangle. * Fix scrollWidth/scrollHeight too, and tests * Tests passing * Test expectation for legacy layout --------- Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
bbba839278
commit
bbe505e52b
9 changed files with 194 additions and 25 deletions
|
@ -211,9 +211,12 @@ pub fn process_node_scroll_area_request(
|
|||
};
|
||||
|
||||
Rect::new(
|
||||
Point2D::new(rect.origin.x.px() as i32, rect.origin.y.px() as i32),
|
||||
Size2D::new(rect.size.width.px() as i32, rect.size.height.px() as i32),
|
||||
Point2D::new(rect.origin.x.px(), rect.origin.y.px()),
|
||||
Size2D::new(rect.size.width.px(), rect.size.height.px()),
|
||||
)
|
||||
.round()
|
||||
.to_i32()
|
||||
.to_untyped()
|
||||
}
|
||||
|
||||
/// Return the resolved value of property for a given (pseudo)element.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue