mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
LibWeb: Add PercentageStyleValue, and parse it
This is in a slightly weird state, where Percentages are sometimes Lengths and sometimes not, which I will be cleaning up in subsequent commits, in an attempt not to change all of LibWeb in one go. :^)
This commit is contained in:
parent
0bb5bda23e
commit
ea0f6b42f0
5 changed files with 188 additions and 68 deletions
|
@ -139,6 +139,12 @@ OverflowStyleValue const& StyleValue::as_overflow() const
|
|||
return static_cast<OverflowStyleValue const&>(*this);
|
||||
}
|
||||
|
||||
PercentageStyleValue const& StyleValue::as_percentage() const
|
||||
{
|
||||
VERIFY(is_percentage());
|
||||
return static_cast<PercentageStyleValue const&>(*this);
|
||||
}
|
||||
|
||||
PositionStyleValue const& StyleValue::as_position() const
|
||||
{
|
||||
VERIFY(is_position());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue