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

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

Issue 2680163004: Animations: Smooth interpolation for translate none (Closed)
Patch Set: createNoneValue isNoneValue Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 double destinationZoom = style->effectiveZoom(); 742 double destinationZoom = style->effectiveZoom();
743 style->setTransform(sourceZoom == destinationZoom 743 style->setTransform(sourceZoom == destinationZoom
744 ? operations 744 ? operations
745 : operations.zoom(destinationZoom / sourceZoom)); 745 : operations.zoom(destinationZoom / sourceZoom));
746 return; 746 return;
747 } 747 }
748 case CSSPropertyTranslate: { 748 case CSSPropertyTranslate: {
749 TranslateTransformOperation* translate = 749 TranslateTransformOperation* translate =
750 toTranslateTransformOperation(animatableValueToTransformOperation( 750 toTranslateTransformOperation(animatableValueToTransformOperation(
751 value, TransformOperation::Translate3D)); 751 value, TransformOperation::Translate3D));
752 if (!translate) {
753 style->setTranslate(nullptr);
754 return;
755 }
752 double sourceZoom = toAnimatableTransform(value)->zoom(); 756 double sourceZoom = toAnimatableTransform(value)->zoom();
753 double destinationZoom = style->effectiveZoom(); 757 double destinationZoom = style->effectiveZoom();
754 style->setTranslate( 758 style->setTranslate(
755 sourceZoom == destinationZoom 759 sourceZoom == destinationZoom
756 ? translate 760 ? translate
757 : translate->zoomTranslate(destinationZoom / sourceZoom)); 761 : translate->zoomTranslate(destinationZoom / sourceZoom));
758 return; 762 return;
759 } 763 }
760 case CSSPropertyRotate: { 764 case CSSPropertyRotate: {
761 style->setRotate( 765 style->setRotate(
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 style->setRy( 855 style->setRy(
852 animatableValueToLength(value, state, ValueRangeNonNegative)); 856 animatableValueToLength(value, state, ValueRangeNonNegative));
853 return; 857 return;
854 858
855 default: 859 default:
856 ASSERT_NOT_REACHED(); 860 ASSERT_NOT_REACHED();
857 } 861 }
858 } 862 }
859 863
860 } // namespace blink 864 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698