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

Side by Side Diff: Source/core/animation/AnimationInputHelpers.cpp

Issue 1303173007: Oilpan: Unship Oilpan from CSSValues Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "config.h" 5 #include "config.h"
6 #include "core/animation/AnimationInputHelpers.h" 6 #include "core/animation/AnimationInputHelpers.h"
7 7
8 #include "core/css/CSSValueList.h" 8 #include "core/css/CSSValueList.h"
9 #include "core/css/parser/CSSParser.h" 9 #include "core/css/parser/CSSParser.h"
10 #include "core/css/resolver/CSSToStyleMap.h" 10 #include "core/css/resolver/CSSToStyleMap.h"
(...skipping 15 matching lines...) Expand all
26 builder.append(propertyName[i]); 26 builder.append(propertyName[i]);
27 } 27 }
28 return cssPropertyID(builder.toString()); 28 return cssPropertyID(builder.toString());
29 } 29 }
30 30
31 PassRefPtr<TimingFunction> AnimationInputHelpers::parseTimingFunction(const Stri ng& string) 31 PassRefPtr<TimingFunction> AnimationInputHelpers::parseTimingFunction(const Stri ng& string)
32 { 32 {
33 if (string.isEmpty()) 33 if (string.isEmpty())
34 return nullptr; 34 return nullptr;
35 35
36 RefPtrWillBeRawPtr<CSSValue> value = CSSParser::parseSingleValue(CSSProperty TransitionTimingFunction, string); 36 RefPtr<CSSValue> value = CSSParser::parseSingleValue(CSSPropertyTransitionTi mingFunction, string);
37 if (!value || !value->isValueList()) { 37 if (!value || !value->isValueList()) {
38 ASSERT(!value || value->isCSSWideKeyword()); 38 ASSERT(!value || value->isCSSWideKeyword());
39 return nullptr; 39 return nullptr;
40 } 40 }
41 CSSValueList* valueList = toCSSValueList(value.get()); 41 CSSValueList* valueList = toCSSValueList(value.get());
42 if (valueList->length() > 1) 42 if (valueList->length() > 1)
43 return nullptr; 43 return nullptr;
44 return CSSToStyleMap::mapAnimationTimingFunction(valueList->item(0), true); 44 return CSSToStyleMap::mapAnimationTimingFunction(valueList->item(0), true);
45 } 45 }
46 46
47 } // namespace blink 47 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp ('k') | Source/core/animation/CSSValueInterpolationType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698