[X2Go-Commits] [pale-moon] 04/06: Add isIntersecting property to IntersectionObserverEntry. (uplift)

git-admin at x2go.org git-admin at x2go.org
Wed Jan 30 03:50:10 CET 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch upstream/palemoon-master
in repository pale-moon.

commit b4edb88144ce946fc5275f65107fbf700d0282fa
Author: wolfbeast <mcwerewolf at wolfbeast.com>
Date:   Thu Jan 17 19:02:50 2019 +0100

    Add isIntersecting property to IntersectionObserverEntry. (uplift)
    
    Per updated spec.
    
    This resolves the issue raised in #249.
---
 dom/base/DOMIntersectionObserver.cpp   | 1 +
 dom/base/DOMIntersectionObserver.h     | 8 ++++++++
 dom/webidl/IntersectionObserver.webidl | 2 ++
 3 files changed, 11 insertions(+)

diff --git a/dom/base/DOMIntersectionObserver.cpp b/dom/base/DOMIntersectionObserver.cpp
index e7b3cd0..0264a10 100644
--- a/dom/base/DOMIntersectionObserver.cpp
+++ b/dom/base/DOMIntersectionObserver.cpp
@@ -482,6 +482,7 @@ DOMIntersectionObserver::QueueIntersectionObserverEntry(Element* aTarget,
     rootBounds.forget(),
     boundingClientRect.forget(),
     intersectionRect.forget(),
+    aIntersectionRect.isSome(),
     aTarget, aIntersectionRatio);
   mQueuedEntries.AppendElement(entry.forget());
 }
diff --git a/dom/base/DOMIntersectionObserver.h b/dom/base/DOMIntersectionObserver.h
index 9c8ebf5..414f214 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;
 };
diff --git a/dom/webidl/IntersectionObserver.webidl b/dom/webidl/IntersectionObserver.webidl
index dbe8f42..bc193ee 100644
--- a/dom/webidl/IntersectionObserver.webidl
+++ b/dom/webidl/IntersectionObserver.webidl
@@ -18,6 +18,8 @@ interface IntersectionObserverEntry {
   [Constant]
   readonly attribute DOMRectReadOnly intersectionRect;
   [Constant]
+  readonly attribute boolean isIntersecting;
+  [Constant]
   readonly attribute double intersectionRatio;
   [Constant]
   readonly attribute Element target;

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pale-moon.git


More information about the x2go-commits mailing list