Skip to content

Commit

Permalink
LibWeb: Avoid copying viewport rect when converting length to pixels
Browse files Browse the repository at this point in the history
  • Loading branch information
networkException authored and demostanis committed Sep 21, 2022
1 parent 688c32e commit 2d473aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Libraries/LibWeb/CSS/Length.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2d473aa

Please sign in to comment.