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

Unified 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, 6 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
« no previous file with comments | « third_party/WebKit/Source/core/css/PropertyRegistration.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
index 9c63a148c456bb723ac1772932202379a4fc5451..e9d644270904c077502c9d7fa63998f66e94e470 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
@@ -1419,8 +1419,18 @@ PassRefPtr<BasicShape> StyleBuilderConverter::ConvertOffsetPath(
static const CSSValue& ComputeRegisteredPropertyValue(
const CSSToLengthConversionData& css_to_length_conversion_data,
const CSSValue& value) {
- // TODO(timloh): Images and transform-function values can also contain
- // lengths.
+ // TODO(timloh): Images values can also contain lengths.
+ if (value.IsFunctionValue()) {
+ const CSSFunctionValue& function_value = ToCSSFunctionValue(value);
+ CSSFunctionValue* new_function =
+ CSSFunctionValue::Create(function_value.FunctionType());
+ for (const CSSValue* inner_value : ToCSSValueList(value)) {
+ new_function->Append(ComputeRegisteredPropertyValue(
+ css_to_length_conversion_data, *inner_value));
+ }
+ return *new_function;
+ }
+
if (value.IsValueList()) {
CSSValueList* new_list = CSSValueList::CreateSpaceSeparated();
for (const CSSValue* inner_value : ToCSSValueList(value)) {
« 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