mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb/CSS: Make Supports responsible for dumping itself entirely
This will reduce the boilerplate for other things that want to dump a Supports, such as `@import`.
This commit is contained in:
parent
180cd4b799
commit
1db13c52be
Notes:
github-actions[bot]
2025-12-04 16:25:45 +00:00
Author: https://github.com/AtkinsSJ
Commit: 1db13c52be
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7018
2 changed files with 5 additions and 4 deletions
|
|
@ -63,9 +63,7 @@ void CSSSupportsRule::dump(StringBuilder& builder, int indent_levels) const
|
|||
{
|
||||
Base::dump(builder, indent_levels);
|
||||
|
||||
dump_indent(builder, indent_levels + 1);
|
||||
builder.append("Supports:\n"sv);
|
||||
supports().dump(builder, indent_levels + 2);
|
||||
supports().dump(builder, indent_levels + 1);
|
||||
|
||||
dump_indent(builder, indent_levels + 1);
|
||||
builder.appendff("Rules ({}):\n", css_rules().length());
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibWeb/CSS/Supports.h>
|
||||
#include <LibWeb/Dump.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
|
|
@ -86,7 +87,9 @@ String Supports::to_string() const
|
|||
|
||||
void Supports::dump(StringBuilder& builder, int indent_levels) const
|
||||
{
|
||||
m_condition->dump(builder, indent_levels);
|
||||
dump_indent(builder, indent_levels);
|
||||
builder.appendff("Supports condition: (matches = {})\n", m_matches);
|
||||
m_condition->dump(builder, indent_levels + 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue