mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +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
Notes:
sideshowbarker
2024-07-18 02:01:35 +09:00
Author: https://github.com/AtkinsSJ
Commit: 0f393771b7
Pull-request: https://github.com/SerenityOS/serenity/pull/10582
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