summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/Length.cpp
diff options
context:
space:
mode:
authornetworkException <git@nwex.de>2022-09-10 12:43:05 +0200
committerLinus Groh <mail@linusgroh.de>2022-09-11 22:08:38 +0100
commit9ff6c1e692ed1b21ff0324e3ceaf9fca0ed670a4 (patch)
treeb1c8b422b1379f7136d9015785319f60498890f8 /Userland/Libraries/LibWeb/CSS/Length.cpp
parentbe41b191465ac06690ac894fd50fb0b28b45f8d2 (diff)
downloadserenity-9ff6c1e692ed1b21ff0324e3ceaf9fca0ed670a4.zip
LibWeb: Avoid copying viewport rect when converting length to pixels
See https://github.com/SerenityOS/serenity/pull/3433#discussion_r484570948
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/Length.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CSS/Length.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Length.cpp b/Userland/Libraries/LibWeb/CSS/Length.cpp
index 941be4d220..bf8413e445 100644
--- a/Userland/Libraries/LibWeb/CSS/Length.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Length.cpp
@@ -104,7 +104,7 @@ float Length::to_px(Layout::Node const& layout_node) const
if (!layout_node.document().browsing_context())
return 0;
- auto viewport_rect = layout_node.document().browsing_context()->viewport_rect();
+ auto const& viewport_rect = layout_node.document().browsing_context()->viewport_rect();
auto* root_element = layout_node.document().document_element();
if (!root_element || !root_element->layout_node())
return 0;