mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibWeb: Only schedule ImageStyleValue resource load once
load_any_resources() may get called multiple times during layout, but once we've started a resource load, we don't need to do it again.
This commit is contained in:
parent
faf9746244
commit
9018b58875
Notes:
sideshowbarker
2024-07-17 07:22:15 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/9018b58875
1 changed files with 3 additions and 0 deletions
|
@ -1482,6 +1482,9 @@ void ImageStyleValue::load_any_resources(DOM::Document& document)
|
|||
if (m_bitmap)
|
||||
return;
|
||||
|
||||
if (resource())
|
||||
return;
|
||||
|
||||
m_document = &document;
|
||||
auto request = LoadRequest::create_for_url_on_page(m_url, document.page());
|
||||
set_resource(ResourceLoader::the().load_resource(Resource::Type::Image, request));
|
||||
|
|
Loading…
Reference in a new issue