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

Side by Side Diff: Source/core/animation/animatable/AnimatableLengthBoxAndBool.cpp

Issue 1120003002: [Oilpan] Migrate most classes under core/animations to Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Resize expect size of Persistent Created 5 years, 6 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 if (!box()->isLengthBox() || !lengthBoxAndBool->box()->isLengthBox()) 53 if (!box()->isLengthBox() || !lengthBoxAndBool->box()->isLengthBox())
54 return AnimatableValue::usesDefaultInterpolation(box(), lengthBoxAndBool ->box()); 54 return AnimatableValue::usesDefaultInterpolation(box(), lengthBoxAndBool ->box());
55 const AnimatableLengthBox* boxA = toAnimatableLengthBox(box()); 55 const AnimatableLengthBox* boxA = toAnimatableLengthBox(box());
56 const AnimatableLengthBox* boxB = toAnimatableLengthBox(lengthBoxAndBool->bo x()); 56 const AnimatableLengthBox* boxB = toAnimatableLengthBox(lengthBoxAndBool->bo x());
57 return !sidesHaveSameUnits(boxA->left(), boxB->left()) 57 return !sidesHaveSameUnits(boxA->left(), boxB->left())
58 || !sidesHaveSameUnits(boxA->right(), boxB->right()) 58 || !sidesHaveSameUnits(boxA->right(), boxB->right())
59 || !sidesHaveSameUnits(boxA->top(), boxB->top()) 59 || !sidesHaveSameUnits(boxA->top(), boxB->top())
60 || !sidesHaveSameUnits(boxA->bottom(), boxB->bottom()); 60 || !sidesHaveSameUnits(boxA->bottom(), boxB->bottom());
61 } 61 }
62 62
63 PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableLengthBoxAndBool::interpolateT o(const AnimatableValue* value, double fraction) const 63 AnimatableValue* AnimatableLengthBoxAndBool::interpolateTo(const AnimatableValue * value, double fraction) const
64 { 64 {
65 const AnimatableLengthBoxAndBool* lengthBoxAndBool = toAnimatableLengthBoxAn dBool(value); 65 const AnimatableLengthBoxAndBool* lengthBoxAndBool = toAnimatableLengthBoxAn dBool(value);
66 if (usesDefaultInterpolationWith(lengthBoxAndBool)) 66 if (usesDefaultInterpolationWith(lengthBoxAndBool))
67 return defaultInterpolateTo(this, value, fraction); 67 return defaultInterpolateTo(this, value, fraction);
68 return AnimatableLengthBoxAndBool::create( 68 return AnimatableLengthBoxAndBool::create(
69 AnimatableValue::interpolate(box(), lengthBoxAndBool->box(), fraction), 69 AnimatableValue::interpolate(box(), lengthBoxAndBool->box(), fraction),
70 flag()); 70 flag());
71 } 71 }
72 72
73 bool AnimatableLengthBoxAndBool::equalTo(const AnimatableValue* value) const 73 bool AnimatableLengthBoxAndBool::equalTo(const AnimatableValue* value) const
74 { 74 {
75 const AnimatableLengthBoxAndBool* lengthBox = toAnimatableLengthBoxAndBool(v alue); 75 const AnimatableLengthBoxAndBool* lengthBox = toAnimatableLengthBoxAndBool(v alue);
76 return box()->equals(lengthBox->box()) && flag() == lengthBox->flag(); 76 return box()->equals(lengthBox->box()) && flag() == lengthBox->flag();
77 } 77 }
78 78
79 DEFINE_TRACE(AnimatableLengthBoxAndBool) 79 DEFINE_TRACE(AnimatableLengthBoxAndBool)
80 { 80 {
81 visitor->trace(m_box); 81 visitor->trace(m_box);
82 AnimatableValue::trace(visitor); 82 AnimatableValue::trace(visitor);
83 } 83 }
84 84
85 } 85 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698