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; | |
17 | 16 |
18 class ResizeObserverEntry final : public GarbageCollected<ResizeObserverEntry>, | 17 class ResizeObserverEntry final : public GarbageCollected<ResizeObserverEntry>, |
19 public ScriptWrappable { | 18 public ScriptWrappable { |
20 DEFINE_WRAPPERTYPEINFO(); | 19 DEFINE_WRAPPERTYPEINFO(); |
21 | 20 |
22 public: | 21 public: |
23 ResizeObserverEntry(Element* target, const LayoutRect& contentRect); | 22 ResizeObserverEntry(Element* target, const LayoutRect& contentRect); |
24 | 23 |
25 Element* target() const { return m_target; } | 24 Element* target() const { return m_target; } |
26 // FIXME(atotic): should return DOMRectReadOnly once https://crbug.com/388780 | 25 // FIXME(atotic): should return DOMRectReadOnly once https://crbug.com/388780 |
27 // lands | 26 // lands |
28 ClientRect* contentRect() const { return m_contentRect; } | 27 ClientRect* contentRect() const { return m_contentRect; } |
29 | 28 |
30 DECLARE_VIRTUAL_TRACE(); | 29 DECLARE_VIRTUAL_TRACE(); |
31 | 30 |
32 private: | 31 private: |
33 Member<Element> m_target; | 32 Member<Element> m_target; |
34 Member<ClientRect> m_contentRect; | 33 Member<ClientRect> m_contentRect; |
35 }; | 34 }; |
36 | 35 |
37 } // namespace blink | 36 } // namespace blink |
38 | 37 |
39 #endif // ResizeObserverEntry_h | 38 #endif // ResizeObserverEntry_h |
OLD | NEW |