mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 18:17:23 +00:00
LibWeb: Add operator== to CSS::Number
This will be needed for the .equals() function of the backdrop-filter style value.
This commit is contained in:
parent
84d9a226e6
commit
776538a6c4
Notes:
sideshowbarker
2024-07-17 07:08:00 +09:00
Author: https://github.com/MacDue
Commit: 776538a6c4
Pull-request: https://github.com/SerenityOS/serenity/pull/15123
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/linusg ✅
1 changed files with 5 additions and 0 deletions
|
@ -76,6 +76,11 @@ public:
|
||||||
return String::number(m_value);
|
return String::number(m_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool operator==(Number const& other) const
|
||||||
|
{
|
||||||
|
return m_type == other.m_type && m_value == other.m_value;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float m_value { 0 };
|
float m_value { 0 };
|
||||||
Type m_type;
|
Type m_type;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue