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

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

Issue 1825443002: IntersectionObserver: omit thresholds attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix global-interface-listing expectations. Created 4 years, 9 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 IntersectionObserver_h 5 #ifndef IntersectionObserver_h
6 #define IntersectionObserver_h 6 #define IntersectionObserver_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/dom/Element.h" 9 #include "core/dom/Element.h"
10 #include "core/dom/IntersectionObservation.h" 10 #include "core/dom/IntersectionObservation.h"
(...skipping 17 matching lines...) Expand all
28 static IntersectionObserver* create(const IntersectionObserverInit&, Interse ctionObserverCallback&, ExceptionState&); 28 static IntersectionObserver* create(const IntersectionObserverInit&, Interse ctionObserverCallback&, ExceptionState&);
29 static void resumeSuspendedObservers(); 29 static void resumeSuspendedObservers();
30 30
31 // API methods 31 // API methods
32 void observe(Element*); 32 void observe(Element*);
33 void unobserve(Element*); 33 void unobserve(Element*);
34 void disconnect(); 34 void disconnect();
35 HeapVector<Member<IntersectionObserverEntry>> takeRecords(); 35 HeapVector<Member<IntersectionObserverEntry>> takeRecords();
36 Element* root() const; 36 Element* root() const;
37 String rootMargin() const; 37 String rootMargin() const;
38 const Vector<float>& thresholds() const { return m_thresholds; }
39 38
40 Node* rootNode() const { return m_root.get(); } 39 Node* rootNode() const { return m_root.get(); }
41 LayoutObject* rootLayoutObject() const; 40 LayoutObject* rootLayoutObject() const;
42 const Length& topMargin() const { return m_topMargin; } 41 const Length& topMargin() const { return m_topMargin; }
43 const Length& rightMargin() const { return m_rightMargin; } 42 const Length& rightMargin() const { return m_rightMargin; }
44 const Length& bottomMargin() const { return m_bottomMargin; } 43 const Length& bottomMargin() const { return m_bottomMargin; }
45 const Length& leftMargin() const { return m_leftMargin; } 44 const Length& leftMargin() const { return m_leftMargin; }
46 void computeIntersectionObservations(); 45 void computeIntersectionObservations();
47 void enqueueIntersectionObserverEntry(IntersectionObserverEntry&); 46 void enqueueIntersectionObserverEntry(IntersectionObserverEntry&);
48 void applyRootMargin(LayoutRect&) const; 47 void applyRootMargin(LayoutRect&) const;
(...skipping 18 matching lines...) Expand all
67 Vector<float> m_thresholds; 66 Vector<float> m_thresholds;
68 Length m_topMargin; 67 Length m_topMargin;
69 Length m_rightMargin; 68 Length m_rightMargin;
70 Length m_bottomMargin; 69 Length m_bottomMargin;
71 Length m_leftMargin; 70 Length m_leftMargin;
72 }; 71 };
73 72
74 } // namespace blink 73 } // namespace blink
75 74
76 #endif // IntersectionObserver_h 75 #endif // IntersectionObserver_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698