![electron-roller[bot]](/assets/img/avatar_default.png)
* chore: bump chromium in DEPS to 132.0.6817.0 * chore: update chromium patches * 5979290: Temoporarily disable crel on arm. | https://chromium-review.googlesource.com/c/chromium/src/+/5979290 * 5981701: Include callback.h instead of callback_forward.h | https://chromium-review.googlesource.com/c/chromium/src/+/5981701 * 5964918: [v8 code cache] Add a wpt_internal test demonstrating the code cache 304 problem | https://chromium-review.googlesource.com/c/chromium/src/+/5964918 * 5969697: Add NetworkTrafficAnnotationTag to PreconnectManager | https://chromium-review.googlesource.com/c/chromium/src/+/5969697 * chore: update remaining patches * chore: bump chromium in DEPS to 132.0.6818.0 * chore: update patches * 5983492: MPArch GuestView: Have executeScript target correct frame | https://chromium-review.googlesource.com/c/chromium/src/+/5983492 * chore: bump chromium in DEPS to 132.0.6820.0 * chore: update patches * 5989717: Revert "win: Remove special check for 10.0.22621.2428 Win SDK version" | https://chromium-review.googlesource.com/c/chromium/src/+/5989717 * 5968218: Send PDF Searchifier running state to browser to show UX elements. | https://chromium-review.googlesource.com/c/chromium/src/+/5968218 * build: also update the MSVS_HASH for WOA --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com> Co-authored-by: VerteDinde <vertedinde@electronjs.org>
49 lines
2.4 KiB
Diff
49 lines
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Cheng Zhao <zcbenz@gmail.com>
|
|
Date: Thu, 20 Sep 2018 17:45:47 -0700
|
|
Subject: disable_hidden.patch
|
|
|
|
Electron uses this to disable background throttling for hidden windows.
|
|
|
|
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
|
index 66ed04ce55f36ec5c0d469860d8998dec26fa943..fe40b67aa7a158855eea6f03c13d02b614c384de 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
|
@@ -790,6 +790,10 @@ void RenderWidgetHostImpl::WasHidden() {
|
|
return;
|
|
}
|
|
|
|
+ if (disable_hidden_) {
|
|
+ return;
|
|
+ }
|
|
+
|
|
// Cancel pending pointer lock requests, unless there's an open user prompt.
|
|
// Prompts should remain open and functional across tab switches.
|
|
if (!delegate_->IsWaitingForPointerLockPrompt(this)) {
|
|
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
|
index 01b87c84b32c01b93f04a9b8f477564915b1e8d0..8e08570ab381cbbf70d6729f8f13059bd953a9c2 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
|
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
|
@@ -1023,6 +1023,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
|
// Requests a commit and forced redraw in the renderer compositor.
|
|
void ForceRedrawForTesting();
|
|
|
|
+ // Electron: Prevents the widget from getting hidden.
|
|
+ bool disable_hidden_ = false;
|
|
+
|
|
protected:
|
|
// |routing_id| must not be MSG_ROUTING_NONE.
|
|
// If this object outlives |delegate|, DetachDelegate() must be called when
|
|
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
index 47b5f2b63ecf2d6ddead54a0be611aa68aa7d05d..b8c1377d3144031f108bc79dc49d81a4ffbdb68d 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
@@ -650,7 +650,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
|
CHECK(visibility_ == Visibility::HIDDEN ||
|
|
visibility_ == Visibility::OCCLUDED);
|
|
|
|
- if (!host()->is_hidden()) {
|
|
+ if (!host()->is_hidden() && !host()->disable_hidden_) {
|
|
host()->WasHidden();
|
|
aura::WindowTreeHost* host = window_->GetHost();
|
|
aura::Window* parent = window_->parent();
|