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

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

Issue 1870963002: Clean up CompositorPendingAnimations inclusion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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/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;
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentParser.h ('k') | third_party/WebKit/Source/core/dom/IntersectionObservation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698