diff options
Diffstat (limited to 'Source/WebCore/svg/SVGFECompositeElement.h')
-rw-r--r-- | Source/WebCore/svg/SVGFECompositeElement.h | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/Source/WebCore/svg/SVGFECompositeElement.h b/Source/WebCore/svg/SVGFECompositeElement.h index f43dbd44e..ed08f0f33 100644 --- a/Source/WebCore/svg/SVGFECompositeElement.h +++ b/Source/WebCore/svg/SVGFECompositeElement.h @@ -18,10 +18,8 @@ * Boston, MA 02110-1301, USA. */ -#ifndef SVGFECompositeElement_h -#define SVGFECompositeElement_h +#pragma once -#if ENABLE(SVG) && ENABLE(FILTERS) #include "FEComposite.h" #include "SVGAnimatedEnumeration.h" #include "SVGAnimatedNumber.h" @@ -30,8 +28,11 @@ namespace WebCore { template<> +inline unsigned SVGIDLEnumLimits<CompositeOperationType>::highestExposedEnumValue() { return FECOMPOSITE_OPERATOR_ARITHMETIC; } + +template<> struct SVGPropertyTraits<CompositeOperationType> { - static unsigned highestEnumValue() { return FECOMPOSITE_OPERATOR_ARITHMETIC; } + static unsigned highestEnumValue() { return FECOMPOSITE_OPERATOR_LIGHTER; } static String toString(CompositeOperationType type) { @@ -39,17 +40,19 @@ struct SVGPropertyTraits<CompositeOperationType> { case FECOMPOSITE_OPERATOR_UNKNOWN: return emptyString(); case FECOMPOSITE_OPERATOR_OVER: - return "over"; + return ASCIILiteral("over"); case FECOMPOSITE_OPERATOR_IN: - return "in"; + return ASCIILiteral("in"); case FECOMPOSITE_OPERATOR_OUT: - return "out"; + return ASCIILiteral("out"); case FECOMPOSITE_OPERATOR_ATOP: - return "atop"; + return ASCIILiteral("atop"); case FECOMPOSITE_OPERATOR_XOR: - return "xor"; + return ASCIILiteral("xor"); case FECOMPOSITE_OPERATOR_ARITHMETIC: - return "arithmetic"; + return ASCIILiteral("arithmetic"); + case FECOMPOSITE_OPERATOR_LIGHTER: + return ASCIILiteral("lighter"); } ASSERT_NOT_REACHED(); @@ -70,22 +73,23 @@ struct SVGPropertyTraits<CompositeOperationType> { return FECOMPOSITE_OPERATOR_XOR; if (value == "arithmetic") return FECOMPOSITE_OPERATOR_ARITHMETIC; + if (value == "lighter") + return FECOMPOSITE_OPERATOR_LIGHTER; return FECOMPOSITE_OPERATOR_UNKNOWN; } }; class SVGFECompositeElement final : public SVGFilterPrimitiveStandardAttributes { public: - static PassRefPtr<SVGFECompositeElement> create(const QualifiedName&, Document&); + static Ref<SVGFECompositeElement> create(const QualifiedName&, Document&); private: SVGFECompositeElement(const QualifiedName&, Document&); - bool isSupportedAttribute(const QualifiedName&); - virtual void parseAttribute(const QualifiedName&, const AtomicString&) override; - virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) override; - virtual void svgAttributeChanged(const QualifiedName&) override; - virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*) override; + void parseAttribute(const QualifiedName&, const AtomicString&) override; + bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) override; + void svgAttributeChanged(const QualifiedName&) override; + RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override; BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFECompositeElement) DECLARE_ANIMATED_STRING(In1, in1) @@ -99,6 +103,3 @@ private: }; } // namespace WebCore - -#endif // ENABLE(SVG) -#endif |