mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
LibWeb: Add <general-enclosed> support to Media Queries
This commit is contained in:
parent
b03dac99a5
commit
7d5c626276
3 changed files with 19 additions and 1 deletions
|
@ -106,6 +106,9 @@ String MediaQuery::MediaCondition::to_string() const
|
|||
case Type::Or:
|
||||
builder.join(" or ", conditions);
|
||||
break;
|
||||
case Type::GeneralEnclosed:
|
||||
builder.append(general_enclosed->to_string());
|
||||
break;
|
||||
}
|
||||
builder.append(')');
|
||||
return builder.to_string();
|
||||
|
@ -122,6 +125,8 @@ MatchResult MediaQuery::MediaCondition::evaluate(DOM::Window const& window) cons
|
|||
return evaluate_and(conditions, [&](auto& child) { return child.evaluate(window); });
|
||||
case Type::Or:
|
||||
return evaluate_or(conditions, [&](auto& child) { return child.evaluate(window); });
|
||||
case Type::GeneralEnclosed:
|
||||
return general_enclosed->evaluate();
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue