mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +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)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ WEB_API void dump_tree(StringBuilder&, Layout::Node const&, bool show_cascaded_p
|
|||
WEB_API void dump_tree(Layout::Node const&, bool show_cascaded_properties = false);
|
||||
WEB_API void dump_tree(StringBuilder&, Painting::Paintable const&, bool colorize = false, int indent = 0);
|
||||
WEB_API void dump_tree(Painting::Paintable const&);
|
||||
void dump_sheet(StringBuilder&, CSS::StyleSheet const&);
|
||||
void dump_sheet(StringBuilder&, CSS::StyleSheet const&, int indent_levels = 0);
|
||||
WEB_API void dump_sheet(CSS::StyleSheet const&);
|
||||
void dump_rule(StringBuilder&, CSS::CSSRule const&, int indent_levels = 0);
|
||||
void dump_rule(CSS::CSSRule const&);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue