summaryrefslogtreecommitdiffstats
path: root/dom/base/StaticRange.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /dom/base/StaticRange.h
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/base/StaticRange.h')
-rw-r--r--dom/base/StaticRange.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/dom/base/StaticRange.h b/dom/base/StaticRange.h
index a6f677130d..af7054f843 100644
--- a/dom/base/StaticRange.h
+++ b/dom/base/StaticRange.h
@@ -8,6 +8,7 @@
#define mozilla_dom_StaticRange_h
#include "mozilla/RangeBoundary.h"
+#include "mozilla/RangeUtils.h"
#include "mozilla/dom/AbstractRange.h"
#include "mozilla/dom/StaticRangeBinding.h"
#include "nsTArray.h"
@@ -70,6 +71,21 @@ class StaticRange final : public AbstractRange {
*/
bool IsValid() const;
+ void NotifyNodeBecomesShadowHost(nsINode* aNode) {
+ if (aNode == mStart.Container()) {
+ mStart.NotifyParentBecomesShadowHost();
+ }
+
+ if (aNode == mEnd.Container()) {
+ mEnd.NotifyParentBecomesShadowHost();
+ }
+ }
+
+ private:
+ // Whether the start and end points are in the same tree.
+ // They could be in different trees, i.e, cross shadow boundaries.
+ bool mAreStartAndEndInSameTree = false;
+
protected:
explicit StaticRange(nsINode* aNode)
: AbstractRange(aNode, /* aIsDynamicRange = */ false) {}