LibWeb: Cache and reuse some very common StyleValue objects

Length values: auto, 0px, 1px
Color values: black, white, transparent
This commit is contained in:
Andreas Kling 2022-02-18 20:26:09 +01:00
commit bfe69e9d0d
Notes: sideshowbarker 2024-07-17 18:32:19 +09:00
3 changed files with 42 additions and 8 deletions

View file

@ -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
{