From 56e69c4f2ef1d0b0cca361d197cc9eb881a1c778 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sat, 29 May 2021 01:17:36 +0100 Subject: 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. --- Userland/Libraries/LibWeb/Loader/FrameLoader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland/Libraries/LibWeb/Loader') diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp index 55a251deee..b33878c742 100644 --- a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp @@ -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; -- cgit v1.2.3