summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-05-29 01:17:36 +0100
committerLinus Groh <mail@linusgroh.de>2021-05-29 01:17:36 +0100
commit56e69c4f2ef1d0b0cca361d197cc9eb881a1c778 (patch)
treee0ddd8cf1e7a42798a5a430a82bac480d62b7684 /Userland/Libraries
parent94a56c3aee47cabcd044ae4180f3befbe4a16dee (diff)
downloadserenity-56e69c4f2ef1d0b0cca361d197cc9eb881a1c778.zip
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.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibWeb/Loader/FrameLoader.cpp4
1 files changed, 2 insertions, 2 deletions
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;