From e2e6c12ea0f3c72faf30f7221bbdd0cf525bd9b6 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 17 Sep 2021 12:06:29 +0200 Subject: LibWeb: Make ComputedValues return larger items by const reference --- Userland/Libraries/LibWeb/CSS/ComputedValues.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Userland/Libraries/LibWeb/CSS/ComputedValues.h b/Userland/Libraries/LibWeb/CSS/ComputedValues.h index 4be067e888..7a13bebaf0 100644 --- a/Userland/Libraries/LibWeb/CSS/ComputedValues.h +++ b/Userland/Libraries/LibWeb/CSS/ComputedValues.h @@ -59,7 +59,7 @@ public: CSS::Clear clear() const { return m_noninherited.clear; } CSS::Cursor cursor() const { return m_inherited.cursor; } CSS::Display display() const { return m_noninherited.display; } - Optional z_index() const { return m_noninherited.z_index; } + Optional const& z_index() const { return m_noninherited.z_index; } CSS::TextAlign text_align() const { return m_inherited.text_align; } CSS::TextDecorationLine text_decoration_line() const { return m_noninherited.text_decoration_line; } CSS::TextTransform text_transform() const { return m_inherited.text_transform; } @@ -67,13 +67,13 @@ public: CSS::WhiteSpace white_space() const { return m_inherited.white_space; } CSS::FlexDirection flex_direction() const { return m_noninherited.flex_direction; } CSS::FlexWrap flex_wrap() const { return m_noninherited.flex_wrap; } - FlexBasisData flex_basis() const { return m_noninherited.flex_basis; } - Optional flex_grow_factor() const { return m_noninherited.flex_grow_factor; } - Optional flex_shrink_factor() const { return m_noninherited.flex_shrink_factor; } + FlexBasisData const& flex_basis() const { return m_noninherited.flex_basis; } + Optional const& flex_grow_factor() const { return m_noninherited.flex_grow_factor; } + Optional const& flex_shrink_factor() const { return m_noninherited.flex_shrink_factor; } CSS::AlignItems align_items() const { return m_noninherited.align_items; } - Optional opacity() const { return m_noninherited.opacity; } + Optional const& opacity() const { return m_noninherited.opacity; } CSS::JustifyContent justify_content() const { return m_noninherited.justify_content; } - Optional box_shadow() const { return m_noninherited.box_shadow; } + Optional const& box_shadow() const { return m_noninherited.box_shadow; } const CSS::Length& width() const { return m_noninherited.width; } const CSS::Length& min_width() const { return m_noninherited.min_width; } const CSS::Length& max_width() const { return m_noninherited.max_width; } @@ -107,7 +107,7 @@ public: Optional fill() const { return m_inherited.fill; } Optional stroke() const { return m_inherited.stroke; } - Optional stroke_width() const { return m_inherited.stroke_width; } + Optional const& stroke_width() const { return m_inherited.stroke_width; } ComputedValues clone_inherited_values() const { -- cgit v1.2.3