From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- dom/base/Document.h | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) (limited to 'dom/base/Document.h') diff --git a/dom/base/Document.h b/dom/base/Document.h index a52c61addf..0b0d0ca3d0 100644 --- a/dom/base/Document.h +++ b/dom/base/Document.h @@ -244,6 +244,7 @@ class EventListener; struct FailedCertSecurityInfo; class FeaturePolicy; class FontFaceSet; +class FragmentDirective; class FrameRequestCallback; class ImageTracker; class HighlightRegistry; @@ -2992,15 +2993,6 @@ class Document : public nsINode, SetStateObject(aDocument->mStateObjectContainer); } - /** - * Returns true if there is a lightweight theme specified. This is used to - * determine the state of the :-moz-lwtheme pseudo-class. - */ - bool ComputeDocumentLWTheme() const; - void ResetDocumentLWTheme() { - UpdateDocumentStates(DocumentState::LWTHEME, true); - } - // Whether we're a media document or not. enum class MediaDocumentKind { NotMedia, @@ -3281,7 +3273,7 @@ class Document : public nsINode, void SetDomain(const nsAString& aDomain, mozilla::ErrorResult& rv); void GetCookie(nsAString& aCookie, mozilla::ErrorResult& rv); void SetCookie(const nsAString& aCookie, mozilla::ErrorResult& rv); - void GetReferrer(nsAString& aReferrer) const; + void GetReferrer(nsACString& aReferrer) const; void GetLastModified(nsAString& aLastModified) const; void GetReadyState(nsAString& aReadyState) const; @@ -3377,7 +3369,6 @@ class Document : public nsINode, bool aFocusPreviousElement, bool aFireEvents); - MOZ_CAN_RUN_SCRIPT_BOUNDARY void HideAllPopoversWithoutRunningScript(); // Hides the given popover element, see // https://html.spec.whatwg.org/multipage/popover.html#hide-popover-algorithm MOZ_CAN_RUN_SCRIPT void HidePopover(Element& popover, @@ -4100,6 +4091,13 @@ class Document : public nsINode, */ class HighlightRegistry& HighlightRegistry(); + /** + * @brief Returns the `FragmentDirective` object which contains information + * and functionality to extract or create text directives. + * Guaranteed to be non-null. + */ + class FragmentDirective* FragmentDirective(); + bool ShouldResistFingerprinting(RFPTarget aTarget) const; bool IsInPrivateBrowsing() const; @@ -4159,7 +4157,8 @@ class Document : public nsINode, // Apply the fullscreen state to the document, and trigger related // events. It returns false if the fullscreen element ready check // fails and nothing gets changed. - bool ApplyFullscreen(UniquePtr); + MOZ_CAN_RUN_SCRIPT_BOUNDARY bool ApplyFullscreen( + UniquePtr); void RemoveDocStyleSheetsFromStyleSets(); void ResetStylesheetsToURI(nsIURI* aURI); @@ -5314,9 +5313,6 @@ class Document : public nsINode, // Pres shell resolution saved before entering fullscreen mode. float mSavedResolution; - // Pres shell resolution saved before creating a MobileViewportManager. - float mSavedResolutionBeforeMVM; - nsCOMPtr mCookieJarSettings; bool mHasStoragePermission; @@ -5381,6 +5377,7 @@ class Document : public nsINode, nsTArray mCanvasUsage; uint64_t mLastCanvasUsage = 0; + RefPtr mFragmentDirective; UniquePtr mRadioGroupContainer; public: @@ -5392,11 +5389,6 @@ class Document : public nsINode, nsRefPtrHashtable, nsXULPrototypeElement> mL10nProtoElements; - float GetSavedResolutionBeforeMVM() { return mSavedResolutionBeforeMVM; } - void SetSavedResolutionBeforeMVM(float aResolution) { - mSavedResolutionBeforeMVM = aResolution; - } - void LoadEventFired(); RadioGroupContainer& OwnedRadioGroupContainer(); -- cgit v1.2.3