mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Implement CSS Resolution class
This corresponds to `<resolution>` in the grammar.
This commit is contained in:
parent
bd79c303f6
commit
0465abcfec
Notes:
sideshowbarker
2024-07-17 18:20:07 +09:00
Author: https://github.com/AtkinsSJ
Commit: 0465abcfec
Pull-request: https://github.com/SerenityOS/serenity/pull/12727
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