summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-10-18 10:17:01 +0200
committerAndreas Kling <kling@serenityos.org>2021-10-18 10:40:30 +0200
commitf9e814826f4a2bc696201336c72b364bbc731db0 (patch)
tree8276004540a4c846ed53ad066d2765ed67ab882f /Userland/Libraries
parentb67f6daf05afa1f052071740a24d296ee9c5b01d (diff)
downloadserenity-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.cpp3
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;