LibWeb: Implement CSSNestedDeclarations type

This is basically a list of properties, without a block around it. It'll
be part of CSSStyleRules' contents.
This commit is contained in:
Sam Atkins 2024-10-15 15:59:31 +01:00 committed by Andreas Kling
commit 9c66ab356a
Notes: github-actions[bot] 2024-10-17 18:57:40 +00:00
13 changed files with 155 additions and 26 deletions

View file

@ -53,11 +53,11 @@ FlyString const& CSSRule::parent_layer_internal_qualified_name_slow_case() const
Vector<FlyString> layer_names;
for (auto* rule = parent_rule(); rule; rule = rule->parent_rule()) {
switch (rule->type()) {
case CSSRule::Type::Import:
case Type::Import:
// TODO: Handle `layer(foo)` in import rules once we implement that.
break;
case CSSRule::Type::LayerBlock: {
case Type::LayerBlock: {
auto& layer_block = static_cast<CSSLayerBlockRule const&>(*rule);
layer_names.append(layer_block.internal_name());
break;
@ -65,14 +65,15 @@ FlyString const& CSSRule::parent_layer_internal_qualified_name_slow_case() const
// Ignore everything else
// Note that LayerStatement cannot have child rules so we still ignore it here.
case CSSRule::Type::LayerStatement:
case CSSRule::Type::Style:
case CSSRule::Type::Media:
case CSSRule::Type::FontFace:
case CSSRule::Type::Keyframes:
case CSSRule::Type::Keyframe:
case CSSRule::Type::Namespace:
case CSSRule::Type::Supports:
case Type::LayerStatement:
case Type::Style:
case Type::Media:
case Type::FontFace:
case Type::Keyframes:
case Type::Keyframe:
case Type::Namespace:
case Type::Supports:
case Type::NestedDeclarations:
break;
}
}