mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
LibWeb: Only update layout if actually needed when scrolling to anchor
This commit is contained in:
parent
b67f6daf05
commit
f9e814826f
1 changed files with 1 additions and 2 deletions
|
@ -158,8 +158,7 @@ void BrowsingContext::scroll_to_anchor(String const& fragment)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: This is overly aggressive and should be something more like a "update_layout_if_needed()"
|
active_document()->update_layout();
|
||||||
active_document()->force_layout();
|
|
||||||
|
|
||||||
if (!element || !element->layout_node())
|
if (!element || !element->layout_node())
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue