mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Move CSSRule dumping code into CSSRule classes
Having the dumping code in a separate Dump.cpp meant that it was often overlooked when the rules gained new features, and also limits dumping to publicly-accessible information.
This commit is contained in:
parent
285892b5dd
commit
180cd4b799
Notes:
github-actions[bot]
2025-12-04 16:25:53 +00:00
Author: https://github.com/AtkinsSJ
Commit: 180cd4b799
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7018
32 changed files with 211 additions and 204 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, the SerenityOS developers.
|
||||
* Copyright (c) 2021-2024, Sam Atkins <sam@ladybird.org>
|
||||
* Copyright (c) 2021-2025, Sam Atkins <sam@ladybird.org>
|
||||
* Copyright (c) 2022-2024, Andreas Kling <andreas@ladybird.org>
|
||||
* Copyright (c) 2025, Lorenz Ackermann <me@lorenzackermann.xyz>
|
||||
*
|
||||
|
|
@ -18,6 +18,7 @@
|
|||
#include <LibWeb/CSS/StyleComputer.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOMURL/DOMURL.h>
|
||||
#include <LibWeb/Dump.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/MIME.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Responses.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
|
@ -213,4 +214,12 @@ Optional<String> CSSImportRule::supports_text() const
|
|||
return m_supports->to_string();
|
||||
}
|
||||
|
||||
void CSSImportRule::dump(StringBuilder& builder, int indent_levels) const
|
||||
{
|
||||
Base::dump(builder, indent_levels);
|
||||
|
||||
dump_indent(builder, indent_levels + 1);
|
||||
builder.appendff("Document URL: {}\n", url().to_string());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue