|
Revision 1404, 2.5 kB
(checked in by gbertal, 6 months ago)
|
merge with webkit revision 55986
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
#ifndef TimingFunction_h |
|---|
| 26 |
#define TimingFunction_h |
|---|
| 27 |
|
|---|
| 28 |
#include "RenderStyleConstants.h" |
|---|
| 29 |
|
|---|
| 30 |
namespace WebCore { |
|---|
| 31 |
|
|---|
| 32 |
struct TimingFunction : FastAllocBase { |
|---|
| 33 |
TimingFunction() |
|---|
| 34 |
: m_type(CubicBezierTimingFunction) |
|---|
| 35 |
, m_x1(0.25) |
|---|
| 36 |
, m_y1(0.1) |
|---|
| 37 |
, m_x2(0.25) |
|---|
| 38 |
, m_y2(1.0) |
|---|
| 39 |
{ |
|---|
| 40 |
} |
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
TimingFunction(const TimingFunction& that) |
|---|
| 44 |
: m_type(that.m_type) |
|---|
| 45 |
, m_x1(that.m_x1) |
|---|
| 46 |
, m_y1(that.m_y1) |
|---|
| 47 |
, m_x2(that.m_x2) |
|---|
| 48 |
, m_y2(that.m_y2) |
|---|
| 49 |
{ |
|---|
| 50 |
} |
|---|
| 51 |
|
|---|
| 52 |
TimingFunction(ETimingFunctionType timingFunction, double x1 = 0.0, double y1 = 0.0, double x2 = 1.0, double y2 = 1.0) |
|---|
| 53 |
: m_type(timingFunction) |
|---|
| 54 |
, m_x1(x1) |
|---|
| 55 |
, m_y1(y1) |
|---|
| 56 |
, m_x2(x2) |
|---|
| 57 |
, m_y2(y2) |
|---|
| 58 |
{ |
|---|
| 59 |
} |
|---|
| 60 |
|
|---|
| 61 |
bool operator==(const TimingFunction& o) const |
|---|
| 62 |
{ |
|---|
| 63 |
return m_type == o.m_type && m_x1 == o.m_x1 && m_y1 == o.m_y1 && m_x2 == o.m_x2 && m_y2 == o.m_y2; |
|---|
| 64 |
} |
|---|
| 65 |
|
|---|
| 66 |
double x1() const { return m_x1; } |
|---|
| 67 |
double y1() const { return m_y1; } |
|---|
| 68 |
double x2() const { return m_x2; } |
|---|
| 69 |
double y2() const { return m_y2; } |
|---|
| 70 |
|
|---|
| 71 |
ETimingFunctionType type() const { return m_type; } |
|---|
| 72 |
|
|---|
| 73 |
private: |
|---|
| 74 |
ETimingFunctionType m_type; |
|---|
| 75 |
|
|---|
| 76 |
double m_x1; |
|---|
| 77 |
double m_y1; |
|---|
| 78 |
double m_x2; |
|---|
| 79 |
double m_y2; |
|---|
| 80 |
}; |
|---|
| 81 |
|
|---|
| 82 |
} |
|---|
| 83 |
|
|---|
| 84 |
#endif |
|---|
| 85 |
|
|---|