mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03: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
@ -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 New Issue
Block a user