From cf8f1c5a5fa87dbc674546cb25e0b533f9bbd5ff Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 26 Aug 2021 11:26:18 +0200 Subject: [PATCH] LibWeb: Remove unused CSS::StyleProperties::string_or_fallback() --- Userland/Libraries/LibWeb/CSS/StyleProperties.cpp | 8 -------- Userland/Libraries/LibWeb/CSS/StyleProperties.h | 1 - 2 files changed, 9 deletions(-) diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp index 51618ea1fd..60ef9f9ccb 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp @@ -107,14 +107,6 @@ LengthBox StyleProperties::length_box(CSS::PropertyID left_id, CSS::PropertyID t return box; } -String StyleProperties::string_or_fallback(CSS::PropertyID id, const StringView& fallback) const -{ - auto value = property(id); - if (!value.has_value()) - return fallback; - return value.value()->to_string(); -} - Color StyleProperties::color_or_fallback(CSS::PropertyID id, const DOM::Document& document, Color fallback) const { auto value = property(id); diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.h b/Userland/Libraries/LibWeb/CSS/StyleProperties.h index 23049e4271..cc68d4cd78 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleProperties.h +++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.h @@ -39,7 +39,6 @@ public: Length length_or_fallback(CSS::PropertyID, const Length& fallback) 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; - String string_or_fallback(CSS::PropertyID, const StringView& fallback) const; Color color_or_fallback(CSS::PropertyID, const DOM::Document&, Color fallback) const; Optional text_align() const; CSS::Display display() const;