| Index: Source/core/rendering/style/StyleNavigationData.cpp
|
| diff --git a/Source/core/rendering/style/StyleNavigationData.cpp b/Source/core/rendering/style/StyleNavigationData.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..78fb2e5c18d5b223d9c1c1ca8b83c177e955c890
|
| --- /dev/null
|
| +++ b/Source/core/rendering/style/StyleNavigationData.cpp
|
| @@ -0,0 +1,61 @@
|
| +/*
|
| + * Copyright (C) 2014 Opera Software ASA. All rights reserved.
|
| + *
|
| + * 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.
|
| + *
|
| + */
|
| +
|
| +#include "config.h"
|
| +
|
| +#include "core/rendering/style/StyleNavigationData.h"
|
| +
|
| +#include "wtf/Assertions.h"
|
| +
|
| +namespace blink {
|
| +
|
| +StyleNavigationData::StyleNavigationData()
|
| +{
|
| +}
|
| +
|
| +StyleNavigationData::StyleNavigationData(const StyleNavigationData &o)
|
| + : m_up(o.m_up)
|
| + , m_down(o.m_down)
|
| + , m_left(o.m_left)
|
| + , m_right(o.m_right)
|
| +{
|
| +}
|
| +
|
| +void StyleNavigationData::setProperty(StyleNavigationData::NavigationDirection direction, const StyleNavigationValue& value)
|
| +{
|
| + switch (direction) {
|
| + case NavigationDown:
|
| + setDown(value);
|
| + return;
|
| + case NavigationLeft:
|
| + setLeft(value);
|
| + return;
|
| + case NavigationRight:
|
| + setRight(value);
|
| + return;
|
| + case NavigationUp:
|
| + setUp(value);
|
| + return;
|
| + default:
|
| + ASSERT_NOT_REACHED();
|
| + }
|
| +}
|
| +
|
| +} // namespace blink
|
|
|