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

Unified Diff: Source/core/animation/AnimatableNumber.h

Issue 19744002: Web Animations: Add CSSAnimatableValueFactory API (partial implementation) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move folders and add const to param Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/animation/AnimatableNumber.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimatableNumber.h
diff --git a/Source/core/animation/AnimatableNumber.h b/Source/core/animation/AnimatableNumber.h
index 42a6d687356e91e81367857a09ab4045ae06f3c5..39e774a625691f64609696e377c83844c4389ec2 100644
--- a/Source/core/animation/AnimatableNumber.h
+++ b/Source/core/animation/AnimatableNumber.h
@@ -42,18 +42,8 @@ namespace WebCore {
// If created from a CSSPrimitiveValue this class will cache it to be returned in toCSSValue().
class AnimatableNumber : public AnimatableValue {
public:
- virtual ~AnimatableNumber() { }
- static bool canCreateFrom(const CSSValue*);
- static PassRefPtr<AnimatableNumber> create(CSSValue*);
- virtual PassRefPtr<CSSValue> toCSSValue() const OVERRIDE;
-
-protected:
- virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const OVERRIDE;
- virtual PassRefPtr<AnimatableValue> addWith(const AnimatableValue*) const OVERRIDE;
-
-private:
enum NumberUnitType {
- UnitTypeNone,
+ UnitTypeNumber,
UnitTypeLength,
UnitTypeFontSize,
UnitTypeFontXSize,
@@ -70,6 +60,20 @@ private:
UnitTypeInvalid,
};
+ virtual ~AnimatableNumber() { }
+ static bool canCreateFrom(const CSSValue*);
+ static PassRefPtr<AnimatableNumber> create(CSSValue*);
+ static PassRefPtr<AnimatableNumber> create(double number, NumberUnitType unitType, CSSPrimitiveValue* cssPrimitiveValue = 0)
+ {
+ return adoptRef(new AnimatableNumber(number, unitType, cssPrimitiveValue));
+ }
+ virtual PassRefPtr<CSSValue> toCSSValue() const OVERRIDE;
+
+protected:
+ virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const OVERRIDE;
+ virtual PassRefPtr<AnimatableValue> addWith(const AnimatableValue*) const OVERRIDE;
+
+private:
AnimatableNumber(double number, NumberUnitType unitType, CSSPrimitiveValue* cssPrimitiveValue)
: AnimatableValue(TypeNumber)
, m_number(number)
@@ -88,10 +92,6 @@ private:
ASSERT(m_calcExpression);
}
- static PassRefPtr<AnimatableNumber> create(double number, NumberUnitType unitType, CSSPrimitiveValue* cssPrimitiveValue = 0)
- {
- return adoptRef(new AnimatableNumber(number, unitType, cssPrimitiveValue));
- }
static PassRefPtr<AnimatableNumber> create(PassRefPtr<CSSCalcExpressionNode> calcExpression, CSSPrimitiveValue* cssPrimitiveValue = 0)
{
return adoptRef(new AnimatableNumber(calcExpression, cssPrimitiveValue));
« no previous file with comments | « no previous file | Source/core/animation/AnimatableNumber.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698