summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/Length.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-02-18 20:26:09 +0100
committerAndreas Kling <kling@serenityos.org>2022-02-19 14:45:59 +0100
commitbfe69e9d0d7898a81365b8e782e167c1ba23cbe4 (patch)
tree1b7d1e1f3a6ca17ec1761f6dd7daade454b6d8c6 /Userland/Libraries/LibWeb/CSS/Length.h
parent141b01d3e3ef2286212f2e689ca0ff84300c329b (diff)
downloadserenity-bfe69e9d0d7898a81365b8e782e167c1ba23cbe4.zip
LibWeb: Cache and reuse some very common StyleValue objects
Length values: auto, 0px, 1px Color values: black, white, transparent
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/Length.h')
-rw-r--r--Userland/Libraries/LibWeb/CSS/Length.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Length.h b/Userland/Libraries/LibWeb/CSS/Length.h
index 16abee4201..be96bc2ea7 100644
--- a/Userland/Libraries/LibWeb/CSS/Length.h
+++ b/Userland/Libraries/LibWeb/CSS/Length.h
@@ -48,6 +48,7 @@ public:
bool is_auto() const { return m_type == Type::Auto; }
bool is_calculated() const { return m_type == Type::Calculated; }
+ bool is_px() const { return m_type == Type::Px; }
bool is_absolute() const
{