From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- dom/base/nsContentUtils.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'dom/base/nsContentUtils.h') diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index 4291d2c5d1..a1f466fa8d 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -115,7 +115,6 @@ class nsNodeInfoManager; class nsParser; class nsPIWindowRoot; class nsPresContext; -class nsStringBuffer; class nsTextFragment; class nsView; class nsWrapperCache; @@ -501,6 +500,9 @@ class nsContentUtils { return GetCommonAncestorHelper(aNode1, aNode2); } + static nsINode* GetClosestCommonShadowIncludingInclusiveAncestor( + nsINode* aNode1, nsINode* aNode2); + /** * Returns the common flattened tree ancestor, if any, for two given content * nodes. @@ -2443,14 +2445,6 @@ class nsContentUtils { [[nodiscard]] static bool PlatformToDOMLineBreaks(nsString& aString, const mozilla::fallible_t&); - /** - * Populates aResultString with the contents of the string-buffer aBuf, up - * to aBuf's null-terminator. aBuf must not be null. Ownership of the string - * is not transferred. - */ - static void PopulateStringFromStringBuffer(nsStringBuffer* aBuf, - nsAString& aResultString); - static bool IsHandlingKeyBoardEvent() { return sIsHandlingKeyBoardEvent; } static void SetIsHandlingKeyBoardEvent(bool aHandling) { @@ -2778,9 +2772,13 @@ class nsContentUtils { * check. aNode and aOffset can be computed with * UIEvent::GetRangeParentContentAndOffset() if you want to * check the click point. + * @param aAllowCrossShadowBoundary If true, this method allows the selection + * to have boundaries that cross shadow + * boundaries. */ static bool IsPointInSelection(const mozilla::dom::Selection& aSelection, - const nsINode& aNode, const uint32_t aOffset); + const nsINode& aNode, const uint32_t aOffset, + const bool aAllowCrossShadowBoundary = false); /** * Takes a selection, and a text control element ( or