Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / core / style / StyleWillChangeData.h
blobc54c7655308bea9cda0881ffe597655eb38437f7
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
3 // found in the LICENSE file.
5 #ifndef StyleWillChangeData_h
6 #define StyleWillChangeData_h
8 #include "core/CSSPropertyNames.h"
9 #include "core/CSSValueKeywords.h"
10 #include "wtf/PassRefPtr.h"
11 #include "wtf/RefCounted.h"
12 #include "wtf/Vector.h"
14 namespace blink {
16 class StyleWillChangeData : public RefCounted<StyleWillChangeData> {
17 public:
18 static PassRefPtr<StyleWillChangeData> create() { return adoptRef(new StyleWillChangeData); }
19 PassRefPtr<StyleWillChangeData> copy() const { return adoptRef(new StyleWillChangeData(*this)); }
21 bool operator==(const StyleWillChangeData& o) const
23 return m_properties == o.m_properties && m_contents == o.m_contents && m_scrollPosition == o.m_scrollPosition;
26 bool operator!=(const StyleWillChangeData& o) const
28 return !(*this == o);
31 Vector<CSSPropertyID> m_properties;
32 unsigned m_contents : 1;
33 unsigned m_scrollPosition : 1;
35 private:
36 StyleWillChangeData();
37 StyleWillChangeData(const StyleWillChangeData&);
40 } // namespace blink
42 #endif // StyleWillChangeData_h