mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:47:45 +00:00
LibWeb: Add StyleValue::equals() override for PositionStyleValue
This commit is contained in:
parent
43d5257619
commit
3259b17a6a
1 changed files with 11 additions and 0 deletions
|
@ -1401,6 +1401,17 @@ public:
|
||||||
|
|
||||||
virtual String to_string() const override;
|
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<PositionStyleValue const&>(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:
|
private:
|
||||||
PositionStyleValue(PositionEdge edge_x, LengthPercentage const& offset_x, PositionEdge edge_y, LengthPercentage const& offset_y)
|
PositionStyleValue(PositionEdge edge_x, LengthPercentage const& offset_x, PositionEdge edge_y, LengthPercentage const& offset_y)
|
||||||
: StyleValue(Type::Position)
|
: StyleValue(Type::Position)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue