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

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

Issue 2146383002: ElementVisibilityObserver: get rid of reference cycle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/ElementVisibilityObserver.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 IntersectionObserver_h 5 #ifndef IntersectionObserver_h
6 #define IntersectionObserver_h 6 #define IntersectionObserver_h
7 7
8 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 8 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "core/dom/IntersectionObservation.h" 10 #include "core/dom/IntersectionObservation.h"
(...skipping 18 matching lines...) Expand all
29 public: 29 public:
30 using EventCallback = Function<void(const HeapVector<Member<IntersectionObse rverEntry>>&), WTF::SameThreadAffinity>; 30 using EventCallback = Function<void(const HeapVector<Member<IntersectionObse rverEntry>>&), WTF::SameThreadAffinity>;
31 31
32 static IntersectionObserver* create(const IntersectionObserverInit&, Interse ctionObserverCallback&, ExceptionState&); 32 static IntersectionObserver* create(const IntersectionObserverInit&, Interse ctionObserverCallback&, ExceptionState&);
33 static IntersectionObserver* create(const Vector<Length>& rootMargin, const Vector<float>& thresholds, Document*, std::unique_ptr<EventCallback>); 33 static IntersectionObserver* create(const Vector<Length>& rootMargin, const Vector<float>& thresholds, Document*, std::unique_ptr<EventCallback>);
34 static void resumeSuspendedObservers(); 34 static void resumeSuspendedObservers();
35 35
36 // API methods. 36 // API methods.
37 void observe(Element*, ExceptionState& = ASSERT_NO_EXCEPTION); 37 void observe(Element*, ExceptionState& = ASSERT_NO_EXCEPTION);
38 void unobserve(Element*, ExceptionState& = ASSERT_NO_EXCEPTION); 38 void unobserve(Element*, ExceptionState& = ASSERT_NO_EXCEPTION);
39 void disconnect(ExceptionState&); 39 void disconnect(ExceptionState& = ASSERT_NO_EXCEPTION);
40 HeapVector<Member<IntersectionObserverEntry>> takeRecords(ExceptionState&); 40 HeapVector<Member<IntersectionObserverEntry>> takeRecords(ExceptionState&);
41 41
42 // API attributes. 42 // API attributes.
43 Element* root() const; 43 Element* root() const;
44 String rootMargin() const; 44 String rootMargin() const;
45 const Vector<float>& thresholds() const { return m_thresholds; } 45 const Vector<float>& thresholds() const { return m_thresholds; }
46 46
47 Node* rootNode() const { return m_root.get(); } 47 Node* rootNode() const { return m_root.get(); }
48 LayoutObject* rootLayoutObject() const; 48 LayoutObject* rootLayoutObject() const;
49 const Length& topMargin() const { return m_topMargin; } 49 const Length& topMargin() const { return m_topMargin; }
(...skipping 22 matching lines...) Expand all
72 Vector<float> m_thresholds; 72 Vector<float> m_thresholds;
73 Length m_topMargin; 73 Length m_topMargin;
74 Length m_rightMargin; 74 Length m_rightMargin;
75 Length m_bottomMargin; 75 Length m_bottomMargin;
76 Length m_leftMargin; 76 Length m_leftMargin;
77 }; 77 };
78 78
79 } // namespace blink 79 } // namespace blink
80 80
81 #endif // IntersectionObserver_h 81 #endif // IntersectionObserver_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ElementVisibilityObserver.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698