45 lines
1.8 KiB
Diff
45 lines
1.8 KiB
Diff
From: uazo <uazo@users.noreply.github.com>
|
|
Date: Thu, 20 Apr 2023 07:45:37 +0000
|
|
Subject: Multi-Screen Window Placement API fix
|
|
|
|
Links the use of screen.isExtended to WINDOW_MANAGEMENT permission
|
|
granted by user
|
|
|
|
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
|
---
|
|
third_party/blink/renderer/core/frame/screen.cc | 2 +-
|
|
third_party/blink/renderer/core/frame/screen.h | 4 ++++
|
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/third_party/blink/renderer/core/frame/screen.cc b/third_party/blink/renderer/core/frame/screen.cc
|
|
--- a/third_party/blink/renderer/core/frame/screen.cc
|
|
+++ b/third_party/blink/renderer/core/frame/screen.cc
|
|
@@ -211,7 +211,7 @@ bool Screen::isExtended() const {
|
|
return false;
|
|
}
|
|
|
|
- return GetScreenInfo().is_extended;
|
|
+ return GetScreenInfo().is_extended && window_management_permission_granted_;
|
|
}
|
|
|
|
gfx::Rect Screen::GetRect(bool available) const {
|
|
diff --git a/third_party/blink/renderer/core/frame/screen.h b/third_party/blink/renderer/core/frame/screen.h
|
|
--- a/third_party/blink/renderer/core/frame/screen.h
|
|
+++ b/third_party/blink/renderer/core/frame/screen.h
|
|
@@ -34,10 +34,14 @@
|
|
#include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.h"
|
|
#include "third_party/blink/renderer/core/frame/cached_permission_status.h"
|
|
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
|
+#include "third_party/blink/public/mojom/permissions/permission.mojom-blink.h"
|
|
+#include "third_party/blink/renderer/platform/mojo/heap_mojo_remote.h"
|
|
#include "third_party/blink/renderer/platform/supplementable.h"
|
|
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
|
|
#include "ui/gfx/geometry/rect.h"
|
|
|
|
+#include "third_party/blink/public/mojom/permissions/permission.mojom-blink.h"
|
|
+
|
|
namespace display {
|
|
struct ScreenInfo;
|
|
}
|
|
--
|