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 ResizeObserverEntry_h | 5 #ifndef ResizeObserverEntry_h |
6 #define ResizeObserverEntry_h | 6 #define ResizeObserverEntry_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class Element; | 13 class Element; |
14 class ClientRect; | 14 class ClientRect; |
15 class LayoutRect; | 15 class LayoutRect; |
16 class LayoutSize; | 16 class LayoutSize; |
17 | 17 |
18 class ResizeObserverEntry final : public GarbageCollected<ResizeObserverEntry>, | 18 class ResizeObserverEntry final : public GarbageCollected<ResizeObserverEntry>, |
19 public ScriptWrappable { | 19 public ScriptWrappable { |
20 DEFINE_WRAPPERTYPEINFO(); | 20 DEFINE_WRAPPERTYPEINFO(); |
21 | 21 |
22 public: | 22 public: |
23 ResizeObserverEntry(Element* target, const LayoutRect& contentRect); | 23 ResizeObserverEntry(Element* target, const LayoutRect& contentRect); |
24 | 24 |
25 Element* target() const { return m_target; } | 25 Element* target() const { return m_target; } |
26 // FIXME(atotic): should return DOMRectReadOnly once https://crbug.com/388780
lands | 26 // FIXME(atotic): should return DOMRectReadOnly once https://crbug.com/388780 |
| 27 // lands |
27 ClientRect* contentRect() const { return m_contentRect; } | 28 ClientRect* contentRect() const { return m_contentRect; } |
28 | 29 |
29 DECLARE_VIRTUAL_TRACE(); | 30 DECLARE_VIRTUAL_TRACE(); |
30 | 31 |
31 private: | 32 private: |
32 Member<Element> m_target; | 33 Member<Element> m_target; |
33 Member<ClientRect> m_contentRect; | 34 Member<ClientRect> m_contentRect; |
34 }; | 35 }; |
35 | 36 |
36 } // namespace blink | 37 } // namespace blink |
37 | 38 |
38 #endif // ResizeObserverEntry_h | 39 #endif // ResizeObserverEntry_h |
OLD | NEW |