mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-25 20:22:18 +03:00
LibWeb: Update paint-only props only when needed in get_client_rects()
There is no need to unconditionally resolve them whenever the function is called.
This commit is contained in:
parent
e9383b9c86
commit
15524b97b6
Notes:
sideshowbarker
2024-07-17 10:16:43 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/15524b97b6 Pull-request: https://github.com/SerenityOS/serenity/pull/23615
@ -926,10 +926,8 @@ JS::NonnullGCPtr<Geometry::DOMRectList> Element::get_client_rects() const
|
||||
VERIFY(navigable);
|
||||
auto viewport_offset = navigable->viewport_scroll_offset();
|
||||
|
||||
if (document().paintable()) {
|
||||
// NOTE: Make sure CSS transforms are resolved before it is used to calculate the rect position.
|
||||
const_cast<Painting::ViewportPaintable*>(document().paintable())->resolve_paint_only_properties();
|
||||
}
|
||||
// NOTE: Make sure CSS transforms are resolved before it is used to calculate the rect position.
|
||||
const_cast<Document&>(document()).update_paint_and_hit_testing_properties_if_needed();
|
||||
|
||||
Gfx::AffineTransform transform;
|
||||
for (auto const* containing_block = this->paintable_box(); containing_block; containing_block = containing_block->containing_block()) {
|
||||
|
Loading…
Reference in New Issue
Block a user