diff options
author | Andreas Kling <kling@serenityos.org> | 2021-03-07 16:14:04 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-07 17:45:15 +0100 |
commit | fefb05f6f3caa7b531c3981fb1c539e9396f74d4 (patch) | |
tree | 4e44e2c3ace9818d0c354da2cd96380388709d9c /Userland/Libraries/LibWeb/Dump.cpp | |
parent | 0af476266200a707770959173c9e7e2028235119 (diff) | |
download | serenity-fefb05f6f3caa7b531c3981fb1c539e9396f74d4.zip |
LibWeb: Split CSS::StyleSheet into StyleSheet and CSSStyleSheet
This is a little convoluted but matches the CSSOM specification.
Diffstat (limited to 'Userland/Libraries/LibWeb/Dump.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Dump.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/Dump.cpp b/Userland/Libraries/LibWeb/Dump.cpp index f844a9a329..1be93503a7 100644 --- a/Userland/Libraries/LibWeb/Dump.cpp +++ b/Userland/Libraries/LibWeb/Dump.cpp @@ -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); } } |