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

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

Issue 2645283008: IntersectionObserver: Always send an initial notification. (Closed)
Patch Set: Fix unit test Created 3 years, 11 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/IntersectionObservation.h
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObservation.h b/third_party/WebKit/Source/core/dom/IntersectionObservation.h
index dcb93231cd50f05f279f81ac5504dec7895bad55..32f1f25ee644e0813bf4ed595723efcd29a31195 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObservation.h
+++ b/third_party/WebKit/Source/core/dom/IntersectionObservation.h
@@ -23,18 +23,21 @@ class IntersectionObservation final
IntersectionObserver* observer() const { return m_observer.get(); }
Element* target() const { return m_target; }
unsigned lastThresholdIndex() const { return m_lastThresholdIndex; }
- void setLastThresholdIndex(unsigned index) { m_lastThresholdIndex = index; }
void computeIntersectionObservations(DOMHighResTimeStamp);
void disconnect();
DECLARE_TRACE();
private:
+ void setLastThresholdIndex(unsigned index) { m_lastThresholdIndex = index; }
+
Member<IntersectionObserver> m_observer;
WeakMember<Element> m_target;
const unsigned m_shouldReportRootBounds : 1;
+
unsigned m_lastThresholdIndex : 30;
+ static const unsigned kMaxThresholdIndex = (unsigned)0x40000000;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698