| Index: Source/core/rendering/style/StyleRareNonInheritedData.cpp
|
| diff --git a/Source/core/rendering/style/StyleRareNonInheritedData.cpp b/Source/core/rendering/style/StyleRareNonInheritedData.cpp
|
| index 90a5cac5d68b181753a6838eaf13721a81204ab3..aeedd3e14dc8d6b068ab6a9888073deecd15406a 100644
|
| --- a/Source/core/rendering/style/StyleRareNonInheritedData.cpp
|
| +++ b/Source/core/rendering/style/StyleRareNonInheritedData.cpp
|
| @@ -1,6 +1,7 @@
|
| /*
|
| * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
|
| * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
|
| + * 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
|
| @@ -120,6 +121,7 @@ StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited
|
| , m_transitions(o.m_transitions ? adoptPtrWillBeNoop(new CSSAnimationDataList(*o.m_transitions)) : nullptr)
|
| , m_mask(o.m_mask)
|
| , m_maskBoxImage(o.m_maskBoxImage)
|
| + , m_navigation(o.m_navigation ? adoptPtr(new StyleNavigationData(*o.m_navigation)) : nullptr)
|
| , m_pageSize(o.m_pageSize)
|
| , m_shapeOutside(o.m_shapeOutside)
|
| , m_shapeMargin(o.m_shapeMargin)
|
| @@ -203,6 +205,7 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c
|
| && reflectionDataEquivalent(o)
|
| && animationDataEquivalent(o)
|
| && transitionDataEquivalent(o)
|
| + && navigationDataEquivalent(o)
|
| && m_mask == o.m_mask
|
| && m_maskBoxImage == o.m_maskBoxImage
|
| && m_pageSize == o.m_pageSize
|
| @@ -266,6 +269,14 @@ bool StyleRareNonInheritedData::contentDataEquivalent(const StyleRareNonInherite
|
| return !a && !b;
|
| }
|
|
|
| +bool StyleRareNonInheritedData::navigationDataEquivalent(const StyleRareNonInheritedData& o) const
|
| +{
|
| + StyleNavigationData* a = m_navigation.get();
|
| + StyleNavigationData* b = o.m_navigation.get();
|
| +
|
| + return a && b && *a == *b;
|
| +}
|
| +
|
| bool StyleRareNonInheritedData::counterDataEquivalent(const StyleRareNonInheritedData& o) const
|
| {
|
| if (m_counterDirectives.get() == o.m_counterDirectives.get())
|
| @@ -319,4 +330,60 @@ bool StyleRareNonInheritedData::hasFilters() const
|
| return m_filter.get() && !m_filter->m_operations.isEmpty();
|
| }
|
|
|
| +void StyleRareNonInheritedData::setNavigation(StyleNavigationData::NavigationDirection direction, const StyleNavigationValue& value)
|
| +{
|
| + if (!m_navigation)
|
| + m_navigation = adoptPtr(new StyleNavigationData());
|
| +
|
| + m_navigation->setProperty(direction, value);
|
| +}
|
| +
|
| +StyleNavigationValue StyleRareNonInheritedData::navDown() const
|
| +{
|
| + if (!m_navigation)
|
| + return StyleNavigationValue();
|
| + return m_navigation->down();
|
| +}
|
| +
|
| +StyleNavigationValue StyleRareNonInheritedData::navLeft() const
|
| +{
|
| + if (!m_navigation)
|
| + return StyleNavigationValue();
|
| + return m_navigation->left();
|
| +}
|
| +
|
| +StyleNavigationValue StyleRareNonInheritedData::navRight() const
|
| +{
|
| + if (!m_navigation)
|
| + return StyleNavigationValue();
|
| + return m_navigation->right();
|
| +}
|
| +
|
| +StyleNavigationValue StyleRareNonInheritedData::navUp() const
|
| +{
|
| + if (!m_navigation)
|
| + return StyleNavigationValue();
|
| + return m_navigation->up();
|
| +}
|
| +
|
| +void StyleRareNonInheritedData::setNavDown(const StyleNavigationValue& value)
|
| +{
|
| + setNavigation(StyleNavigationData::NavigationDown, value);
|
| +}
|
| +
|
| +void StyleRareNonInheritedData::setNavLeft(const StyleNavigationValue& value)
|
| +{
|
| + setNavigation(StyleNavigationData::NavigationLeft, value);
|
| +}
|
| +
|
| +void StyleRareNonInheritedData::setNavRight(const StyleNavigationValue& value)
|
| +{
|
| + setNavigation(StyleNavigationData::NavigationRight, value);
|
| +}
|
| +
|
| +void StyleRareNonInheritedData::setNavUp(const StyleNavigationValue& value)
|
| +{
|
| + setNavigation(StyleNavigationData::NavigationUp, value);
|
| +}
|
| +
|
| } // namespace WebCore
|
|
|