diff options
author | Andreas Kling <kling@serenityos.org> | 2021-10-18 10:17:01 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-18 10:40:30 +0200 |
commit | f9e814826f4a2bc696201336c72b364bbc731db0 (patch) | |
tree | 8276004540a4c846ed53ad066d2765ed67ab882f /Userland/Libraries | |
parent | b67f6daf05afa1f052071740a24d296ee9c5b01d (diff) | |
download | serenity-f9e814826f4a2bc696201336c72b364bbc731db0.zip |
LibWeb: Only update layout if actually needed when scrolling to anchor
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibWeb/Page/BrowsingContext.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/Page/BrowsingContext.cpp b/Userland/Libraries/LibWeb/Page/BrowsingContext.cpp index e435782cbd..a2c8933e3d 100644 --- a/Userland/Libraries/LibWeb/Page/BrowsingContext.cpp +++ b/Userland/Libraries/LibWeb/Page/BrowsingContext.cpp @@ -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()->force_layout(); + active_document()->update_layout(); if (!element || !element->layout_node()) return; |