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

Unified Diff: Source/core/css/resolver/StyleBuilderConverter.cpp

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: Applied code review suggestions. Also rebased. Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/css/resolver/StyleBuilderConverter.cpp
diff --git a/Source/core/css/resolver/StyleBuilderConverter.cpp b/Source/core/css/resolver/StyleBuilderConverter.cpp
index d022f6b373c163539de18ff7e55b53c13086e5e1..ca3a734b360466690c0574b2f2409b5fa773135f 100644
--- a/Source/core/css/resolver/StyleBuilderConverter.cpp
+++ b/Source/core/css/resolver/StyleBuilderConverter.cpp
@@ -166,4 +166,21 @@ PassRefPtr<SVGLength> StyleBuilderConverter::convertSVGLength(StyleResolverState
return SVGLength::fromCSSPrimitiveValue(toCSSPrimitiveValue(value));
}
+StyleNavigationValue StyleBuilderConverter::convertStyleNavigationValue(StyleResolverState&, CSSValue* value)
+{
+ CSSValueListIterator iterator = value;
+ if (!iterator.hasMore()) {
+ // auto value.
+ return StyleNavigationValue();
+ }
+
+ String id = toCSSPrimitiveValue(iterator.value())->getStringValue();
+ iterator.advance();
+ String target = "current";
+ if (iterator.hasMore())
+ target = toCSSPrimitiveValue(iterator.value())->getStringValue();
+
+ return StyleNavigationValue(id, target);
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698