From 41d518669e96bf4cb7d5aea892d79f705605ff38 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 6 May 2023 18:46:26 +0200 Subject: [PATCH] LibWeb: Remove weird CSS::Length::resolved() API This API is no longer used by anyone so let's remove it. --- Userland/Libraries/LibWeb/CSS/Length.cpp | 9 --------- Userland/Libraries/LibWeb/CSS/Length.h | 2 -- 2 files changed, 11 deletions(-) diff --git a/Userland/Libraries/LibWeb/CSS/Length.cpp b/Userland/Libraries/LibWeb/CSS/Length.cpp index 44ce179abaa..61637b4e662 100644 --- a/Userland/Libraries/LibWeb/CSS/Length.cpp +++ b/Userland/Libraries/LibWeb/CSS/Length.cpp @@ -61,15 +61,6 @@ Length Length::percentage_of(Percentage const& percentage) const return Length { percentage.as_fraction() * raw_value(), m_type }; } -Length Length::resolved(Layout::Node const& layout_node) const -{ - if (is_relative()) - return make_px(to_px(layout_node)); - if (!isfinite(m_value)) - return make_auto(); - return *this; -} - CSSPixels Length::font_relative_length_to_px(Length::FontMetrics const& font_metrics, Length::FontMetrics const& root_font_metrics) const { switch (m_type) { diff --git a/Userland/Libraries/LibWeb/CSS/Length.h b/Userland/Libraries/LibWeb/CSS/Length.h index c50b0272fde..9673b415190 100644 --- a/Userland/Libraries/LibWeb/CSS/Length.h +++ b/Userland/Libraries/LibWeb/CSS/Length.h @@ -90,8 +90,6 @@ public: static Length make_px(CSSPixels value); Length percentage_of(Percentage const&) const; - Length resolved(Layout::Node const& layout_node) const; - bool is_auto() const { return m_type == Type::Auto; } bool is_px() const { return m_type == Type::Px; }