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

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

Issue 2937043002: CSS Properties & Values API: Compute initial values for transfrom-list type. (Closed)
Patch Set: remove unnecessary line. Created 3 years, 5 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/PropertyRegistration.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 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 StyleResolverState& state, 1412 StyleResolverState& state,
1413 const CSSValue& value) { 1413 const CSSValue& value) {
1414 if (value.IsRayValue()) 1414 if (value.IsRayValue())
1415 return BasicShapeForValue(state, value); 1415 return BasicShapeForValue(state, value);
1416 return ConvertPathOrNone(state, value); 1416 return ConvertPathOrNone(state, value);
1417 } 1417 }
1418 1418
1419 static const CSSValue& ComputeRegisteredPropertyValue( 1419 static const CSSValue& ComputeRegisteredPropertyValue(
1420 const CSSToLengthConversionData& css_to_length_conversion_data, 1420 const CSSToLengthConversionData& css_to_length_conversion_data,
1421 const CSSValue& value) { 1421 const CSSValue& value) {
1422 // TODO(timloh): Images and transform-function values can also contain 1422 // TODO(timloh): Images values can also contain lengths.
1423 // lengths. 1423 if (value.IsFunctionValue()) {
1424 const CSSFunctionValue& function_value = ToCSSFunctionValue(value);
1425 CSSFunctionValue* new_function =
1426 CSSFunctionValue::Create(function_value.FunctionType());
1427 for (const CSSValue* inner_value : ToCSSValueList(value)) {
1428 new_function->Append(ComputeRegisteredPropertyValue(
1429 css_to_length_conversion_data, *inner_value));
1430 }
1431 return *new_function;
1432 }
1433
1424 if (value.IsValueList()) { 1434 if (value.IsValueList()) {
1425 CSSValueList* new_list = CSSValueList::CreateSpaceSeparated(); 1435 CSSValueList* new_list = CSSValueList::CreateSpaceSeparated();
1426 for (const CSSValue* inner_value : ToCSSValueList(value)) { 1436 for (const CSSValue* inner_value : ToCSSValueList(value)) {
1427 new_list->Append(ComputeRegisteredPropertyValue( 1437 new_list->Append(ComputeRegisteredPropertyValue(
1428 css_to_length_conversion_data, *inner_value)); 1438 css_to_length_conversion_data, *inner_value));
1429 } 1439 }
1430 return *new_list; 1440 return *new_list;
1431 } 1441 }
1432 1442
1433 if (value.IsPrimitiveValue()) { 1443 if (value.IsPrimitiveValue()) {
(...skipping 18 matching lines...) Expand all
1452 } 1462 }
1453 1463
1454 const CSSValue& StyleBuilderConverter::ConvertRegisteredPropertyValue( 1464 const CSSValue& StyleBuilderConverter::ConvertRegisteredPropertyValue(
1455 const StyleResolverState& state, 1465 const StyleResolverState& state,
1456 const CSSValue& value) { 1466 const CSSValue& value) {
1457 return ComputeRegisteredPropertyValue(state.CssToLengthConversionData(), 1467 return ComputeRegisteredPropertyValue(state.CssToLengthConversionData(),
1458 value); 1468 value);
1459 } 1469 }
1460 1470
1461 } // namespace blink 1471 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/PropertyRegistration.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698