summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2022-09-15 08:31:12 +0100
committerSam Atkins <atkinssj@gmail.com>2022-09-16 10:50:48 +0100
commit776538a6c41b4bf918ef2a9c9adb72215cf38344 (patch)
treec2a1d00fe6afe5d5e83bc09f5da3f6496e18e71b
parent84d9a226e6f71ed9798922fb5f4b79e5d6b1049d (diff)
downloadserenity-776538a6c41b4bf918ef2a9c9adb72215cf38344.zip
LibWeb: Add operator== to CSS::Number
This will be needed for the .equals() function of the backdrop-filter style value.
-rw-r--r--Userland/Libraries/LibWeb/CSS/Number.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Number.h b/Userland/Libraries/LibWeb/CSS/Number.h
index feb2259f3b..cebcd8653c 100644
--- a/Userland/Libraries/LibWeb/CSS/Number.h
+++ b/Userland/Libraries/LibWeb/CSS/Number.h
@@ -76,6 +76,11 @@ public:
return String::number(m_value);
}
+ bool operator==(Number const& other) const
+ {
+ return m_type == other.m_type && m_value == other.m_value;
+ }
+
private:
float m_value { 0 };
Type m_type;