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

Side by Side Diff: third_party/WebKit/Source/core/dom/IntersectionObserverController.h

Issue 1548523002: Use Document, rather than document element, for implicit root. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@intersection-observer
Patch Set: Nits, comments, rebaseline Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IntersectionObserverController_h 5 #ifndef IntersectionObserverController_h
6 #define IntersectionObserverController_h 6 #define IntersectionObserverController_h
7 7
8 #include "core/dom/Element.h" 8 #include "core/dom/Element.h"
9 #include "core/dom/IntersectionObserver.h" 9 #include "core/dom/IntersectionObserver.h"
10 #include "platform/Timer.h" 10 #include "platform/Timer.h"
(...skipping 10 matching lines...) Expand all
21 public: 21 public:
22 static IntersectionObserverController* create(Document*); 22 static IntersectionObserverController* create(Document*);
23 ~IntersectionObserverController(); 23 ~IntersectionObserverController();
24 24
25 void resume() override; 25 void resume() override;
26 26
27 void scheduleIntersectionObserverForDelivery(IntersectionObserver&); 27 void scheduleIntersectionObserverForDelivery(IntersectionObserver&);
28 void deliverIntersectionObservations(Timer<IntersectionObserverController>*) ; 28 void deliverIntersectionObservations(Timer<IntersectionObserverController>*) ;
29 void computeTrackedIntersectionObservations(); 29 void computeTrackedIntersectionObservations();
30 void addTrackedObserver(IntersectionObserver&); 30 void addTrackedObserver(IntersectionObserver&);
31 void removeTrackedObserversForRoot(const Element&); 31 void removeTrackedObserversForRoot(const Node&);
32 32
33 DECLARE_TRACE(); 33 DECLARE_TRACE();
34 34
35 private: 35 private:
36 explicit IntersectionObserverController(Document*); 36 explicit IntersectionObserverController(Document*);
37 37
38 private: 38 private:
39 Timer<IntersectionObserverController> m_timer; 39 Timer<IntersectionObserverController> m_timer;
40 // IntersectionObservers for which this is the tracking document. 40 // IntersectionObservers for which this is the tracking document.
41 HeapHashSet<WeakMember<IntersectionObserver>> m_trackedIntersectionObservers ; 41 HeapHashSet<WeakMember<IntersectionObserver>> m_trackedIntersectionObservers ;
42 // IntersectionObservers for which this is the execution context of the call back. 42 // IntersectionObservers for which this is the execution context of the call back.
43 HeapHashSet<Member<IntersectionObserver>> m_pendingIntersectionObservers; 43 HeapHashSet<Member<IntersectionObserver>> m_pendingIntersectionObservers;
44 44
45 bool m_timerFiredWhileSuspended; 45 bool m_timerFiredWhileSuspended;
46 }; 46 };
47 47
48 } // namespace blink 48 } // namespace blink
49 49
50 #endif // IntersectionObserverController_h 50 #endif // IntersectionObserverController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698