Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp

Issue 2247773004: [WIP] CSS Motion Path: offset-anchor and offset-position Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: offsetAnchor Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 return; 591 return;
592 case CSSPropertyWebkitMaskSize: 592 case CSSPropertyWebkitMaskSize:
593 setOnFillLayers<CSSPropertyWebkitMaskSize>(style->accessMaskLayers(), va lue, state); 593 setOnFillLayers<CSSPropertyWebkitMaskSize>(style->accessMaskLayers(), va lue, state);
594 return; 594 return;
595 case CSSPropertyPerspective: 595 case CSSPropertyPerspective:
596 style->setPerspective(value->isDouble() ? clampTo<float>(toAnimatableDou ble(value)->toDouble()) : 0); 596 style->setPerspective(value->isDouble() ? clampTo<float>(toAnimatableDou ble(value)->toDouble()) : 0);
597 return; 597 return;
598 case CSSPropertyPerspectiveOrigin: 598 case CSSPropertyPerspectiveOrigin:
599 style->setPerspectiveOrigin(animatableValueToLengthPoint(value, state)); 599 style->setPerspectiveOrigin(animatableValueToLengthPoint(value, state));
600 return; 600 return;
601 case CSSPropertyOffsetAnchor:
602 style->setOffsetAnchor(animatableValueToLengthPoint(value, state));
603 return;
604 case CSSPropertyOffsetPosition:
605 style->setOffsetPosition(animatableValueToLengthPoint(value, state));
606 return;
601 case CSSPropertyShapeOutside: 607 case CSSPropertyShapeOutside:
602 style->setShapeOutside(toAnimatableShapeValue(value)->getShapeValue()); 608 style->setShapeOutside(toAnimatableShapeValue(value)->getShapeValue());
603 return; 609 return;
604 case CSSPropertyShapeMargin: 610 case CSSPropertyShapeMargin:
605 style->setShapeMargin(animatableValueToLength(value, state, ValueRangeNo nNegative)); 611 style->setShapeMargin(animatableValueToLength(value, state, ValueRangeNo nNegative));
606 return; 612 return;
607 case CSSPropertyShapeImageThreshold: 613 case CSSPropertyShapeImageThreshold:
608 style->setShapeImageThreshold(clampTo<float>(toAnimatableDouble(value)-> toDouble(), 0, 1)); 614 style->setShapeImageThreshold(clampTo<float>(toAnimatableDouble(value)-> toDouble(), 0, 1));
609 return; 615 return;
610 case CSSPropertyWebkitTextStrokeColor: 616 case CSSPropertyWebkitTextStrokeColor:
(...skipping 23 matching lines...) Expand all
634 style->setRotate(toRotateTransformOperation(animatableValueToTransformOp eration(value, TransformOperation::Rotate3D))); 640 style->setRotate(toRotateTransformOperation(animatableValueToTransformOp eration(value, TransformOperation::Rotate3D)));
635 return; 641 return;
636 } 642 }
637 case CSSPropertyScale: { 643 case CSSPropertyScale: {
638 style->setScale(toScaleTransformOperation(animatableValueToTransformOper ation(value, TransformOperation::Scale3D))); 644 style->setScale(toScaleTransformOperation(animatableValueToTransformOper ation(value, TransformOperation::Scale3D)));
639 return; 645 return;
640 } 646 }
641 case CSSPropertyTransformOrigin: 647 case CSSPropertyTransformOrigin:
642 style->setTransformOrigin(animatableValueToTransformOrigin(value, state) ); 648 style->setTransformOrigin(animatableValueToTransformOrigin(value, state) );
643 return; 649 return;
644 case CSSPropertyMotionOffset: 650 case CSSPropertyOffsetDistance:
645 style->setMotionOffset(animatableValueToLength(value, state)); 651 style->setOffsetDistance(animatableValueToLength(value, state));
646 return; 652 return;
647 case CSSPropertyMotionRotation: 653 case CSSPropertyOffsetRotation:
648 style->setMotionRotation(StyleMotionRotation( 654 style->setOffsetRotation(StyleOffsetRotation(
649 toAnimatableDoubleAndBool(value)->toDouble(), 655 toAnimatableDoubleAndBool(value)->toDouble(),
650 toAnimatableDoubleAndBool(value)->flag() ? MotionRotationAuto : Moti onRotationFixed)); 656 toAnimatableDoubleAndBool(value)->flag() ? OffsetRotationAuto : Offs etRotationFixed));
651 return; 657 return;
652 case CSSPropertyWebkitPerspectiveOriginX: 658 case CSSPropertyWebkitPerspectiveOriginX:
653 style->setPerspectiveOriginX(animatableValueToLength(value, state)); 659 style->setPerspectiveOriginX(animatableValueToLength(value, state));
654 return; 660 return;
655 case CSSPropertyWebkitPerspectiveOriginY: 661 case CSSPropertyWebkitPerspectiveOriginY:
656 style->setPerspectiveOriginY(animatableValueToLength(value, state)); 662 style->setPerspectiveOriginY(animatableValueToLength(value, state));
657 return; 663 return;
658 case CSSPropertyWebkitTransformOriginX: 664 case CSSPropertyWebkitTransformOriginX:
659 style->setTransformOriginX(animatableValueToLength(value, state)); 665 style->setTransformOriginX(animatableValueToLength(value, state));
660 return; 666 return;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 case CSSPropertyRy: 712 case CSSPropertyRy:
707 style->setRy(animatableValueToLength(value, state, ValueRangeNonNegative )); 713 style->setRy(animatableValueToLength(value, state, ValueRangeNonNegative ));
708 return; 714 return;
709 715
710 default: 716 default:
711 ASSERT_NOT_REACHED(); 717 ASSERT_NOT_REACHED();
712 } 718 }
713 } 719 }
714 720
715 } // namespace blink 721 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698