1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

LibWeb: Call page_did_start_loading() before load_resource()

Otherwise we would sometimes (dependent on the load time, I believe) end
up setting the document and eventually calling title change callbacks
before communicating that the page started loading.
This commit is contained in:
Linus Groh 2021-05-29 01:17:36 +01:00
parent 94a56c3aee
commit 56e69c4f2e

View file

@ -143,13 +143,13 @@ bool FrameLoader::load(const LoadRequest& request, Type type)
auto& url = request.url();
set_resource(ResourceLoader::the().load_resource(Resource::Type::Generic, request));
if (type == Type::Navigation) {
if (auto* page = frame().page())
page->client().page_did_start_loading(url);
}
set_resource(ResourceLoader::the().load_resource(Resource::Type::Generic, request));
if (type == Type::IFrame)
return true;