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

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

Issue 2658333003: Add smooth interpolation support for <length> custom properties (Closed)
Patch Set: Created 3 years, 10 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/animation/LengthInterpolationFunctions.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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/CSSSyntaxDescriptor.h" 5 #include "core/css/CSSSyntaxDescriptor.h"
6 6
7 #include "core/animation/CSSColorInterpolationType.h" 7 #include "core/animation/CSSColorInterpolationType.h"
8 #include "core/animation/CSSLengthInterpolationType.h"
8 #include "core/animation/CSSValueInterpolationType.h" 9 #include "core/animation/CSSValueInterpolationType.h"
9 #include "core/css/CSSCustomPropertyDeclaration.h" 10 #include "core/css/CSSCustomPropertyDeclaration.h"
10 #include "core/css/CSSURIValue.h" 11 #include "core/css/CSSURIValue.h"
11 #include "core/css/CSSValueList.h" 12 #include "core/css/CSSValueList.h"
12 #include "core/css/CSSVariableReferenceValue.h" 13 #include "core/css/CSSVariableReferenceValue.h"
13 #include "core/css/parser/CSSParserIdioms.h" 14 #include "core/css/parser/CSSParserIdioms.h"
14 #include "core/css/parser/CSSPropertyParserHelpers.h" 15 #include "core/css/parser/CSSPropertyParserHelpers.h"
15 #include "core/css/parser/CSSVariableParser.h" 16 #include "core/css/parser/CSSVariableParser.h"
16 #include "core/html/parser/HTMLParserIdioms.h" 17 #include "core/html/parser/HTMLParserIdioms.h"
17 18
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // TODO(alancutter): Support animation of repeatable types. 223 // TODO(alancutter): Support animation of repeatable types.
223 continue; 224 continue;
224 } 225 }
225 226
226 switch (component.m_type) { 227 switch (component.m_type) {
227 case CSSSyntaxType::Color: 228 case CSSSyntaxType::Color:
228 interpolationTypes.push_back( 229 interpolationTypes.push_back(
229 WTF::makeUnique<CSSColorInterpolationType>(property)); 230 WTF::makeUnique<CSSColorInterpolationType>(property));
230 break; 231 break;
231 case CSSSyntaxType::Length: 232 case CSSSyntaxType::Length:
233 interpolationTypes.push_back(
234 WTF::makeUnique<CSSLengthInterpolationType>(property));
235 break;
232 case CSSSyntaxType::Number: 236 case CSSSyntaxType::Number:
233 case CSSSyntaxType::Percentage: 237 case CSSSyntaxType::Percentage:
234 case CSSSyntaxType::LengthPercentage: 238 case CSSSyntaxType::LengthPercentage:
235 case CSSSyntaxType::Image: 239 case CSSSyntaxType::Image:
236 case CSSSyntaxType::Url: 240 case CSSSyntaxType::Url:
237 case CSSSyntaxType::Integer: 241 case CSSSyntaxType::Integer:
238 case CSSSyntaxType::Angle: 242 case CSSSyntaxType::Angle:
239 case CSSSyntaxType::Time: 243 case CSSSyntaxType::Time:
240 case CSSSyntaxType::Resolution: 244 case CSSSyntaxType::Resolution:
241 case CSSSyntaxType::TransformFunction: 245 case CSSSyntaxType::TransformFunction:
242 // TODO(alancutter): Support smooth interpolation of these types. 246 // TODO(alancutter): Support smooth interpolation of these types.
243 break; 247 break;
244 case CSSSyntaxType::TokenStream: 248 case CSSSyntaxType::TokenStream:
245 case CSSSyntaxType::Ident: 249 case CSSSyntaxType::Ident:
246 case CSSSyntaxType::CustomIdent: 250 case CSSSyntaxType::CustomIdent:
247 // Uses the CSSValueInterpolationType added below. 251 // Uses the CSSValueInterpolationType added below.
248 break; 252 break;
249 default: 253 default:
250 NOTREACHED(); 254 NOTREACHED();
251 break; 255 break;
252 } 256 }
253 } 257 }
254 interpolationTypes.push_back( 258 interpolationTypes.push_back(
255 WTF::makeUnique<CSSValueInterpolationType>(property)); 259 WTF::makeUnique<CSSValueInterpolationType>(property));
256 return interpolationTypes; 260 return interpolationTypes;
257 } 261 }
258 262
259 } // namespace blink 263 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/LengthInterpolationFunctions.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698