Prechádzať zdrojové kódy

LibWeb: Avoid copying viewport rect when converting length to pixels

See https://github.com/SerenityOS/serenity/pull/3433#discussion_r484570948
networkException 2 rokov pred
rodič
commit
9ff6c1e692
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      Userland/Libraries/LibWeb/CSS/Length.cpp

+ 1 - 1
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;