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 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 if (value) | 223 if (value) |
224 return AnimatableShapeValue::create(value); | 224 return AnimatableShapeValue::create(value); |
225 return AnimatableUnknown::create(CSSValueNone); | 225 return AnimatableUnknown::create(CSSValueNone); |
226 } | 226 } |
227 | 227 |
228 static double fontStretchToDouble(FontStretch fontStretch) | 228 static double fontStretchToDouble(FontStretch fontStretch) |
229 { | 229 { |
230 return static_cast<unsigned>(fontStretch); | 230 return static_cast<unsigned>(fontStretch); |
231 } | 231 } |
232 | 232 |
233 static PassRefPtr<AnimatableValue> createFromFontStretch(FontStretch fontStretch
) | 233 static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFontStretch(FontStretch
fontStretch) |
234 { | 234 { |
235 return createFromDouble(fontStretchToDouble(fontStretch)); | 235 return createFromDouble(fontStretchToDouble(fontStretch)); |
236 } | 236 } |
237 | 237 |
238 static double fontWeightToDouble(FontWeight fontWeight) | 238 static double fontWeightToDouble(FontWeight fontWeight) |
239 { | 239 { |
240 switch (fontWeight) { | 240 switch (fontWeight) { |
241 case FontWeight100: | 241 case FontWeight100: |
242 return 100; | 242 return 100; |
243 case FontWeight200: | 243 case FontWeight200: |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 case CSSPropertyZoom: | 506 case CSSPropertyZoom: |
507 return createFromDouble(style.zoom()); | 507 return createFromDouble(style.zoom()); |
508 default: | 508 default: |
509 ASSERT_NOT_REACHED(); | 509 ASSERT_NOT_REACHED(); |
510 // This return value is to avoid a release crash if possible. | 510 // This return value is to avoid a release crash if possible. |
511 return AnimatableUnknown::create(nullptr); | 511 return AnimatableUnknown::create(nullptr); |
512 } | 512 } |
513 } | 513 } |
514 | 514 |
515 } // namespace blink | 515 } // namespace blink |
OLD | NEW |