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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * * Redistributions of source code must retain the above copyright 4 * * Redistributions of source code must retain the above copyright
5 * notice, this list of conditions and the following disclaimer. 5 * notice, this list of conditions and the following disclaimer.
6 * * Redistributions in binary form must reproduce the above 6 * * Redistributions in binary form must reproduce the above
7 * copyright notice, this list of conditions and the following disclaimer 7 * copyright notice, this list of conditions and the following disclaimer
8 * in the documentation and/or other materials provided with the 8 * in the documentation and/or other materials provided with the
9 * distribution. 9 * distribution.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 if (state.useSVGZoomRules()) 159 if (state.useSVGZoomRules())
160 return primitiveValue->computeLength<float>(state.cssToLengthConversionD ata().copyWithAdjustedZoom(1)); 160 return primitiveValue->computeLength<float>(state.cssToLengthConversionD ata().copyWithAdjustedZoom(1));
161 return primitiveValue->computeLength<float>(state.cssToLengthConversionData( )); 161 return primitiveValue->computeLength<float>(state.cssToLengthConversionData( ));
162 } 162 }
163 163
164 PassRefPtr<SVGLength> StyleBuilderConverter::convertSVGLength(StyleResolverState &, CSSValue* value) 164 PassRefPtr<SVGLength> StyleBuilderConverter::convertSVGLength(StyleResolverState &, CSSValue* value)
165 { 165 {
166 return SVGLength::fromCSSPrimitiveValue(toCSSPrimitiveValue(value)); 166 return SVGLength::fromCSSPrimitiveValue(toCSSPrimitiveValue(value));
167 } 167 }
168 168
169 StyleNavigationValue StyleBuilderConverter::convertStyleNavigationValue(StyleRes olverState&, CSSValue* value)
170 {
171 CSSValueListIterator iterator = value;
172 if (!iterator.hasMore()) {
173 // auto value.
174 return StyleNavigationValue();
175 }
176
177 String id = toCSSPrimitiveValue(iterator.value())->getStringValue();
178 iterator.advance();
179 String target = "current";
180 if (iterator.hasMore())
181 target = toCSSPrimitiveValue(iterator.value())->getStringValue();
182
183 return StyleNavigationValue(id, target);
184 }
185
169 } // namespace WebCore 186 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698