summaryrefslogtreecommitdiffstats
path: root/dom/base/DOMIntersectionObserver.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-01-17 19:02:50 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-01-17 19:02:50 +0100
commitf6ef8d8ca7ed96d699c28914fc590b0604520fd0 (patch)
treee139d0db8d13c4120c586d3d439ca9f4c7358216 /dom/base/DOMIntersectionObserver.h
parenta20daf64bfd581dc6f04c6c752bf2790d82aab6e (diff)
downloadUXP-f6ef8d8ca7ed96d699c28914fc590b0604520fd0.tar
UXP-f6ef8d8ca7ed96d699c28914fc590b0604520fd0.tar.gz
UXP-f6ef8d8ca7ed96d699c28914fc590b0604520fd0.tar.lz
UXP-f6ef8d8ca7ed96d699c28914fc590b0604520fd0.tar.xz
UXP-f6ef8d8ca7ed96d699c28914fc590b0604520fd0.zip
Add isIntersecting property to IntersectionObserverEntry.
Per updated spec. This resolves the issue raised in #249.
Diffstat (limited to 'dom/base/DOMIntersectionObserver.h')
-rw-r--r--dom/base/DOMIntersectionObserver.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/dom/base/DOMIntersectionObserver.h b/dom/base/DOMIntersectionObserver.h
index 9c8ebf5b1..414f21482 100644
--- a/dom/base/DOMIntersectionObserver.h
+++ b/dom/base/DOMIntersectionObserver.h
@@ -30,6 +30,7 @@ public:
RefPtr<DOMRect> aRootBounds,
RefPtr<DOMRect> aBoundingClientRect,
RefPtr<DOMRect> aIntersectionRect,
+ bool aIsIntersecting,
Element* aTarget,
double aIntersectionRatio)
: mOwner(aOwner),
@@ -37,6 +38,7 @@ public:
mRootBounds(aRootBounds),
mBoundingClientRect(aBoundingClientRect),
mIntersectionRect(aIntersectionRect),
+ mIsIntersecting(aIsIntersecting),
mTarget(aTarget),
mIntersectionRatio(aIntersectionRatio)
{
@@ -74,6 +76,11 @@ public:
return mIntersectionRect;
}
+ bool IsIntersecting()
+ {
+ return mIsIntersecting;
+ }
+
double IntersectionRatio()
{
return mIntersectionRatio;
@@ -90,6 +97,7 @@ protected:
RefPtr<DOMRect> mRootBounds;
RefPtr<DOMRect> mBoundingClientRect;
RefPtr<DOMRect> mIntersectionRect;
+ bool mIsIntersecting;
RefPtr<Element> mTarget;
double mIntersectionRatio;
};