summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp
index a44712e99a..03ab7bbd85 100644
--- a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp
+++ b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp
@@ -93,7 +93,9 @@ WebIDL::ExceptionOr<void> PropertyOwningCSSStyleDeclaration::set_property(Proper
return {};
// 5. Let component value list be the result of parsing value for property property.
- auto component_value_list = parse_css_value(CSS::Parser::ParsingContext { realm() }, value, property_id);
+ auto component_value_list = is<ElementInlineCSSStyleDeclaration>(this)
+ ? parse_css_value(CSS::Parser::ParsingContext { static_cast<ElementInlineCSSStyleDeclaration&>(*this).element()->document() }, value, property_id)
+ : parse_css_value(CSS::Parser::ParsingContext { realm() }, value, property_id);
// 6. If component value list is null, then return.
if (!component_value_list)