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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp

Issue 2643643007: CSS: Translate support for none. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/core/css/properties/CSSPropertyAPITranslate.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 for (auto& snapCoordinate : valueList) { 1199 for (auto& snapCoordinate : valueList) {
1200 coordinates.uncheckedAppend(convertPosition(state, *snapCoordinate)); 1200 coordinates.uncheckedAppend(convertPosition(state, *snapCoordinate));
1201 } 1201 }
1202 1202
1203 return coordinates; 1203 return coordinates;
1204 } 1204 }
1205 1205
1206 PassRefPtr<TranslateTransformOperation> StyleBuilderConverter::convertTranslate( 1206 PassRefPtr<TranslateTransformOperation> StyleBuilderConverter::convertTranslate(
1207 StyleResolverState& state, 1207 StyleResolverState& state,
1208 const CSSValue& value) { 1208 const CSSValue& value) {
1209 if (value.isIdentifierValue()) {
1210 DCHECK_EQ(toCSSIdentifierValue(value).getValueID(), CSSValueNone);
1211 return nullptr;
1212 }
1209 const CSSValueList& list = toCSSValueList(value); 1213 const CSSValueList& list = toCSSValueList(value);
1210 ASSERT(list.length() <= 3); 1214 ASSERT(list.length() <= 3);
1211 Length tx = convertLength(state, list.item(0)); 1215 Length tx = convertLength(state, list.item(0));
1212 Length ty(0, Fixed); 1216 Length ty(0, Fixed);
1213 double tz = 0; 1217 double tz = 0;
1214 if (list.length() >= 2) 1218 if (list.length() >= 2)
1215 ty = convertLength(state, list.item(1)); 1219 ty = convertLength(state, list.item(1));
1216 if (list.length() == 3) 1220 if (list.length() == 3)
1217 tz = toCSSPrimitiveValue(list.item(2)) 1221 tz = toCSSPrimitiveValue(list.item(2))
1218 .computeLength<double>(state.cssToLengthConversionData()); 1222 .computeLength<double>(state.cssToLengthConversionData());
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 } 1324 }
1321 1325
1322 const CSSValue& StyleBuilderConverter::convertRegisteredPropertyValue( 1326 const CSSValue& StyleBuilderConverter::convertRegisteredPropertyValue(
1323 const StyleResolverState& state, 1327 const StyleResolverState& state,
1324 const CSSValue& value) { 1328 const CSSValue& value) {
1325 return computeRegisteredPropertyValue(state.cssToLengthConversionData(), 1329 return computeRegisteredPropertyValue(state.cssToLengthConversionData(),
1326 value); 1330 value);
1327 } 1331 }
1328 1332
1329 } // namespace blink 1333 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/properties/CSSPropertyAPITranslate.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698