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