1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:08:13 +00:00

LibWeb: Add an "undefined" state to Length

A default-constructed Length now gives you an undefined length value,
which can be used to signify the absence of a value.
This commit is contained in:
Andreas Kling 2020-06-24 11:24:00 +02:00
parent f742b245b7
commit 90edaabc4b
2 changed files with 7 additions and 1 deletions

View file

@ -53,6 +53,8 @@ const char* Length::unit_name() const
return "rem";
case Type::Auto:
return "auto";
case Type::Undefined:
return "undefined";
}
ASSERT_NOT_REACHED();
}