OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (C) 2011 Kyounga Ra (kyounga.ra@gmail.com) | |
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | |
4 * Copyright (C) 2016 Samsung Electronics. All rights reserved. | |
5 * | |
6 * This library is free software; you can redistribute it and/or | |
7 * modify it under the terms of the GNU Library General Public | |
8 * License as published by the Free Software Foundation; either | |
9 * version 2 of the License, or (at your option) any later version. | |
10 * | |
11 * This library is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 * Library General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU Library General Public License | |
17 * along with this library; see the file COPYING.LIB. If not, write to | |
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
19 * Boston, MA 02110-1301, USA. | |
20 * | |
21 */ | |
22 | |
23 #ifndef StyleNavigationData_h | |
24 #define StyleNavigationData_h | |
25 | |
26 #include "core/style/StyleNavigationValue.h" | |
27 #include "wtf/PassRefPtr.h" | |
28 #include "wtf/RefCounted.h" | |
29 | |
30 namespace blink { | |
31 | |
32 class StyleNavigationData : public RefCounted<StyleNavigationData> { | |
33 public: | |
34 static PassRefPtr<StyleNavigationData> create() { return adoptRef(new StyleN avigationData()); } | |
35 PassRefPtr<StyleNavigationData> copy() const { return adoptRef(new StyleNavi gationData(*this)); } | |
36 | |
37 bool operator==(const StyleNavigationData& o) const | |
fs
2016/05/18 15:55:05
Move definition to implementation file. (Each Styl
| |
38 { | |
39 return m_up == o.m_up && m_down == o.m_down && m_left == o.m_left && m_r ight == o.m_right; | |
40 } | |
41 | |
42 bool operator!=(const StyleNavigationData& o) const | |
43 { | |
44 return !(*this == o); | |
45 } | |
46 | |
47 const StyleNavigationValue& up() const { return m_up; } | |
48 const StyleNavigationValue& down() const { return m_down; } | |
49 const StyleNavigationValue& left() const { return m_left; } | |
50 const StyleNavigationValue& right() const { return m_right; } | |
51 | |
52 void setUp(const StyleNavigationValue& value) { m_up = value; } | |
53 void setDown(const StyleNavigationValue& value) { m_down = value; } | |
54 void setLeft(const StyleNavigationValue& value) { m_left = value; } | |
55 void setRight(const StyleNavigationValue& value) { m_right = value; } | |
56 | |
57 private: | |
58 StyleNavigationData(); | |
59 StyleNavigationData(const StyleNavigationData&); | |
60 | |
61 StyleNavigationValue m_up; | |
62 StyleNavigationValue m_down; | |
63 StyleNavigationValue m_left; | |
64 StyleNavigationValue m_right; | |
65 }; | |
66 | |
67 } // namespace blink | |
68 | |
69 #endif // StyleNavigationData_h | |
OLD | NEW |