1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:37:34 +00:00

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
parent 141b01d3e3
commit bfe69e9d0d
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
{