electron/patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch
trop[bot] 8de0bb5bc3
chore: bump chromium to 138.0.7175.0 (37-x-y) (#47078)
* chore: bump chromium in DEPS to 138.0.7166.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 138.0.7166.2

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* 6508373: Add WebContents, Tab getters for future Clank navigation capture rework

6508373

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 6470924: Introduce auto-populated Search Engine icons.

6470924

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 6502977: Force same tab navigation while actor coordinator is acting on a tab

6502977

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: bump chromium in DEPS to 138.0.7168.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* fix grit patch

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: bump Chromium to 138.0.7169.2

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fixup! 6508373: Add WebContents, Tab getters for future Clank navigation capture rework

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 6493688: NavigationThrottleRunner2: void CreateThrottlesForNavigation

6493688

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 6488755: Reland "WebSQL: Remove WebPreference"

6488755

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 6428707: FSA: Only normalize the hardcoded rules once during initialization

6428707

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: fixup patch indices

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: bump chromium in DEPS to 138.0.7170.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* 6514121: Remove origin calculation debug info and related methods

 6514121

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: bump chromium in DEPS to 138.0.7172.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 138.0.7173.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 138.0.7175.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* fixup! 6514121: Remove origin calculation debug info and related methods

Refs 6514121

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* 6531585: Don't retry LayerTreeSink creation on the high priority queue

Refs 6531585

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* 6512253: Modernize base::apple's base bundle ID

Refs 6512253

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* fixup! 6428707: FSA: Only normalize the hardcoded rules once during initialization

Refs 6428707

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* fixup! 6508373: Add WebContents, Tab getters for future Clank navigation capture rework

Refs 6508373

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* chore: update patches

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* chore: update patches

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-05-14 10:07:45 -04:00

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 01b97e569a69fb1395e63492ac75432d648bb71f..6e58d859e2afd3bd8b9b17c53ba9ccc6dbdcd458 100644
--- a/third_party/blink/renderer/core/loader/document_loader.h
+++ b/third_party/blink/renderer/core/loader/document_loader.h
@@ -325,7 +325,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
soft_navigation_heuristics_task_id,
bool should_skip_screenshot);
- void SetDefersLoading(LoaderFreezeMode);
+ void SetDefersLoading(LoaderFreezeMode) override;
DocumentLoadTiming& GetTiming() { return document_load_timing_; }