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 477f361be1fb4f16ed123b4b8ce7bbbc9fdccbbd..0f66723b1eaaf39b75e6a3b52a2fe92eeb39f852 100644 |
--- a/third_party/WebKit/Source/core/dom/IntersectionObservation.h |
+++ b/third_party/WebKit/Source/core/dom/IntersectionObservation.h |
@@ -13,10 +13,8 @@ namespace blink { |
class Element; |
class IntersectionObserver; |
-class Node; |
-// TODO(oilpan): Switch to GarbageCollected<> after oilpan ships. |
-class IntersectionObservation : public GarbageCollectedFinalized<IntersectionObservation> { |
+class IntersectionObservation final : public GarbageCollected<IntersectionObservation> { |
public: |
IntersectionObservation(IntersectionObserver&, Element&, bool shouldReportRootBounds); |
@@ -28,7 +26,7 @@ public: |
}; |
IntersectionObserver& observer() const { return *m_observer; } |
- Element* target() const; |
+ Element* target() const { return m_target; } |
unsigned lastThresholdIndex() const { return m_lastThresholdIndex; } |
void setLastThresholdIndex(unsigned index) { m_lastThresholdIndex = index; } |
bool shouldReportRootBounds() const { return m_shouldReportRootBounds; } |
@@ -51,10 +49,7 @@ private: |
Member<IntersectionObserver> m_observer; |
- // TODO(szager): Why Node instead of Element? Because NodeIntersectionObserverData::createWeakPtr() |
- // returns a WeakPtr<Node>, which cannot be coerced into a WeakPtr<Element>. When oilpan rolls out, |
- // this can be changed to WeakMember<Element>. |
- WeakMember<Node> m_target; |
+ WeakMember<Element> m_target; |
unsigned m_shouldReportRootBounds : 1; |
unsigned m_lastThresholdIndex : 30; |