OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CompositorProxy_h | 5 #ifndef CompositorProxy_h |
6 #define CompositorProxy_h | 6 #define CompositorProxy_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "core/dom/Element.h" | 9 #include "core/dom/Element.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
(...skipping 20 matching lines...) Expand all Loading... | |
31 SCROLL_TOP = 0x0002, | 31 SCROLL_TOP = 0x0002, |
32 TOUCH = 0x0004, | 32 TOUCH = 0x0004, |
33 TRANSFORM = 0x0008, | 33 TRANSFORM = 0x0008, |
34 }; | 34 }; |
35 | 35 |
36 DEFINE_INLINE_TRACE() { } | 36 DEFINE_INLINE_TRACE() { } |
37 | 37 |
38 static void notifyElementGone(Element*); | 38 static void notifyElementGone(Element*); |
39 | 39 |
40 uint64_t elementId() const { return m_elementId; } | 40 uint64_t elementId() const { return m_elementId; } |
41 uint32_t attributes() const { return m_attributes; } | 41 uint32_t attributes() const { return m_mutableAttributes; } |
42 | |
43 double opacity(ExceptionState&) const; | |
44 double scrollTop(ExceptionState&) const; | |
45 Vector<double> transform(ExceptionState&) const; | |
46 | |
47 void setOpacity(double, ExceptionState&); | |
48 void setScrollTop(double, ExceptionState&); | |
49 void setTransform(const Vector<double>&, ExceptionState&); | |
42 | 50 |
43 protected: | 51 protected: |
44 CompositorProxy(Element*, uint32_t attributeFlags); | 52 CompositorProxy(Element*, uint32_t attributeFlags); |
45 CompositorProxy(uint64_t element, uint32_t attributeFlags); | 53 CompositorProxy(uint64_t element, uint32_t attributeFlags); |
46 | 54 |
47 private: | 55 private: |
56 bool raiseExceptionIfNotMutable(Attributes, ExceptionState&) const; | |
57 | |
48 const uint64_t m_elementId; | 58 const uint64_t m_elementId; |
49 uint32_t m_attributes; | 59 uint32_t m_mutableAttributes; |
60 uint32_t m_mutatedAttributes; | |
esprehn
2015/03/29 04:44:56
Maybe use a bit field instead of the enum?
| |
61 | |
62 double m_opacity; | |
63 double m_scrollTop; | |
64 Vector<double, 16> m_transform; | |
50 }; | 65 }; |
51 | 66 |
52 } // namespace blink | 67 } // namespace blink |
53 | 68 |
54 #endif // CompositorProxy_h | 69 #endif // CompositorProxy_h |
OLD | NEW |