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

Side by Side Diff: third_party/WebKit/Source/core/animation/animatable/AnimatableLengthBox.cpp

Issue 1640643002: Add additive animation support for CSS property clip (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_propertyInterpolationTypesMapping
Patch Set: Rebased Created 4 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
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 24 matching lines...) Expand all
35 PassRefPtr<AnimatableValue> AnimatableLengthBox::interpolateTo(const AnimatableV alue* value, double fraction) const 35 PassRefPtr<AnimatableValue> AnimatableLengthBox::interpolateTo(const AnimatableV alue* value, double fraction) const
36 { 36 {
37 const AnimatableLengthBox* lengthBox = toAnimatableLengthBox(value); 37 const AnimatableLengthBox* lengthBox = toAnimatableLengthBox(value);
38 return AnimatableLengthBox::create( 38 return AnimatableLengthBox::create(
39 AnimatableValue::interpolate(this->left(), lengthBox->left(), fraction), 39 AnimatableValue::interpolate(this->left(), lengthBox->left(), fraction),
40 AnimatableValue::interpolate(this->right(), lengthBox->right(), fraction ), 40 AnimatableValue::interpolate(this->right(), lengthBox->right(), fraction ),
41 AnimatableValue::interpolate(this->top(), lengthBox->top(), fraction), 41 AnimatableValue::interpolate(this->top(), lengthBox->top(), fraction),
42 AnimatableValue::interpolate(this->bottom(), lengthBox->bottom(), fracti on)); 42 AnimatableValue::interpolate(this->bottom(), lengthBox->bottom(), fracti on));
43 } 43 }
44 44
45 bool AnimatableLengthBox::usesDefaultInterpolationWith(const AnimatableValue* ot her) const
46 {
47 const AnimatableLengthBox& otherBox = toAnimatableLengthBox(*other);
48 return usesDefaultInterpolation(left(), otherBox.left())
49 || usesDefaultInterpolation(right(), otherBox.right())
50 || usesDefaultInterpolation(top(), otherBox.top())
51 || usesDefaultInterpolation(bottom(), otherBox.bottom());
52 }
53
45 bool AnimatableLengthBox::equalTo(const AnimatableValue* value) const 54 bool AnimatableLengthBox::equalTo(const AnimatableValue* value) const
46 { 55 {
47 const AnimatableLengthBox* lengthBox = toAnimatableLengthBox(value); 56 const AnimatableLengthBox* lengthBox = toAnimatableLengthBox(value);
48 return left()->equals(lengthBox->left()) 57 return left()->equals(lengthBox->left())
49 && right()->equals(lengthBox->right()) 58 && right()->equals(lengthBox->right())
50 && top()->equals(lengthBox->top()) 59 && top()->equals(lengthBox->top())
51 && bottom()->equals(lengthBox->bottom()); 60 && bottom()->equals(lengthBox->bottom());
52 } 61 }
53 62
54 } // namespace blink 63 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/animatable/AnimatableLengthBox.h ('k') | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698