diff options
author | networkException <git@nwex.de> | 2022-09-10 12:43:05 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-09-11 22:08:38 +0100 |
commit | 9ff6c1e692ed1b21ff0324e3ceaf9fca0ed670a4 (patch) | |
tree | b1c8b422b1379f7136d9015785319f60498890f8 /Userland/Libraries/LibWeb/CSS/Length.cpp | |
parent | be41b191465ac06690ac894fd50fb0b28b45f8d2 (diff) | |
download | serenity-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.cpp | 2 |
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; |