diff options
author | Andreas Kling <kling@serenityos.org> | 2022-02-18 20:26:09 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-19 14:45:59 +0100 |
commit | bfe69e9d0d7898a81365b8e782e167c1ba23cbe4 (patch) | |
tree | 1b7d1e1f3a6ca17ec1761f6dd7daade454b6d8c6 /Userland/Libraries/LibWeb/CSS/Length.h | |
parent | 141b01d3e3ef2286212f2e689ca0ff84300c329b (diff) | |
download | serenity-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.h | 1 |
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 { |