mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibWeb: Parse Element.style url functions relative to the document
Previously we used a parsing context with no access to the document, so any URLs in url() functions would become invalid. Fixes the images on Steam's store carousel, which sets Element.style.backgroundImage to url() functions.
This commit is contained in:
parent
264b9b73ac
commit
14fb6372c3
Notes:
sideshowbarker
2024-07-17 03:45:48 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/14fb6372c3 Pull-request: https://github.com/SerenityOS/serenity/pull/18081
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue