From 69878cde3e054473210a68dbe0b8a10cc97edcc7 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 14 Jan 2022 16:32:10 +0000 Subject: [PATCH] LibWeb: Remove unused StyleProperties::background_repeat() --- Userland/Libraries/LibWeb/CSS/ComputedValues.h | 5 ----- Userland/Libraries/LibWeb/CSS/StyleProperties.cpp | 10 ---------- Userland/Libraries/LibWeb/CSS/StyleProperties.h | 1 - 3 files changed, 16 deletions(-) diff --git a/Userland/Libraries/LibWeb/CSS/ComputedValues.h b/Userland/Libraries/LibWeb/CSS/ComputedValues.h index 869712e6b4..6b3a7f0101 100644 --- a/Userland/Libraries/LibWeb/CSS/ComputedValues.h +++ b/Userland/Libraries/LibWeb/CSS/ComputedValues.h @@ -80,11 +80,6 @@ struct BoxShadowData { Color color {}; }; -struct BackgroundRepeatData { - CSS::Repeat repeat_x; - CSS::Repeat repeat_y; -}; - class ComputedValues { public: CSS::Float float_() const { return m_noninherited.float_; } diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp index d782ab8909..21c5a9b518 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp @@ -688,16 +688,6 @@ Optional StyleProperties::overflow(CSS::PropertyID property_id) c } } -Optional StyleProperties::background_repeat() const -{ - auto value = property(CSS::PropertyID::BackgroundRepeat); - if (!value.has_value() || !value.value()->is_background_repeat()) - return {}; - - auto& background_repeat = value.value()->as_background_repeat(); - return BackgroundRepeatData { background_repeat.repeat_x(), background_repeat.repeat_y() }; -} - Optional StyleProperties::box_shadow() const { auto value_or_error = property(CSS::PropertyID::BoxShadow); diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.h b/Userland/Libraries/LibWeb/CSS/StyleProperties.h index 12cb64d423..0737ee26ea 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleProperties.h +++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.h @@ -62,7 +62,6 @@ public: Optional justify_content() const; Optional overflow_x() const; Optional overflow_y() const; - Optional background_repeat() const; Optional box_shadow() const; CSS::BoxSizing box_sizing() const; Optional pointer_events() const;