mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibWeb: Usefully dump CSS property rules
Sample dump: ``` CSSPropertyRule: name: --valid syntax: <color> | none inherits: false initial-value: red ```
This commit is contained in:
parent
a4c72f50c0
commit
1dd3865de9
Notes:
github-actions[bot]
2024-10-23 05:56:33 +00:00
Author: https://github.com/a-ungurianu Commit: https://github.com/LadybirdBrowser/ladybird/commit/1dd3865de9b Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1777 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 17 additions and 7 deletions
|
@ -788,6 +788,23 @@ void dump_supports_rule(StringBuilder& builder, CSS::CSSSupportsRule const& supp
|
|||
dump_rule(builder, rule, indent_levels + 2);
|
||||
}
|
||||
|
||||
void dump_property_rule(StringBuilder& builder, CSS::CSSPropertyRule const& property, int indent_levels)
|
||||
{
|
||||
indent(builder, indent_levels + 1);
|
||||
builder.appendff("name: {}\n", property.name());
|
||||
|
||||
indent(builder, indent_levels + 1);
|
||||
builder.appendff("syntax: {}\n", property.syntax());
|
||||
|
||||
indent(builder, indent_levels + 1);
|
||||
builder.appendff("inherits: {}\n", property.inherits());
|
||||
|
||||
if (property.initial_value().has_value()) {
|
||||
indent(builder, indent_levels + 1);
|
||||
builder.appendff("initial-value: {}\n", property.initial_value().value());
|
||||
}
|
||||
}
|
||||
|
||||
void dump_declaration(StringBuilder& builder, CSS::PropertyOwningCSSStyleDeclaration const& declaration, int indent_levels)
|
||||
{
|
||||
indent(builder, indent_levels);
|
||||
|
@ -808,13 +825,6 @@ 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()) {
|
||||
|
|
Loading…
Reference in a new issue