From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- dom/base/nsGlobalWindowInner.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'dom/base/nsGlobalWindowInner.h') diff --git a/dom/base/nsGlobalWindowInner.h b/dom/base/nsGlobalWindowInner.h index 100dbb9699..15fbc4259f 100644 --- a/dom/base/nsGlobalWindowInner.h +++ b/dom/base/nsGlobalWindowInner.h @@ -104,6 +104,7 @@ class ClientSource; class Console; class Crypto; class CustomElementRegistry; +class DataTransfer; class DocGroup; class External; class Function; @@ -127,6 +128,7 @@ class WebTaskScheduler; class WebTaskSchedulerMainThread; class SpeechSynthesis; class Timeout; +class TrustedTypePolicyFactory; class VisualViewport; class VRDisplay; enum class VRDisplayEventReason : uint8_t; @@ -1254,11 +1256,18 @@ class nsGlobalWindowInner final : public mozilla::dom::EventTarget, virtual JS::loader::ModuleLoaderBase* GetModuleLoader( JSContext* aCx) override; + mozilla::dom::TrustedTypePolicyFactory* TrustedTypes(); + + void SetCurrentPasteDataTransfer(mozilla::dom::DataTransfer* aDataTransfer); + mozilla::dom::DataTransfer* GetCurrentPasteDataTransfer() const; + private: RefPtr mContentMediaController; RefPtr mWebTaskScheduler; + RefPtr mTrustedTypePolicyFactory; + protected: // Whether we need to care about orientation changes. bool mHasOrientationChangeListeners : 1; @@ -1460,6 +1469,10 @@ class nsGlobalWindowInner final : public mozilla::dom::EventTarget, mGroupMessageManagers{1}; } mChromeFields; + // Cache the DataTransfer created for a paste event, this will be reset after + // the event is dispatched. + RefPtr mCurrentPasteDataTransfer; + // These fields are used by the inner and outer windows to prevent // programatically moving the window while the mouse is down. static bool sMouseDown; -- cgit v1.2.3