Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: third_party/WebKit/Source/core/dom/IntersectionObserverEntry.h

Issue 1879323003: Add IntersectionObserverEntry.intersectionRatio attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@2704
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/IntersectionObserverEntry.h
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserverEntry.h b/third_party/WebKit/Source/core/dom/IntersectionObserverEntry.h
index eb67a8976390a8a440f18432e41739753671b45a..cd260ebc48f9fcfef48ff5f629a0fea1b24182f7 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserverEntry.h
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserverEntry.h
@@ -18,10 +18,11 @@ class Element;
class IntersectionObserverEntry final : public GarbageCollectedFinalized<IntersectionObserverEntry>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- IntersectionObserverEntry(DOMHighResTimeStamp timestamp, const IntRect& boundingClientRect, const IntRect* rootBounds, const IntRect& intersectionRect, Element*);
+ IntersectionObserverEntry(DOMHighResTimeStamp timestamp, double intersectionRatio, const IntRect& boundingClientRect, const IntRect* rootBounds, const IntRect& intersectionRect, Element*);
~IntersectionObserverEntry();
double time() const { return m_time; }
+ double intersectionRatio() const { return m_intersectionRatio; }
ClientRect* boundingClientRect() const { return m_boundingClientRect; }
ClientRect* rootBounds() const { return m_rootBounds; }
ClientRect* intersectionRect() const { return m_intersectionRect; }
@@ -31,6 +32,7 @@ public:
private:
DOMHighResTimeStamp m_time;
+ double m_intersectionRatio;
Member<ClientRect> m_boundingClientRect;
Member<ClientRect> m_rootBounds;
Member<ClientRect> m_intersectionRect;

Powered by Google App Engine
This is Rietveld 408576698