Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/IntersectionObserver.h |
| diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.h b/third_party/WebKit/Source/core/dom/IntersectionObserver.h |
| index 85c449675b38e35c07282ee23625347baf4eb16e..4cee00d8c620d7e69213db9b9eb7281cffaaeff2 100644 |
| --- a/third_party/WebKit/Source/core/dom/IntersectionObserver.h |
| +++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.h |
| @@ -33,6 +33,14 @@ class CORE_EXPORT IntersectionObserver final |
| Function<void(const HeapVector<Member<IntersectionObserverEntry>>&), |
| WTF::SameThreadAffinity>; |
| + // Defines the assumed initial state of the observed element. If the actual |
| + // state is the same as the initial state, then no observation will be |
| + // delivered. AUTO means the initial observation will always get sent. |
| + enum class InitialState { |
| + // TODO(skyostil): Add support for HIDDEN and VISIBLE. |
| + AUTO |
|
ojan
2016/10/31 19:37:09
The new enum naming style would be kAuto now I thi
Sami
2016/11/01 10:44:48
Done.
|
| + }; |
| + |
| static IntersectionObserver* create(const IntersectionObserverInit&, |
| IntersectionObserverCallback&, |
| ExceptionState&); |
| @@ -71,6 +79,9 @@ class CORE_EXPORT IntersectionObserver final |
| const { |
| return m_observations; |
| } |
| + // TODO(skyostil): Move this setting to IntersectionObserverInit once the API |
| + // is finalized. |
| + void setInitialState(InitialState); |
| DECLARE_TRACE(); |