mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibWeb/CSS: Pass Length::ResolutionContext to resolve_integer
The length resolution context might be needed even when resolving an integer value, since it might contain a sign() function with length values inside. This fixes a WPT subtest.
This commit is contained in:
committed by
Sam Atkins
parent
8bec80ac47
commit
1882a2e19b
@@ -569,8 +569,7 @@ Optional<MediaFeatureValue> Parser::parse_media_feature_value(MediaFeatureID med
|
||||
auto transaction = tokens.begin_transaction();
|
||||
tokens.discard_whitespace();
|
||||
if (auto integer = parse_integer(tokens); integer.has_value()) {
|
||||
auto integer_value = integer.value().resolved();
|
||||
if (integer_value == 0 || integer_value == 1) {
|
||||
if (integer.value().is_calculated() || integer->value() == 0 || integer->value() == 1) {
|
||||
transaction.commit();
|
||||
return MediaFeatureValue(integer.release_value());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user