| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * * Redistributions of source code must retain the above copyright | 4 * * Redistributions of source code must retain the above copyright |
| 5 * notice, this list of conditions and the following disclaimer. | 5 * notice, this list of conditions and the following disclaimer. |
| 6 * * Redistributions in binary form must reproduce the above | 6 * * Redistributions in binary form must reproduce the above |
| 7 * copyright notice, this list of conditions and the following disclaimer | 7 * copyright notice, this list of conditions and the following disclaimer |
| 8 * in the documentation and/or other materials provided with the | 8 * in the documentation and/or other materials provided with the |
| 9 * distribution. | 9 * distribution. |
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 { | 623 { |
| 624 const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value); | 624 const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value); |
| 625 ASSERT(primitiveValue.isNumber() || primitiveValue.isPercentage()); | 625 ASSERT(primitiveValue.isNumber() || primitiveValue.isPercentage()); |
| 626 if (primitiveValue.isNumber()) | 626 if (primitiveValue.isNumber()) |
| 627 return primitiveValue.getFloatValue(); | 627 return primitiveValue.getFloatValue(); |
| 628 return primitiveValue.getFloatValue() / 100.0f; | 628 return primitiveValue.getFloatValue() / 100.0f; |
| 629 } | 629 } |
| 630 | 630 |
| 631 StyleMotionRotation StyleBuilderConverter::convertMotionRotation(StyleResolverSt
ate&, const CSSValue& value) | 631 StyleMotionRotation StyleBuilderConverter::convertMotionRotation(StyleResolverSt
ate&, const CSSValue& value) |
| 632 { | 632 { |
| 633 return convertMotionRotation(value); |
| 634 } |
| 635 |
| 636 StyleMotionRotation StyleBuilderConverter::convertMotionRotation(const CSSValue&
value) |
| 637 { |
| 633 StyleMotionRotation result(0, MotionRotationFixed); | 638 StyleMotionRotation result(0, MotionRotationFixed); |
| 634 | 639 |
| 635 const CSSValueList& list = toCSSValueList(value); | 640 const CSSValueList& list = toCSSValueList(value); |
| 636 ASSERT(list.length() == 1 || list.length() == 2); | 641 ASSERT(list.length() == 1 || list.length() == 2); |
| 637 for (const auto& item : list) { | 642 for (const auto& item : list) { |
| 638 const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(*item); | 643 const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(*item); |
| 639 if (primitiveValue.getValueID() == CSSValueAuto) { | 644 if (primitiveValue.getValueID() == CSSValueAuto) { |
| 640 result.type = MotionRotationAuto; | 645 result.type = MotionRotationAuto; |
| 641 } else if (primitiveValue.getValueID() == CSSValueReverse) { | 646 } else if (primitiveValue.getValueID() == CSSValueReverse) { |
| 642 result.type = MotionRotationAuto; | 647 result.type = MotionRotationAuto; |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 | 982 |
| 978 PassRefPtr<StylePath> StyleBuilderConverter::convertPathOrNone(StyleResolverStat
e& state, const CSSValue& value) | 983 PassRefPtr<StylePath> StyleBuilderConverter::convertPathOrNone(StyleResolverStat
e& state, const CSSValue& value) |
| 979 { | 984 { |
| 980 if (value.isPathValue()) | 985 if (value.isPathValue()) |
| 981 return convertPath(state, value); | 986 return convertPath(state, value); |
| 982 ASSERT(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); | 987 ASSERT(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); |
| 983 return nullptr; | 988 return nullptr; |
| 984 } | 989 } |
| 985 | 990 |
| 986 } // namespace blink | 991 } // namespace blink |
| OLD | NEW |