mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Make dump_sheet() indentable
Not all style sheets are top-level, so this will help make that hierarchy clearer.
This commit is contained in:
parent
5343c9bd2e
commit
2a716eaf48
Notes:
github-actions[bot]
2025-12-04 16:25:30 +00:00
Author: https://github.com/AtkinsSJ
Commit: 2a716eaf48
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7018
2 changed files with 4 additions and 4 deletions
|
|
@ -702,14 +702,14 @@ void dump_sheet(CSS::StyleSheet const& sheet)
|
|||
dbgln("{}", builder.string_view());
|
||||
}
|
||||
|
||||
void dump_sheet(StringBuilder& builder, CSS::StyleSheet const& sheet)
|
||||
void dump_sheet(StringBuilder& builder, CSS::StyleSheet const& sheet, int indent_levels)
|
||||
{
|
||||
dump_indent(builder, indent_levels);
|
||||
auto& css_stylesheet = as<CSS::CSSStyleSheet>(sheet);
|
||||
|
||||
builder.appendff("CSSStyleSheet{{{}}}: {} rule(s)\n", &sheet, css_stylesheet.rules().length());
|
||||
|
||||
for (auto& rule : css_stylesheet.rules())
|
||||
dump_rule(builder, rule);
|
||||
dump_rule(builder, rule, indent_levels + 1);
|
||||
}
|
||||
|
||||
void dump_tree(Painting::Paintable const& paintable)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue