Index: Source/core/css/resolver/StyleBuilderCustom.cpp |
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp |
index be1dedd23d2826d96aff9fd64696a2762c3eabdd..a9f8d2b1c71d622a97a1d8f5995b6c87351937e0 100644 |
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp |
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp |
@@ -8,6 +8,7 @@ |
* Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
* Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) |
* Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
+ * Copyright (C) 2013 Opera Software ASA. All rights reserved. |
* Copyright (C) Research In Motion Limited 2011. All rights reserved. |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions are |
@@ -77,6 +78,7 @@ |
#include "core/rendering/style/SVGRenderStyleDefs.h" |
#include "core/rendering/style/ShadowData.h" |
#include "core/rendering/style/StyleGeneratedImage.h" |
+#include "core/rendering/style/StyleNavigationValue.h" |
#include "core/svg/SVGColor.h" |
#include "core/svg/SVGPaint.h" |
#include "core/svg/SVGURIReference.h" |
@@ -1236,6 +1238,45 @@ void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolver* styleResolv |
break; |
// CSS3 Properties |
+ case CSSPropertyNavDown: |
+ case CSSPropertyNavLeft: |
+ case CSSPropertyNavRight: |
+ case CSSPropertyNavUp: { |
+ StyleNavigationValue navigationValue; |
esprehn
2013/08/08 03:39:40
This should be handled by individual functions ins
Krzysztof Olczyk
2013/12/04 13:56:50
Done.
|
+ |
+ if (isInitial) { |
+ navigationValue = StyleNavigationValue(); |
+ } else if (primitiveValue) { |
+ navigationValue = StyleNavigationValue(primitiveValue->getStringValue()); |
+ } else if (value->isValueList()) { |
+ AtomicString vals[2]; |
+ CSSValueListIterator iterator = value; |
+ |
+ for (int i = 0; i < 2 && iterator.hasMore(); iterator.advance()) { |
+ CSSValue* item = iterator.value(); |
+ if (!item->isPrimitiveValue()) |
+ continue; |
+ vals[i++] = (static_cast<CSSPrimitiveValue*>(item))->getStringValue(); |
+ } |
+ |
+ navigationValue = StyleNavigationValue(vals[0], vals[1]); |
+ } |
+ |
+ switch (id) { |
+ case CSSPropertyNavDown: |
+ state.style()->setNavDown(navigationValue); |
+ return; |
+ case CSSPropertyNavLeft: |
+ state.style()->setNavLeft(navigationValue); |
+ return; |
+ case CSSPropertyNavRight: |
+ state.style()->setNavRight(navigationValue); |
+ return; |
+ case CSSPropertyNavUp: |
+ state.style()->setNavUp(navigationValue); |
+ return; |
+ } |
+ } |
case CSSPropertyTextShadow: |
case CSSPropertyBoxShadow: |
case CSSPropertyWebkitBoxShadow: { |