OLD | NEW |
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 IntersectionObserverEntry_h | 5 #ifndef IntersectionObserverEntry_h |
6 #define IntersectionObserverEntry_h | 6 #define IntersectionObserverEntry_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "core/dom/ClientRect.h" | 9 #include "core/dom/ClientRect.h" |
10 #include "platform/geometry/IntRect.h" | 10 #include "platform/geometry/IntRect.h" |
11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class Element; | 15 class Element; |
16 | 16 |
17 class IntersectionObserverEntry final : public GarbageCollectedFinalized<Interse
ctionObserverEntry>, public ScriptWrappable { | 17 class IntersectionObserverEntry final : public GarbageCollectedFinalized<Interse
ctionObserverEntry>, public ScriptWrappable { |
18 DEFINE_WRAPPERTYPEINFO(); | 18 DEFINE_WRAPPERTYPEINFO(); |
19 public: | 19 public: |
20 IntersectionObserverEntry(double timestamp, const IntRect& boundingClientRec
t, const IntRect& rootBounds, const IntRect& intersectionRect, Element*); | 20 IntersectionObserverEntry(double timestamp, const IntRect& boundingClientRec
t, const IntRect* rootBounds, const IntRect& intersectionRect, Element*); |
21 ~IntersectionObserverEntry(); | 21 ~IntersectionObserverEntry(); |
22 | 22 |
23 double time() const { return m_time; } | 23 double time() const { return m_time; } |
24 ClientRect* boundingClientRect() const { return m_boundingClientRect; } | 24 ClientRect* boundingClientRect() const { return m_boundingClientRect; } |
25 ClientRect* rootBounds() const { return m_rootBounds; } | 25 ClientRect* rootBounds() const { return m_rootBounds; } |
26 ClientRect* intersectionRect() const { return m_intersectionRect; } | 26 ClientRect* intersectionRect() const { return m_intersectionRect; } |
27 Element* target() const { return m_target.get(); } | 27 Element* target() const { return m_target.get(); } |
28 | 28 |
29 DECLARE_VIRTUAL_TRACE(); | 29 DECLARE_VIRTUAL_TRACE(); |
30 | 30 |
31 private: | 31 private: |
32 double m_time; | 32 double m_time; |
33 Member<ClientRect> m_boundingClientRect; | 33 Member<ClientRect> m_boundingClientRect; |
34 Member<ClientRect> m_rootBounds; | 34 Member<ClientRect> m_rootBounds; |
35 Member<ClientRect> m_intersectionRect; | 35 Member<ClientRect> m_intersectionRect; |
36 RefPtrWillBeMember<Element> m_target; | 36 RefPtrWillBeMember<Element> m_target; |
37 }; | 37 }; |
38 | 38 |
39 } // namespace blink | 39 } // namespace blink |
40 | 40 |
41 #endif // IntersectionObserverEntry_h | 41 #endif // IntersectionObserverEntry_h |
OLD | NEW |