OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2012 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 16 matching lines...) Expand all Loading... |
27 #define CSSTimingFunctionValue_h | 27 #define CSSTimingFunctionValue_h |
28 | 28 |
29 #include "core/css/CSSValue.h" | 29 #include "core/css/CSSValue.h" |
30 #include "platform/animation/TimingFunction.h" | 30 #include "platform/animation/TimingFunction.h" |
31 #include "wtf/PassRefPtr.h" | 31 #include "wtf/PassRefPtr.h" |
32 | 32 |
33 namespace blink { | 33 namespace blink { |
34 | 34 |
35 class CSSCubicBezierTimingFunctionValue : public CSSValue { | 35 class CSSCubicBezierTimingFunctionValue : public CSSValue { |
36 public: | 36 public: |
37 static RawPtr<CSSCubicBezierTimingFunctionValue> create(double x1, double y1
, double x2, double y2) | 37 static CSSCubicBezierTimingFunctionValue* create(double x1, double y1, doubl
e x2, double y2) |
38 { | 38 { |
39 return new CSSCubicBezierTimingFunctionValue(x1, y1, x2, y2); | 39 return new CSSCubicBezierTimingFunctionValue(x1, y1, x2, y2); |
40 } | 40 } |
41 | 41 |
42 String customCSSText() const; | 42 String customCSSText() const; |
43 | 43 |
44 double x1() const { return m_x1; } | 44 double x1() const { return m_x1; } |
45 double y1() const { return m_y1; } | 45 double y1() const { return m_y1; } |
46 double x2() const { return m_x2; } | 46 double x2() const { return m_x2; } |
47 double y2() const { return m_y2; } | 47 double y2() const { return m_y2; } |
(...skipping 15 matching lines...) Expand all Loading... |
63 double m_x1; | 63 double m_x1; |
64 double m_y1; | 64 double m_y1; |
65 double m_x2; | 65 double m_x2; |
66 double m_y2; | 66 double m_y2; |
67 }; | 67 }; |
68 | 68 |
69 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCubicBezierTimingFunctionValue, isCubicBezierTimi
ngFunctionValue()); | 69 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCubicBezierTimingFunctionValue, isCubicBezierTimi
ngFunctionValue()); |
70 | 70 |
71 class CSSStepsTimingFunctionValue : public CSSValue { | 71 class CSSStepsTimingFunctionValue : public CSSValue { |
72 public: | 72 public: |
73 static RawPtr<CSSStepsTimingFunctionValue> create(int steps, StepsTimingFunc
tion::StepAtPosition stepAtPosition) | 73 static CSSStepsTimingFunctionValue* create(int steps, StepsTimingFunction::S
tepAtPosition stepAtPosition) |
74 { | 74 { |
75 return new CSSStepsTimingFunctionValue(steps, stepAtPosition); | 75 return new CSSStepsTimingFunctionValue(steps, stepAtPosition); |
76 } | 76 } |
77 | 77 |
78 int numberOfSteps() const { return m_steps; } | 78 int numberOfSteps() const { return m_steps; } |
79 StepsTimingFunction::StepAtPosition getStepAtPosition() const { return m_ste
pAtPosition; } | 79 StepsTimingFunction::StepAtPosition getStepAtPosition() const { return m_ste
pAtPosition; } |
80 | 80 |
81 String customCSSText() const; | 81 String customCSSText() const; |
82 | 82 |
83 bool equals(const CSSStepsTimingFunctionValue&) const; | 83 bool equals(const CSSStepsTimingFunctionValue&) const; |
(...skipping 10 matching lines...) Expand all Loading... |
94 | 94 |
95 int m_steps; | 95 int m_steps; |
96 StepsTimingFunction::StepAtPosition m_stepAtPosition; | 96 StepsTimingFunction::StepAtPosition m_stepAtPosition; |
97 }; | 97 }; |
98 | 98 |
99 DEFINE_CSS_VALUE_TYPE_CASTS(CSSStepsTimingFunctionValue, isStepsTimingFunctionVa
lue()); | 99 DEFINE_CSS_VALUE_TYPE_CASTS(CSSStepsTimingFunctionValue, isStepsTimingFunctionVa
lue()); |
100 | 100 |
101 } // namespace blink | 101 } // namespace blink |
102 | 102 |
103 #endif | 103 #endif |
OLD | NEW |