OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 SKY_ENGINE_CORE_RENDERING_STYLE_STYLEWILLCHANGEDATA_H_ | 5 #ifndef SKY_ENGINE_CORE_RENDERING_STYLE_STYLEWILLCHANGEDATA_H_ |
6 #define SKY_ENGINE_CORE_RENDERING_STYLE_STYLEWILLCHANGEDATA_H_ | 6 #define SKY_ENGINE_CORE_RENDERING_STYLE_STYLEWILLCHANGEDATA_H_ |
7 | 7 |
8 #include "gen/sky/core/CSSPropertyNames.h" | 8 #include "gen/sky/core/CSSPropertyNames.h" |
9 #include "gen/sky/core/CSSValueKeywords.h" | 9 #include "gen/sky/core/CSSValueKeywords.h" |
10 #include "sky/engine/wtf/PassRefPtr.h" | 10 #include "sky/engine/wtf/PassRefPtr.h" |
11 #include "sky/engine/wtf/RefCounted.h" | 11 #include "sky/engine/wtf/RefCounted.h" |
12 #include "sky/engine/wtf/Vector.h" | 12 #include "sky/engine/wtf/Vector.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 class StyleWillChangeData : public RefCounted<StyleWillChangeData> { | 16 class StyleWillChangeData : public RefCounted<StyleWillChangeData> { |
17 public: | 17 public: |
18 static PassRefPtr<StyleWillChangeData> create() { return adoptRef(new StyleW
illChangeData); } | 18 static PassRefPtr<StyleWillChangeData> create() { return adoptRef(new StyleW
illChangeData); } |
19 PassRefPtr<StyleWillChangeData> copy() const { return adoptRef(new StyleWill
ChangeData(*this)); } | 19 PassRefPtr<StyleWillChangeData> copy() const { return adoptRef(new StyleWill
ChangeData(*this)); } |
20 | 20 |
21 bool operator==(const StyleWillChangeData& o) const | 21 bool operator==(const StyleWillChangeData& o) const |
22 { | 22 { |
23 return m_properties == o.m_properties && m_contents == o.m_contents && m
_scrollPosition == o.m_scrollPosition; | 23 return m_properties == o.m_properties && m_contents == o.m_contents; |
24 } | 24 } |
25 | 25 |
26 bool operator!=(const StyleWillChangeData& o) const | 26 bool operator!=(const StyleWillChangeData& o) const |
27 { | 27 { |
28 return !(*this == o); | 28 return !(*this == o); |
29 } | 29 } |
30 | 30 |
31 Vector<CSSPropertyID> m_properties; | 31 Vector<CSSPropertyID> m_properties; |
32 unsigned m_contents : 1; | 32 unsigned m_contents : 1; |
33 unsigned m_scrollPosition : 1; | |
34 | 33 |
35 private: | 34 private: |
36 StyleWillChangeData(); | 35 StyleWillChangeData(); |
37 StyleWillChangeData(const StyleWillChangeData&); | 36 StyleWillChangeData(const StyleWillChangeData&); |
38 }; | 37 }; |
39 | 38 |
40 } // namespace blink | 39 } // namespace blink |
41 | 40 |
42 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_STYLEWILLCHANGEDATA_H_ | 41 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_STYLEWILLCHANGEDATA_H_ |
OLD | NEW |