mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
LibWeb: Split CSS::StyleSheet into StyleSheet and CSSStyleSheet
This is a little convoluted but matches the CSSOM specification.
This commit is contained in:
@@ -31,8 +31,8 @@
|
||||
#include <LibWeb/CSS/CSSImportRule.h>
|
||||
#include <LibWeb/CSS/CSSRule.h>
|
||||
#include <LibWeb/CSS/CSSStyleRule.h>
|
||||
#include <LibWeb/CSS/CSSStyleSheet.h>
|
||||
#include <LibWeb/CSS/PropertyID.h>
|
||||
#include <LibWeb/CSS/StyleSheet.h>
|
||||
#include <LibWeb/DOM/Comment.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
@@ -440,9 +440,11 @@ void dump_sheet(const CSS::StyleSheet& sheet)
|
||||
|
||||
void dump_sheet(StringBuilder& builder, const CSS::StyleSheet& sheet)
|
||||
{
|
||||
builder.appendff("StyleSheet{{{}}}: {} rule(s)\n", &sheet, sheet.rules().size());
|
||||
VERIFY(is<CSS::CSSStyleSheet>(sheet));
|
||||
|
||||
for (auto& rule : sheet.rules()) {
|
||||
builder.appendff("CSSStyleSheet{{{}}}: {} rule(s)\n", &sheet, static_cast<const CSS::CSSStyleSheet&>(sheet).rules().size());
|
||||
|
||||
for (auto& rule : static_cast<const CSS::CSSStyleSheet&>(sheet).rules()) {
|
||||
dump_rule(builder, rule);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user