mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00: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: 15524b97b6
Pull-request: https://github.com/SerenityOS/serenity/pull/23615
1 changed files with 2 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue