Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Side by Side Diff: Source/core/rendering/style/StyleNavigationData.h

Issue 17450016: Implementation of CSS3 nav-up/down/left/right properties from CSS3 UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased once again to master, fixed layout test. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 2011 Kyounga Ra (kyounga.ra@gmail.com)
3 * Copyright (C) 2013 Opera Software ASA. All rights reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 *
20 */
21
22 #ifndef StyleNavigationData_h
23 #define StyleNavigationData_h
24
25 #include "StyleNavigationValue.h"
26
27 namespace WebCore {
28
29 class StyleNavigationData {
30 public:
31 enum NavigationDirection {
32 NavigationDown,
33 NavigationLeft,
34 NavigationRight,
35 NavigationUp
36 };
37
38 StyleNavigationData(NavigationDirection direction, const StyleNavigationValu e& value)
fs 2014/04/14 12:32:01 Does anything use this constructor? (Looks a bit d
Krzysztof Olczyk 2014/04/17 13:48:40 Done.
39 {
40 SetProperty(direction, value);
41 }
42
43 StyleNavigationData(const StyleNavigationData& o)
44 : m_up(o.m_up)
45 , m_down(o.m_down)
46 , m_left(o.m_left)
47 , m_right(o.m_right)
48 { }
49
50 bool operator==(const StyleNavigationData& o) const
51 {
52 return m_up == o.m_up && m_down == o.m_down && m_left == o.m_left && m_r ight == o.m_right;
53 }
54
55 bool operator!=(const StyleNavigationData& o) const
56 {
57 return !(*this == o);
58 }
59
60 const StyleNavigationValue& up() const { return m_up; }
61 const StyleNavigationValue& down() const { return m_down; }
62 const StyleNavigationValue& left() const { return m_left; }
63 const StyleNavigationValue& right() const { return m_right; }
64
65 void setUp(const StyleNavigationValue& value) { m_up = value; }
66 void setDown(const StyleNavigationValue& value) { m_down = value; }
67 void setLeft(const StyleNavigationValue& value) { m_left = value; }
68 void setRight(const StyleNavigationValue& value) { m_right = value; }
69
70 void SetProperty(NavigationDirection, const StyleNavigationValue&);
fs 2014/04/14 12:32:01 setProperty (but hopefully this won't be needed in
Krzysztof Olczyk 2014/04/17 13:48:40 Done.
71
72 private:
73 StyleNavigationValue m_up;
74 StyleNavigationValue m_down;
75 StyleNavigationValue m_left;
76 StyleNavigationValue m_right;
77 };
78
79 } // namespace WebCore
80
81 #endif // StyleNavigationData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698