mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibWeb: Add and implement CSSPropertyRule
IDL and bindings
This commit is contained in:
parent
648fac7215
commit
50d64b0fb7
Notes:
github-actions[bot]
2024-10-23 05:56:46 +00:00
Author: https://github.com/a-ungurianu 🔰
Commit: 50d64b0fb7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1777
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/AtkinsSJ ✅
15 changed files with 160 additions and 1 deletions
|
@ -15,6 +15,7 @@
|
|||
#include <LibWeb/CSS/CSSLayerStatementRule.h>
|
||||
#include <LibWeb/CSS/CSSMediaRule.h>
|
||||
#include <LibWeb/CSS/CSSNestedDeclarations.h>
|
||||
#include <LibWeb/CSS/CSSPropertyRule.h>
|
||||
#include <LibWeb/CSS/CSSRule.h>
|
||||
#include <LibWeb/CSS/CSSStyleRule.h>
|
||||
#include <LibWeb/CSS/CSSStyleSheet.h>
|
||||
|
@ -651,6 +652,9 @@ void dump_rule(StringBuilder& builder, CSS::CSSRule const& rule, int indent_leve
|
|||
case CSS::CSSRule::Type::Supports:
|
||||
dump_supports_rule(builder, verify_cast<CSS::CSSSupportsRule const>(rule), indent_levels);
|
||||
break;
|
||||
case CSS::CSSRule::Type::Property:
|
||||
dump_property_rule(builder, verify_cast<CSS::CSSPropertyRule const>(rule), indent_levels);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -804,6 +808,13 @@ void dump_declaration(StringBuilder& builder, CSS::PropertyOwningCSSStyleDeclara
|
|||
}
|
||||
}
|
||||
|
||||
void dump_property_rule(StringBuilder& builder, CSS::CSSPropertyRule const& property, int indent_levels)
|
||||
{
|
||||
(void)builder;
|
||||
(void)property;
|
||||
(void)indent_levels;
|
||||
}
|
||||
|
||||
void dump_style_rule(StringBuilder& builder, CSS::CSSStyleRule const& rule, int indent_levels)
|
||||
{
|
||||
for (auto& selector : rule.selectors()) {
|
||||
|
@ -903,5 +914,4 @@ void dump_nested_declarations(StringBuilder& builder, CSS::CSSNestedDeclarations
|
|||
builder.append(" Nested declarations:\n"sv);
|
||||
dump_declaration(builder, declarations.declaration(), indent_levels + 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue