Index: third_party/WebKit/Source/core/dom/IntersectionObserver.h |
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.h b/third_party/WebKit/Source/core/dom/IntersectionObserver.h |
index 34a89d2615172d6f5baee6413d314695c37434e9..9072dde26eeabe8fa9b92f57df16bb469db5dcbd 100644 |
--- a/third_party/WebKit/Source/core/dom/IntersectionObserver.h |
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.h |
@@ -34,9 +34,15 @@ public: |
Element* root() { return m_root.get(); } |
LayoutObject* rootLayoutObject(); |
+ bool hasPercentMargin() const; |
+ const Length& topMargin() const { return m_topMargin; } |
+ const Length& rightMargin() const { return m_rightMargin; } |
+ const Length& bottomMargin() const { return m_bottomMargin; } |
+ const Length& leftMargin() const { return m_leftMargin; } |
bool isDescendantOfRoot(const Element*) const; |
void computeIntersectionObservations(double timestamp); |
void enqueueIntersectionObserverEntry(IntersectionObserverEntry&); |
+ void applyRootMargin(LayoutRect&) const; |
unsigned firstThresholdGreaterThan(float ratio) const; |
void deliver(); |
void setActive(bool); |
@@ -46,7 +52,7 @@ public: |
DECLARE_TRACE(); |
private: |
- explicit IntersectionObserver(IntersectionObserverCallback&, Element&, const Vector<float>& thresholds); |
+ explicit IntersectionObserver(IntersectionObserverCallback&, Element&, const Vector<Length>& rootMargin, const Vector<float>& thresholds); |
void checkRootAndDetachIfNeeded(); |
@@ -55,6 +61,10 @@ private: |
HeapHashSet<WeakMember<IntersectionObservation>> m_observations; |
HeapVector<Member<IntersectionObserverEntry>> m_entries; |
Vector<float> m_thresholds; |
+ Length m_topMargin; |
+ Length m_rightMargin; |
+ Length m_bottomMargin; |
+ Length m_leftMargin; |
ojan
2016/01/12 01:08:49
This object is getting quite large. I don't think
szager1
2016/01/12 19:24:43
Acknowledged. I would expect that the number of o
|
}; |
} // namespace blink |