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 3281fcea96352ef256fc00bd74383250e40b02ac..2ed72a72fa4fd37dda87c6b8abe028426b7257dd 100644 |
| --- a/third_party/WebKit/Source/core/dom/IntersectionObserver.h |
| +++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.h |
| @@ -50,6 +50,11 @@ class CORE_EXPORT IntersectionObserver final |
| Document*, |
| std::unique_ptr<EventCallback>, |
| ExceptionState& = ASSERT_NO_EXCEPTION); |
| + // Observes any element/viewport ratio changes. |
| + static IntersectionObserver* create(const Vector<Length>& rootMargin, |
| + Document*, |
| + std::unique_ptr<EventCallback>, |
| + ExceptionState& = ASSERT_NO_EXCEPTION); |
| static void resumeSuspendedObservers(); |
| // API methods. |
| @@ -93,7 +98,8 @@ class CORE_EXPORT IntersectionObserver final |
| explicit IntersectionObserver(IntersectionObserverCallback&, |
| Node&, |
| const Vector<Length>& rootMargin, |
| - const Vector<float>& thresholds); |
| + const Vector<float>& thresholds, |
| + bool isObservingRatio); |
| void clearWeakMembers(Visitor*); |
| Member<IntersectionObserverCallback> m_callback; |
| @@ -106,6 +112,7 @@ class CORE_EXPORT IntersectionObserver final |
| Length m_bottomMargin; |
| Length m_leftMargin; |
| InitialState m_initialState; |
| + bool m_observeElementViewportRatio = false; |
|
miu
2016/11/11 08:18:33
Since this is initialized in the ctor, you don't n
xjz
2016/11/11 17:57:48
Done.
|
| }; |
| } // namespace blink |