diff --git a/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp b/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp index e872bf3b83..847cd85dd0 100644 --- a/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp +++ b/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp @@ -36,29 +36,6 @@ bool MediaFeatureValue::is_same_type(MediaFeatureValue const& other) const [&](double) { return other.is_number(); }); } -bool MediaFeatureValue::equals(MediaFeatureValue const& other) const -{ - if (!is_same_type(other)) - return false; - - if (is_ident() && other.is_ident()) - return m_value.get().equals_ignoring_case(other.m_value.get()); - if (is_length() && other.is_length()) { - // FIXME: Handle relative lengths. https://www.w3.org/TR/mediaqueries-4/#ref-for-relative-length - auto& my_length = m_value.get(); - auto& other_length = other.m_value.get(); - if (!my_length.is_absolute() || !other_length.is_absolute()) { - dbgln("TODO: Support relative lengths in media queries!"); - return false; - } - return my_length.absolute_length_to_px() == other_length.absolute_length_to_px(); - } - if (is_number() && other.is_number()) - return m_value.get() == other.m_value.get(); - - VERIFY_NOT_REACHED(); -} - String MediaFeature::to_string() const { auto comparison_string = [](Comparison comparison) -> StringView { diff --git a/Userland/Libraries/LibWeb/CSS/MediaQuery.h b/Userland/Libraries/LibWeb/CSS/MediaQuery.h index 9940f4a6f9..73581c6b68 100644 --- a/Userland/Libraries/LibWeb/CSS/MediaQuery.h +++ b/Userland/Libraries/LibWeb/CSS/MediaQuery.h @@ -60,10 +60,6 @@ public: return m_value.get(); } - bool operator==(MediaFeatureValue const& other) const { return equals(other); } - bool operator!=(MediaFeatureValue const& other) const { return !(*this == other); } - bool equals(MediaFeatureValue const& other) const; - private: // TODO: Support once we have that. Variant m_value;