diff options
author | Karol Kosek <krkk@serenityos.org> | 2022-11-24 21:46:28 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-10 11:46:12 +0000 |
commit | e338a0656dd8e99e9ed64abf98d15e219adb9755 (patch) | |
tree | 1534cc2f5d34d4fb526f5ef4b7fba2e5152bf931 /Userland/Libraries | |
parent | 586a7dca889f6a0346d3dd1f557b68a243f88312 (diff) | |
download | serenity-e338a0656dd8e99e9ed64abf98d15e219adb9755.zip |
LibWeb: Remove unused StyleProperties::length_or_fallback function
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/StyleProperties.cpp | 13 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/StyleProperties.h | 1 |
2 files changed, 0 insertions, 14 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp index 07d76e58b2..277a1caa3a 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp @@ -85,19 +85,6 @@ CSS::Size StyleProperties::size_value(CSS::PropertyID id) const return CSS::Size::make_auto(); } -Length StyleProperties::length_or_fallback(CSS::PropertyID id, Length const& fallback) const -{ - auto value = property(id); - - if (value->is_calculated()) - return Length::make_calculated(value->as_calculated()); - - if (value->has_length()) - return value->to_length(); - - return fallback; -} - LengthPercentage StyleProperties::length_percentage_or_fallback(CSS::PropertyID id, LengthPercentage const& fallback) const { return length_percentage(id).value_or(fallback); diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.h b/Userland/Libraries/LibWeb/CSS/StyleProperties.h index 1aeafd6f59..de2fc3bdad 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleProperties.h +++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.h @@ -43,7 +43,6 @@ public: RefPtr<StyleValue> maybe_null_property(CSS::PropertyID) const; CSS::Size size_value(CSS::PropertyID) const; - Length length_or_fallback(CSS::PropertyID, Length const& fallback) const; LengthPercentage length_percentage_or_fallback(CSS::PropertyID, LengthPercentage const& fallback) const; Optional<LengthPercentage> length_percentage(CSS::PropertyID) const; LengthBox length_box(CSS::PropertyID left_id, CSS::PropertyID top_id, CSS::PropertyID right_id, CSS::PropertyID bottom_id, const CSS::Length& default_value) const; |