CSSTimingFunctionValue.h [plain text]
#ifndef CSSTimingFunctionValue_h
#define CSSTimingFunctionValue_h
#include "CSSValue.h"
#include <wtf/PassRefPtr.h>
namespace WebCore {
class CSSCubicBezierTimingFunctionValue : public CSSValue {
public:
static Ref<CSSCubicBezierTimingFunctionValue> create(double x1, double y1, double x2, double y2)
{
return adoptRef(*new CSSCubicBezierTimingFunctionValue(x1, y1, x2, y2));
}
String customCSSText() const;
double x1() const { return m_x1; }
double y1() const { return m_y1; }
double x2() const { return m_x2; }
double y2() const { return m_y2; }
bool equals(const CSSCubicBezierTimingFunctionValue&) const;
private:
CSSCubicBezierTimingFunctionValue(double x1, double y1, double x2, double y2)
: CSSValue(CubicBezierTimingFunctionClass)
, m_x1(x1)
, m_y1(y1)
, m_x2(x2)
, m_y2(y2)
{
}
double m_x1;
double m_y1;
double m_x2;
double m_y2;
};
class CSSStepsTimingFunctionValue : public CSSValue {
public:
static Ref<CSSStepsTimingFunctionValue> create(int steps, bool stepAtStart)
{
return adoptRef(*new CSSStepsTimingFunctionValue(steps, stepAtStart));
}
int numberOfSteps() const { return m_steps; }
bool stepAtStart() const { return m_stepAtStart; }
String customCSSText() const;
bool equals(const CSSStepsTimingFunctionValue&) const;
private:
CSSStepsTimingFunctionValue(int steps, bool stepAtStart)
: CSSValue(StepsTimingFunctionClass)
, m_steps(steps)
, m_stepAtStart(stepAtStart)
{
}
int m_steps;
bool m_stepAtStart;
};
}
SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSCubicBezierTimingFunctionValue, isCubicBezierTimingFunctionValue())
SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSStepsTimingFunctionValue, isStepsTimingFunctionValue())
#endif // CSSTimingFunctionValue_h