mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibWeb: Move image resource request out of ImageStyleValue constructor
This always felt awkward to me, and required a few other hacks to make it work. Now, the request is only started when `load_bitmap()` is called, which we do inside `NodeWithStyle::apply_style()`.
This commit is contained in:
parent
cf3c125e77
commit
0f393771b7
5 changed files with 17 additions and 9 deletions
|
@ -2273,7 +2273,7 @@ RefPtr<StyleValue> Parser::parse_image_value(ParsingContext const& context, Styl
|
|||
{
|
||||
auto url = parse_url_function(context, component_value);
|
||||
if (url.has_value())
|
||||
return ImageStyleValue::create(url.value(), context.document());
|
||||
return ImageStyleValue::create(url.value());
|
||||
// FIXME: Handle gradients.
|
||||
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue