Chromium Code Reviews| 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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 512 case CSSPropertyShapeOutside: | 512 case CSSPropertyShapeOutside: |
| 513 return createFromShapeValue(style.shapeOutside()); | 513 return createFromShapeValue(style.shapeOutside()); |
| 514 case CSSPropertyShapeMargin: | 514 case CSSPropertyShapeMargin: |
| 515 return createFromLength(style.shapeMargin(), style); | 515 return createFromLength(style.shapeMargin(), style); |
| 516 case CSSPropertyShapeImageThreshold: | 516 case CSSPropertyShapeImageThreshold: |
| 517 return createFromDouble(style.shapeImageThreshold()); | 517 return createFromDouble(style.shapeImageThreshold()); |
| 518 case CSSPropertyWebkitTextStrokeColor: | 518 case CSSPropertyWebkitTextStrokeColor: |
| 519 return createFromColor(property, style); | 519 return createFromColor(property, style); |
| 520 case CSSPropertyTransform: | 520 case CSSPropertyTransform: |
| 521 return AnimatableTransform::create(style.transform()); | 521 return AnimatableTransform::create(style.transform()); |
| 522 case CSSPropertyTranslate: { | |
| 523 TransformOperations op; | |
| 524 op.operations().append(style.translate()); | |
| 525 return AnimatableTransform::create(op); | |
| 526 } | |
| 527 case CSSPropertyRotate: { | |
| 528 TransformOperations op; | |
|
Eric Willigers
2015/06/05 01:58:22
Repetition could be avoided with a new method (in
soonm
2015/06/10 04:09:32
Done.
| |
| 529 op.operations().append(style.rotate()); | |
| 530 return AnimatableTransform::create(op); | |
| 531 } | |
| 532 case CSSPropertyScale: { | |
| 533 TransformOperations op; | |
| 534 op.operations().append(style.scale()); | |
| 535 return AnimatableTransform::create(op); | |
| 536 } | |
| 522 case CSSPropertyTransformOrigin: | 537 case CSSPropertyTransformOrigin: |
| 523 return createFromTransformOrigin(style.transformOrigin(), style); | 538 return createFromTransformOrigin(style.transformOrigin(), style); |
| 524 case CSSPropertyMotionOffset: | 539 case CSSPropertyMotionOffset: |
| 525 return createFromLength(style.motionOffset(), style); | 540 return createFromLength(style.motionOffset(), style); |
| 526 case CSSPropertyMotionRotation: | 541 case CSSPropertyMotionRotation: |
| 527 return createFromDoubleAndBool(style.motionRotation(), style.motionRotat ionType() == MotionRotationAuto, style); | 542 return createFromDoubleAndBool(style.motionRotation(), style.motionRotat ionType() == MotionRotationAuto, style); |
| 528 case CSSPropertyWebkitPerspectiveOriginX: | 543 case CSSPropertyWebkitPerspectiveOriginX: |
| 529 return createFromLength(style.perspectiveOriginX(), style); | 544 return createFromLength(style.perspectiveOriginX(), style); |
| 530 case CSSPropertyWebkitPerspectiveOriginY: | 545 case CSSPropertyWebkitPerspectiveOriginY: |
| 531 return createFromLength(style.perspectiveOriginY(), style); | 546 return createFromLength(style.perspectiveOriginY(), style); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 563 return createFromLength(style.svgStyle().ry(), style); | 578 return createFromLength(style.svgStyle().ry(), style); |
| 564 case CSSPropertyZIndex: | 579 case CSSPropertyZIndex: |
| 565 return createFromDouble(style.zIndex()); | 580 return createFromDouble(style.zIndex()); |
| 566 default: | 581 default: |
| 567 ASSERT_NOT_REACHED(); | 582 ASSERT_NOT_REACHED(); |
| 568 return nullptr; | 583 return nullptr; |
| 569 } | 584 } |
| 570 } | 585 } |
| 571 | 586 |
| 572 } // namespace blink | 587 } // namespace blink |
| OLD | NEW |