mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 12:37:40 +00:00
LibWeb: Make HashMap copy of inline CSS declarations fallible
This commit is contained in:
parent
592e6c89a5
commit
efbf6b7e5f
1 changed files with 2 additions and 1 deletions
|
@ -458,7 +458,8 @@ WebIDL::ExceptionOr<void> ElementInlineCSSStyleDeclaration::set_css_text(StringV
|
||||||
|
|
||||||
// 3. Parse the given value and, if the return value is not the empty list, insert the items in the list into the declarations, in specified order.
|
// 3. Parse the given value and, if the return value is not the empty list, insert the items in the list into the declarations, in specified order.
|
||||||
auto style = parse_css_style_attribute(CSS::Parser::ParsingContext(m_element->document()), css_text, *m_element.ptr());
|
auto style = parse_css_style_attribute(CSS::Parser::ParsingContext(m_element->document()), css_text, *m_element.ptr());
|
||||||
set_the_declarations(style->properties(), style->custom_properties());
|
auto custom_properties = TRY_OR_THROW_OOM(vm(), style->custom_properties().clone());
|
||||||
|
set_the_declarations(style->properties(), move(custom_properties));
|
||||||
|
|
||||||
// 4. Update style attribute for the CSS declaration block.
|
// 4. Update style attribute for the CSS declaration block.
|
||||||
update_style_attribute();
|
update_style_attribute();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue