mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
LibWeb: Implement CSS Resolution class
This corresponds to `<resolution>` in the grammar.
This commit is contained in:
parent
bd79c303f6
commit
0465abcfec
7 changed files with 160 additions and 0 deletions
|
@ -4306,6 +4306,10 @@ Optional<CalculatedStyleValue::CalcValue> Parser::parse_calc_value(TokenStream<S
|
|||
return CalculatedStyleValue::CalcValue { dimension.length() };
|
||||
if (dimension.is_percentage())
|
||||
return CalculatedStyleValue::CalcValue { dimension.percentage() };
|
||||
if (dimension.is_resolution()) {
|
||||
// Resolution is not allowed in calc()
|
||||
return {};
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue