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

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: Added tests Created 7 years, 4 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;
esprehn 2013/08/08 03:39:40 no friends, this isn't needed
Krzysztof Olczyk 2013/12/04 13:56:50 Done.
28 public:
29 StyleNavigationValue()
30 : m_id("auto")
31 , m_target("current") { }
esprehn 2013/08/08 03:39:40 wrong indent, and the braces are on the wrong line
Krzysztof Olczyk 2013/12/04 13:56:50 Done.
32
33 StyleNavigationValue(const AtomicString& id, const AtomicString& target = "c urrent")
34 : m_id(id)
35 , m_target(target)
esprehn 2013/08/08 03:39:40 wrong indent
Krzysztof Olczyk 2013/12/04 13:56:50 Done.
36 { }
37
38 bool isAuto() const
39 {
40 return m_id == "auto";
esprehn 2013/08/08 03:39:40 This means you can't do #auto in the css?
Krzysztof Olczyk 2013/12/04 13:56:50 Fixed.
41 }
42
43 bool operator==(const StyleNavigationValue& o) const
44 {
45 return m_id == o.m_id && m_target == o.m_target;
46 }
47
48 bool operator!=(const StyleNavigationValue& o) const
49 {
50 return !(*this == o);
51 }
52
53 void operator=(const StyleNavigationValue& o)
54 {
55 m_id = o.m_id;
56 m_target = o.m_target;
57 }
58
59 const AtomicString& id() const { return m_id; }
60 const AtomicString& target() const { return m_target; }
61
62 protected:
63 AtomicString m_id;
64 AtomicString m_target;
65 };
66
67 } // namespace WebCore
68
69 #endif // StyleNavigationValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698