diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValue.h index 180c5a4e2c..24d48ea986 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValue.h +++ b/Userland/Libraries/LibWeb/CSS/StyleValue.h @@ -1401,6 +1401,17 @@ public: virtual String to_string() const override; + virtual bool equals(StyleValue const& other) const override + { + if (type() != other.type()) + return false; + auto const& typed_other = static_cast(other); + return m_edge_x == typed_other.m_edge_x + && m_offset_x == typed_other.m_offset_x + && m_edge_y == typed_other.m_edge_y + && m_offset_y == typed_other.m_offset_y; + } + private: PositionStyleValue(PositionEdge edge_x, LengthPercentage const& offset_x, PositionEdge edge_y, LengthPercentage const& offset_y) : StyleValue(Type::Position)