mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:17:34 +00:00
LibWeb: Allow (explicitly) converting CSSPixels to float and int
...and remove some unnecessary cast chains.
This commit is contained in:
parent
c20df34b79
commit
5f0d3c083f
11 changed files with 16 additions and 14 deletions
|
@ -707,7 +707,7 @@ JS::NonnullGCPtr<Geometry::DOMRect> Element::get_bounding_client_rect() const
|
|||
VERIFY(document().browsing_context());
|
||||
auto viewport_offset = document().browsing_context()->viewport_scroll_offset();
|
||||
|
||||
return Geometry::DOMRect::create(realm(), paintable_box->absolute_rect().translated(-viewport_offset.x(), -viewport_offset.y()).to_type<double>().to_type<float>()).release_value_but_fixme_should_propagate_errors();
|
||||
return Geometry::DOMRect::create(realm(), paintable_box->absolute_rect().translated(-viewport_offset.x(), -viewport_offset.y()).to_type<float>()).release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom-view/#dom-element-getclientrects
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue