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

Side by Side Diff: Source/core/rendering/style/StyleNavigationValue.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: Implementation of CSS3 nav-up/down/left/right properties from CSS3 UI Created 7 years, 6 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 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 *
19 */
20
21 #ifndef StyleNavigationValue_h
22 #define StyleNavigationValue_h
23
24 namespace WebCore {
25
26 class StyleNavigationValue {
27 friend class RenderStyle;
28 public:
29 StyleNavigationValue()
30 :m_id(AtomicString("auto"))
esprehn 2013/06/20 19:45:10 Missing space
Krzysztof Olczyk 2013/07/22 14:14:16 Done.
31 , m_target(AtomicString("current")) { }
esprehn 2013/06/20 19:45:10 You don't need the AtomicString here, just call th
Krzysztof Olczyk 2013/07/22 14:14:16 Done.
32
33 StyleNavigationValue(const char* id, const char* target)
esprehn 2013/06/20 19:45:10 String? We don't really use const char* like this.
Krzysztof Olczyk 2013/07/22 14:14:16 Done.
34 :m_id(AtomicString(id))
esprehn 2013/06/20 19:45:10 Same
Krzysztof Olczyk 2013/07/22 14:14:16 Done.
35 , m_target(AtomicString(target)) { }
36
37 StyleNavigationValue(const AtomicString& id, const AtomicString& target = At omicString("current"))
38 :m_id(id)
39 , m_target(target)
40 { }
41
42 bool isAuto() const
43 {
44 return m_id == "auto";
45 }
46
47 bool operator==(const StyleNavigationValue& o) const
48 {
49 return m_id == o.m_id && m_target == o.m_target;
50 }
51
52 bool operator!=(const StyleNavigationValue& o) const
53 {
54 return !(*this == o);
55 }
56
57 void operator=(const StyleNavigationValue& o)
58 {
59 m_id = o.m_id;
60 m_target = o.m_target;
61 }
62
63 const AtomicString& id() const { return m_id; }
64 const AtomicString& target() const { return m_target; }
65
66 protected:
67 AtomicString m_id;
68 AtomicString m_target;
69 };
70
71 } // namespace WebCore
72
73 #endif // StyleNavigationValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698