Chromium Code Reviews| Index: Source/core/rendering/style/StyleNavigationValue.h |
| diff --git a/Source/core/rendering/style/StyleNavigationValue.h b/Source/core/rendering/style/StyleNavigationValue.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..47016b2d73cde3a2bae0435e5e0b055e961db855 |
| --- /dev/null |
| +++ b/Source/core/rendering/style/StyleNavigationValue.h |
| @@ -0,0 +1,69 @@ |
| +/* |
| + * Copyright (C) 2011 Kyounga Ra (kyounga.ra@gmail.com) |
| + * |
| + * This library is free software; you can redistribute it and/or |
| + * modify it under the terms of the GNU Library General Public |
| + * License as published by the Free Software Foundation; either |
| + * version 2 of the License, or (at your option) any later version. |
| + * |
| + * This library is distributed in the hope that it will be useful, |
| + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| + * Library General Public License for more details. |
| + * |
| + * You should have received a copy of the GNU Library General Public License |
| + * along with this library; see the file COPYING.LIB. If not, write to |
| + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| + * Boston, MA 02110-1301, USA. |
| + * |
| + */ |
| + |
| +#ifndef StyleNavigationValue_h |
| +#define StyleNavigationValue_h |
| + |
| +namespace WebCore { |
| + |
| +class StyleNavigationValue { |
| +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.
|
| +public: |
| + StyleNavigationValue() |
| + : m_id("auto") |
| + , 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.
|
| + |
| + StyleNavigationValue(const AtomicString& id, const AtomicString& target = "current") |
| + : m_id(id) |
| + , m_target(target) |
|
esprehn
2013/08/08 03:39:40
wrong indent
Krzysztof Olczyk
2013/12/04 13:56:50
Done.
|
| + { } |
| + |
| + bool isAuto() const |
| + { |
| + 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.
|
| + } |
| + |
| + bool operator==(const StyleNavigationValue& o) const |
| + { |
| + return m_id == o.m_id && m_target == o.m_target; |
| + } |
| + |
| + bool operator!=(const StyleNavigationValue& o) const |
| + { |
| + return !(*this == o); |
| + } |
| + |
| + void operator=(const StyleNavigationValue& o) |
| + { |
| + m_id = o.m_id; |
| + m_target = o.m_target; |
| + } |
| + |
| + const AtomicString& id() const { return m_id; } |
| + const AtomicString& target() const { return m_target; } |
| + |
| +protected: |
| + AtomicString m_id; |
| + AtomicString m_target; |
| +}; |
| + |
| +} // namespace WebCore |
| + |
| +#endif // StyleNavigationValue_h |