From af13bd8af01b49dc06b182118aa41427f78dedf8 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Sat, 9 Dec 2023 17:49:36 +0100 Subject: [PATCH] LibWeb: Remove unused `StyleProperties::clone()` function --- Userland/Libraries/LibWeb/CSS/StyleProperties.cpp | 15 --------------- Userland/Libraries/LibWeb/CSS/StyleProperties.h | 2 -- 2 files changed, 17 deletions(-) diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp index ce70910be9..1ac1151790 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp @@ -35,21 +35,6 @@ namespace Web::CSS { -StyleProperties::StyleProperties(StyleProperties const& other) - : m_property_values(other.m_property_values) -{ - if (other.m_font) { - m_font = other.m_font->clone(); - } else { - m_font = nullptr; - } -} - -NonnullRefPtr StyleProperties::clone() const -{ - return adopt_ref(*new StyleProperties(*this)); -} - void StyleProperties::set_property(CSS::PropertyID id, NonnullRefPtr value, CSS::CSSStyleDeclaration const* source_declaration) { m_property_values[to_underlying(id)] = StyleAndSourceDeclaration { move(value), source_declaration }; diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.h b/Userland/Libraries/LibWeb/CSS/StyleProperties.h index 29f7eac1b7..be587b0a82 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleProperties.h +++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.h @@ -20,8 +20,6 @@ class StyleProperties : public RefCounted { public: StyleProperties() = default; - explicit StyleProperties(StyleProperties const&); - static NonnullRefPtr create() { return adopt_ref(*new StyleProperties); } NonnullRefPtr clone() const;