#ifndef CSSToStyleMap_h
#define CSSToStyleMap_h
#include "CSSPropertyNames.h"
#include "core/css/resolver/ElementStyleResources.h"
#include "platform/animation/TimingFunction.h"
#include "wtf/Noncopyable.h"
namespace WebCore {
class FillLayer;
class CSSAnimationData;
class CSSToLengthConversionData;
class CSSValue;
class RenderStyle;
class StyleImage;
class StyleResolverState;
class NinePieceImage;
class BorderImageLengthBox;
class CSSToStyleMap {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(CSSToStyleMap);
public:
CSSToStyleMap(const StyleResolverState& state, ElementStyleResources& elementStyleResources) : m_state(state), m_elementStyleResources(elementStyleResources) { }
void mapFillAttachment(CSSPropertyID, FillLayer*, CSSValue*) const;
void mapFillClip(CSSPropertyID, FillLayer*, CSSValue*) const;
void mapFillComposite(CSSPropertyID, FillLayer*, CSSValue*) const;
void mapFillBlendMode(CSSPropertyID, FillLayer*, CSSValue*) const;
void mapFillOrigin(CSSPropertyID, FillLayer*, CSSValue*) const;
void mapFillImage(CSSPropertyID, FillLayer*, CSSValue*);
void mapFillRepeatX(CSSPropertyID, FillLayer*, CSSValue*) const;
void mapFillRepeatY(CSSPropertyID, FillLayer*, CSSValue*) const;
void mapFillSize(CSSPropertyID, FillLayer*, CSSValue*) const;
void mapFillXPosition(CSSPropertyID, FillLayer*, CSSValue*) const;
void mapFillYPosition(CSSPropertyID, FillLayer*, CSSValue*) const;
void mapFillMaskSourceType(CSSPropertyID, FillLayer*, CSSValue*);
void mapAnimationDelay(CSSAnimationData*, CSSValue*) const;
void mapAnimationDirection(CSSAnimationData*, CSSValue*) const;
void mapAnimationDuration(CSSAnimationData*, CSSValue*) const;
void mapAnimationFillMode(CSSAnimationData*, CSSValue*) const;
void mapAnimationIterationCount(CSSAnimationData*, CSSValue*) const;
void mapAnimationName(CSSAnimationData*, CSSValue*) const;
void mapAnimationPlayState(CSSAnimationData*, CSSValue*) const;
void mapAnimationProperty(CSSAnimationData*, CSSValue*) const;
static PassRefPtr<TimingFunction> animationTimingFunction(CSSValue*, bool allowInitial);
void mapAnimationTimingFunction(CSSAnimationData*, CSSValue*) const;
void mapNinePieceImage(RenderStyle* mutableStyle, CSSPropertyID, CSSValue*, NinePieceImage&);
void mapNinePieceImageSlice(CSSValue*, NinePieceImage&) const;
BorderImageLengthBox mapNinePieceImageQuad(CSSValue*) const;
void mapNinePieceImageRepeat(CSSValue*, NinePieceImage&) const;
private:
const CSSToLengthConversionData& cssToLengthConversionData() const;
bool useSVGZoomRules() const;
PassRefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue*);
const StyleResolverState& m_state;
ElementStyleResources& m_elementStyleResources;
};
}
#endif