diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/css/CSSToStyleMap.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/css/CSSToStyleMap.h')
-rw-r--r-- | Source/WebCore/css/CSSToStyleMap.h | 74 |
1 files changed, 38 insertions, 36 deletions
diff --git a/Source/WebCore/css/CSSToStyleMap.h b/Source/WebCore/css/CSSToStyleMap.h index cf50c8594..31bb0b938 100644 --- a/Source/WebCore/css/CSSToStyleMap.h +++ b/Source/WebCore/css/CSSToStyleMap.h @@ -19,73 +19,75 @@ * Boston, MA 02110-1301, USA. */ -#ifndef CSSToStyleMap_h -#define CSSToStyleMap_h +#pragma once #include "CSSPropertyNames.h" -#include "LengthBox.h" +#include <wtf/FastMalloc.h> +#include <wtf/Noncopyable.h> namespace WebCore { -class FillLayer; -class CSSValue; class Animation; +class CSSValue; +class FillLayer; +class LengthBox; +class NinePieceImage; class RenderStyle; class StyleImage; class StyleResolver; -class NinePieceImage; class CSSToStyleMap { WTF_MAKE_NONCOPYABLE(CSSToStyleMap); WTF_MAKE_FAST_ALLOCATED; public: - CSSToStyleMap(StyleResolver* resolver) : m_resolver(resolver) { } + CSSToStyleMap(StyleResolver*); - void mapFillAttachment(CSSPropertyID, FillLayer*, CSSValue*); - void mapFillClip(CSSPropertyID, FillLayer*, CSSValue*); - void mapFillComposite(CSSPropertyID, FillLayer*, CSSValue*); - void mapFillBlendMode(CSSPropertyID, FillLayer*, CSSValue*); - void mapFillOrigin(CSSPropertyID, FillLayer*, CSSValue*); - void mapFillImage(CSSPropertyID, FillLayer*, CSSValue*); - void mapFillRepeatX(CSSPropertyID, FillLayer*, CSSValue*); - void mapFillRepeatY(CSSPropertyID, FillLayer*, CSSValue*); - void mapFillSize(CSSPropertyID, FillLayer*, CSSValue*); - void mapFillXPosition(CSSPropertyID, FillLayer*, CSSValue*); - void mapFillYPosition(CSSPropertyID, FillLayer*, CSSValue*); - void mapFillMaskSourceType(CSSPropertyID, FillLayer*, CSSValue*); + void mapFillAttachment(CSSPropertyID, FillLayer&, const CSSValue&); + void mapFillClip(CSSPropertyID, FillLayer&, const CSSValue&); + void mapFillComposite(CSSPropertyID, FillLayer&, const CSSValue&); + void mapFillBlendMode(CSSPropertyID, FillLayer&, const CSSValue&); + void mapFillOrigin(CSSPropertyID, FillLayer&, const CSSValue&); + void mapFillImage(CSSPropertyID, FillLayer&, CSSValue&); + void mapFillRepeatX(CSSPropertyID, FillLayer&, const CSSValue&); + void mapFillRepeatY(CSSPropertyID, FillLayer&, const CSSValue&); + void mapFillSize(CSSPropertyID, FillLayer&, const CSSValue&); + void mapFillXPosition(CSSPropertyID, FillLayer&, const CSSValue&); + void mapFillYPosition(CSSPropertyID, FillLayer&, const CSSValue&); + void mapFillMaskSourceType(CSSPropertyID, FillLayer&, const CSSValue&); - void mapAnimationDelay(Animation*, CSSValue*); - void mapAnimationDirection(Animation*, CSSValue*); - void mapAnimationDuration(Animation*, CSSValue*); - void mapAnimationFillMode(Animation*, CSSValue*); - void mapAnimationIterationCount(Animation*, CSSValue*); - void mapAnimationName(Animation*, CSSValue*); - void mapAnimationPlayState(Animation*, CSSValue*); - void mapAnimationProperty(Animation*, CSSValue*); - void mapAnimationTimingFunction(Animation*, CSSValue*); + void mapAnimationDelay(Animation&, const CSSValue&); + void mapAnimationDirection(Animation&, const CSSValue&); + void mapAnimationDuration(Animation&, const CSSValue&); + void mapAnimationFillMode(Animation&, const CSSValue&); + void mapAnimationIterationCount(Animation&, const CSSValue&); + void mapAnimationName(Animation&, const CSSValue&); + void mapAnimationPlayState(Animation&, const CSSValue&); + void mapAnimationProperty(Animation&, const CSSValue&); + void mapAnimationTimingFunction(Animation&, const CSSValue&); +#if ENABLE(CSS_ANIMATIONS_LEVEL_2) + void mapAnimationTrigger(Animation&, const CSSValue&); +#endif void mapNinePieceImage(CSSPropertyID, CSSValue*, NinePieceImage&); - void mapNinePieceImageSlice(CSSValue*, NinePieceImage&); - LengthBox mapNinePieceImageQuad(CSSValue*); - void mapNinePieceImageRepeat(CSSValue*, NinePieceImage&); + void mapNinePieceImageSlice(CSSValue&, NinePieceImage&); + LengthBox mapNinePieceImageQuad(CSSValue&); + void mapNinePieceImageRepeat(CSSValue&, NinePieceImage&); private: // FIXME: These accessors should be replaced by a ResolveState object // similar to how PaintInfo/LayoutState cache values needed for // the current paint/layout. RenderStyle* style() const; - RenderStyle* rootElementStyle() const; + const RenderStyle* rootElementStyle() const; bool useSVGZoomRules() const; // FIXME: This should be part of some sort of StyleImageCache object which // is held by the StyleResolver, and likely provided to this object // during the resolve. - PassRefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue*); + RefPtr<StyleImage> styleImage(CSSValue&); StyleResolver* m_resolver; }; -} - -#endif +} // namespace WebCore |