From 5f755d721e7151dcb7ba458452e5fec0893f36e4 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 26 May 2023 17:04:10 +0100 Subject: LibWeb: Remove StyleValue::has_rect() This behaves identically to `is_rect()` --- Userland/Libraries/LibWeb/CSS/StyleProperties.cpp | 2 +- Userland/Libraries/LibWeb/CSS/StyleValue.h | 1 - Userland/Libraries/LibWeb/CSS/StyleValues/RectStyleValue.h | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp index ee92870397..9da166f638 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp @@ -357,7 +357,7 @@ Optional StyleProperties::image_rendering() const CSS::Clip StyleProperties::clip() const { auto value = property(CSS::PropertyID::Clip); - if (!value->has_rect()) + if (!value->is_rect()) return CSS::Clip::make_auto(); return CSS::Clip(value->as_rect().rect()); } diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValue.h index 4fbb0cc1a9..c9cf4ca8dd 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValue.h +++ b/Userland/Libraries/LibWeb/CSS/StyleValue.h @@ -294,7 +294,6 @@ public: bool has_auto() const; virtual bool has_color() const { return false; } virtual bool has_length() const { return false; } - virtual bool has_rect() const { return false; } virtual bool has_number() const { return false; } virtual bool has_integer() const { return false; } diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/RectStyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValues/RectStyleValue.h index 488b1820c1..a04073bade 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValues/RectStyleValue.h +++ b/Userland/Libraries/LibWeb/CSS/StyleValues/RectStyleValue.h @@ -21,7 +21,6 @@ public: EdgeRect rect() const { return m_rect; } virtual ErrorOr to_string() const override; - virtual bool has_rect() const override { return true; } bool properties_equal(RectStyleValue const& other) const { return m_rect == other.m_rect; } -- cgit v1.2.3