summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-04-12 16:16:55 +0100
committerAndreas Kling <kling@serenityos.org>2022-04-12 23:03:46 +0200
commit269810b95464b65c57c53f2c97cca876df8c992b (patch)
treea9fe0eff664f34b42b4a010be6fedb9318096566 /Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.cpp
parent69496f4afdfd7f97d555ae0be4fb0e3c3576512b (diff)
downloadserenity-269810b95464b65c57c53f2c97cca876df8c992b.zip
LibWeb: Break friendship between CSS Declaration and Parser
This means deviating slightly from the spec in order to construct a fully-initialized Declaration instead of creating an empty one and then poking at its internals. DeclarationOrAtRule should probably use a Variant, but for now, making its Declaration member optional is quick and easy.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.cpp b/Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.cpp
index 1094b921a1..24ba37d5ac 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/DeclarationOrAtRule.cpp
@@ -32,7 +32,7 @@ String DeclarationOrAtRule::to_string() const
builder.append(m_at->to_string());
break;
case DeclarationType::Declaration:
- builder.append(m_declaration.to_string());
+ builder.append(m_declaration->to_string());
break;
}