![electron-roller[bot]](/assets/img/avatar_default.png)
* chore: bump chromium in DEPS to 140.0.7314.0 * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 * 6632993: PDF Searchify IPH: Use embedder WebContents for GuestView PDF Refs https://chromium-review.googlesource.com/c/chromium/src/+/6632993 * 6769214: [ios blink] Set IOSurface shared memory region on all GMB handles Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769214 * chore: update patches * 6769572: [soft navs]: Move AsyncSameDocumentNavigationStarted to TaskAttributionTracker Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769572 * chore: node gen-libc++-filenames.js * 6765740: [SxS] Implement support for split view in extensions API Refs https://chromium-review.googlesource.com/c/chromium/src/+/6765740 * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
42 lines
2.2 KiB
Diff
42 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samuel Attard <marshallofsound@electronjs.org>
|
|
Date: Thu, 9 Mar 2023 01:28:56 -0800
|
|
Subject: feat: expose DocumentLoader::SetDefersLoading on WebDocumentLoader
|
|
|
|
This allows embedders to call SetDefersLoading without reaching into Blink internals. Electron uses this to defer page loading until the preload scripts have finished executing.
|
|
This might be upstreamable?
|
|
|
|
diff --git a/third_party/blink/public/web/web_document_loader.h b/third_party/blink/public/web/web_document_loader.h
|
|
index 33e23680b927d417b0882c7572fe32dc2d2b90c3..9413492f8e0fd6c5371c66329e1ad6d4163ba670 100644
|
|
--- a/third_party/blink/public/web/web_document_loader.h
|
|
+++ b/third_party/blink/public/web/web_document_loader.h
|
|
@@ -38,6 +38,7 @@
|
|
#include "third_party/blink/public/platform/cross_variant_mojo_util.h"
|
|
#include "third_party/blink/public/platform/web_archive_info.h"
|
|
#include "third_party/blink/public/platform/web_common.h"
|
|
+#include "third_party/blink/public/platform/web_loader_freeze_mode.h"
|
|
#include "third_party/blink/public/platform/web_source_location.h"
|
|
#include "third_party/blink/public/web/web_navigation_type.h"
|
|
|
|
@@ -63,6 +64,8 @@ class BLINK_EXPORT WebDocumentLoader {
|
|
virtual std::unique_ptr<ExtraData> Clone() = 0;
|
|
};
|
|
|
|
+ virtual void SetDefersLoading(WebLoaderFreezeMode) = 0;
|
|
+
|
|
static bool WillLoadUrlAsEmpty(const WebURL&);
|
|
|
|
// Returns the http referrer of original request which initited this load.
|
|
diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h
|
|
index a41f344dca8ec3a9004874f4820b742c27999738..222c1d749174e434878cc762625ac8aabe10f5e6 100644
|
|
--- a/third_party/blink/renderer/core/loader/document_loader.h
|
|
+++ b/third_party/blink/renderer/core/loader/document_loader.h
|
|
@@ -322,7 +322,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
|
|
std::optional<scheduler::TaskAttributionId> task_state_id,
|
|
bool should_skip_screenshot);
|
|
|
|
- void SetDefersLoading(LoaderFreezeMode);
|
|
+ void SetDefersLoading(LoaderFreezeMode) override;
|
|
|
|
DocumentLoadTiming& GetTiming() { return document_load_timing_; }
|
|
|