| OLD | NEW |
| 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 "core/animation/AnimationInputHelpers.h" | 5 #include "core/animation/AnimationInputHelpers.h" |
| 6 | 6 |
| 7 #include "core/SVGNames.h" | 7 #include "core/SVGNames.h" |
| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 return nullptr; | 199 return nullptr; |
| 200 | 200 |
| 201 return iter->value; | 201 return iter->value; |
| 202 } | 202 } |
| 203 | 203 |
| 204 PassRefPtr<TimingFunction> AnimationInputHelpers::parseTimingFunction(const Stri
ng& string) | 204 PassRefPtr<TimingFunction> AnimationInputHelpers::parseTimingFunction(const Stri
ng& string) |
| 205 { | 205 { |
| 206 if (string.isEmpty()) | 206 if (string.isEmpty()) |
| 207 return nullptr; | 207 return nullptr; |
| 208 | 208 |
| 209 RefPtrWillBeRawPtr<CSSValue> value = CSSParser::parseSingleValue(CSSProperty
TransitionTimingFunction, string); | 209 RawPtr<CSSValue> value = CSSParser::parseSingleValue(CSSPropertyTransitionTi
mingFunction, string); |
| 210 if (!value || !value->isValueList()) { | 210 if (!value || !value->isValueList()) { |
| 211 ASSERT(!value || value->isCSSWideKeyword()); | 211 ASSERT(!value || value->isCSSWideKeyword()); |
| 212 return nullptr; | 212 return nullptr; |
| 213 } | 213 } |
| 214 CSSValueList* valueList = toCSSValueList(value.get()); | 214 CSSValueList* valueList = toCSSValueList(value.get()); |
| 215 if (valueList->length() > 1) | 215 if (valueList->length() > 1) |
| 216 return nullptr; | 216 return nullptr; |
| 217 return CSSToStyleMap::mapAnimationTimingFunction(*valueList->item(0), true); | 217 return CSSToStyleMap::mapAnimationTimingFunction(*valueList->item(0), true); |
| 218 } | 218 } |
| 219 | 219 |
| 220 } // namespace blink | 220 } // namespace blink |
| OLD | NEW |