WebKitCSSTransformValue.h [plain text]
#ifndef WebKitCSSTransformValue_h
#define WebKitCSSTransformValue_h
#include "CSSValueList.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
namespace WebCore {
class WebKitCSSTransformValue : public CSSValueList {
public:
enum TransformOperationType {
UnknownTransformOperation,
TranslateTransformOperation,
TranslateXTransformOperation,
TranslateYTransformOperation,
RotateTransformOperation,
ScaleTransformOperation,
ScaleXTransformOperation,
ScaleYTransformOperation,
SkewTransformOperation,
SkewXTransformOperation,
SkewYTransformOperation,
MatrixTransformOperation,
TranslateZTransformOperation,
Translate3DTransformOperation,
RotateXTransformOperation,
RotateYTransformOperation,
RotateZTransformOperation,
Rotate3DTransformOperation,
ScaleZTransformOperation,
Scale3DTransformOperation,
PerspectiveTransformOperation,
Matrix3DTransformOperation
};
static PassRef<WebKitCSSTransformValue> create(TransformOperationType type)
{
return adoptRef(*new WebKitCSSTransformValue(type));
}
String customCSSText() const;
bool equals(const WebKitCSSTransformValue& other) const { return m_type == other.m_type && CSSValueList::equals(other); }
TransformOperationType operationType() const { return m_type; }
PassRefPtr<WebKitCSSTransformValue> cloneForCSSOM() const;
private:
WebKitCSSTransformValue(TransformOperationType);
WebKitCSSTransformValue(const WebKitCSSTransformValue& cloneFrom);
TransformOperationType m_type;
};
inline WebKitCSSTransformValue* toWebKitCSSTransformValue(CSSValue* value)
{
ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isWebKitCSSTransformValue());
return static_cast<WebKitCSSTransformValue*>(value);
}
inline const WebKitCSSTransformValue* toWebKitCSSTransformValue(const CSSValue* value)
{
ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isWebKitCSSTransformValue());
return static_cast<const WebKitCSSTransformValue*>(value);
}
}
#endif