summaryrefslogtreecommitdiffstats
path: root/dom/base/nsRange.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/nsRange.h')
-rw-r--r--dom/base/nsRange.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/dom/base/nsRange.h b/dom/base/nsRange.h
index 94459087cb..3c8f43a7dc 100644
--- a/dom/base/nsRange.h
+++ b/dom/base/nsRange.h
@@ -14,6 +14,7 @@
#include "nsCOMPtr.h"
#include "mozilla/dom/AbstractRange.h"
#include "mozilla/dom/StaticRange.h"
+#include "mozilla/dom/CrossShadowBoundaryRange.h"
#include "prmon.h"
#include "nsStubMutationObserver.h"
#include "nsWrapperCache.h"
@@ -209,7 +210,8 @@ class nsRange final : public mozilla::dom::AbstractRange,
int16_t CompareBoundaryPoints(uint16_t aHow, const nsRange& aOtherRange,
ErrorResult& aRv);
int16_t ComparePoint(const nsINode& aContainer, uint32_t aOffset,
- ErrorResult& aRv) const;
+ ErrorResult& aRv,
+ bool aAllowCrossShadowBoundary = false) const;
void DeleteContents(ErrorResult& aRv);
already_AddRefed<mozilla::dom::DocumentFragment> ExtractContents(
ErrorResult& aErr);
@@ -223,7 +225,8 @@ class nsRange final : public mozilla::dom::AbstractRange,
void InsertNode(nsINode& aNode, ErrorResult& aErr);
bool IntersectsNode(nsINode& aNode, ErrorResult& aRv);
bool IsPointInRange(const nsINode& aContainer, uint32_t aOffset,
- ErrorResult& aRv) const;
+ ErrorResult& aRv,
+ bool aAllowCrossShadowBoundary = false) const;
void ToString(nsAString& aReturn, ErrorResult& aErr);
void Detach();
@@ -336,8 +339,14 @@ class nsRange final : public mozilla::dom::AbstractRange,
// document as the range, aContainer is a DOCUMENT_TYPE_NODE and
// aOffset doesn't exceed aContainer's length.
bool IsPointComparableToRange(const nsINode& aContainer, uint32_t aOffset,
+ bool aAllowCrossShadowBoundary,
ErrorResult& aErrorResult) const;
+ // @return true iff aContainer is a shadow including inclusive descendant of
+ // the common ancestor of the mCrossBoundaryRange.
+ bool IsShadowIncludingInclusiveDescendantOfCrossBoundaryRangeAncestor(
+ const nsINode& aContainer) const;
+
/**
* @brief Returns true if the range is part of exactly one |Selection|.
*/
@@ -424,7 +433,7 @@ class nsRange final : public mozilla::dom::AbstractRange,
: mEnd.GetChildAtOffset();
}
- mozilla::dom::StaticRange* GetCrossShadowBoundaryRange() const {
+ mozilla::dom::CrossShadowBoundaryRange* GetCrossShadowBoundaryRange() const {
return mCrossShadowBoundaryRange;
}
@@ -549,7 +558,7 @@ class nsRange final : public mozilla::dom::AbstractRange,
// just return one point when a collapse is needed.
// Bug https://bugzilla.mozilla.org/show_bug.cgi?id=1886028 is going
// to be used to improve mCrossShadowBoundaryRange.
- RefPtr<mozilla::dom::StaticRange> mCrossShadowBoundaryRange;
+ RefPtr<mozilla::dom::CrossShadowBoundaryRange> mCrossShadowBoundaryRange;
friend class mozilla::dom::AbstractRange;
};