summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.h')
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.h65
1 files changed, 17 insertions, 48 deletions
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.h b/chromium/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.h
index cb0c70733ce..356925b8d7d 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.h
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.h
@@ -27,65 +27,34 @@
namespace WebCore {
-template<>
-struct SVGPropertyTraits<ChannelSelectorType> {
- static unsigned highestEnumValue() { return CHANNEL_A; }
-
- static String toString(ChannelSelectorType type)
- {
- switch (type) {
- case CHANNEL_UNKNOWN:
- return emptyString();
- case CHANNEL_R:
- return "R";
- case CHANNEL_G:
- return "G";
- case CHANNEL_B:
- return "B";
- case CHANNEL_A:
- return "A";
- }
-
- ASSERT_NOT_REACHED();
- return emptyString();
- }
-
- static ChannelSelectorType fromString(const String& value)
- {
- if (value == "R")
- return CHANNEL_R;
- if (value == "G")
- return CHANNEL_G;
- if (value == "B")
- return CHANNEL_B;
- if (value == "A")
- return CHANNEL_A;
- return CHANNEL_UNKNOWN;
- }
-};
+template<> const SVGEnumerationStringEntries& getStaticStringEntries<ChannelSelectorType>();
class SVGFEDisplacementMapElement FINAL : public SVGFilterPrimitiveStandardAttributes {
public:
- static PassRefPtr<SVGFEDisplacementMapElement> create(Document&);
+ DECLARE_NODE_FACTORY(SVGFEDisplacementMapElement);
static ChannelSelectorType stringToChannel(const String&);
+ SVGAnimatedNumber* scale() { return m_scale.get(); }
+ SVGAnimatedString* in1() { return m_in1.get(); }
+ SVGAnimatedString* in2() { return m_in2.get(); }
+ SVGAnimatedEnumeration<ChannelSelectorType>* xChannelSelector() { return m_xChannelSelector.get(); }
+ SVGAnimatedEnumeration<ChannelSelectorType>* yChannelSelector() { return m_yChannelSelector.get(); }
+
private:
SVGFEDisplacementMapElement(Document&);
bool isSupportedAttribute(const QualifiedName&);
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
- virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& attrName);
- virtual void svgAttributeChanged(const QualifiedName&);
- virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*);
-
- BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEDisplacementMapElement)
- DECLARE_ANIMATED_STRING(In1, in1)
- DECLARE_ANIMATED_STRING(In2, in2)
- DECLARE_ANIMATED_ENUMERATION(XChannelSelector, xChannelSelector, ChannelSelectorType)
- DECLARE_ANIMATED_ENUMERATION(YChannelSelector, yChannelSelector, ChannelSelectorType)
- DECLARE_ANIMATED_NUMBER(Scale, scale)
- END_DECLARE_ANIMATED_PROPERTIES
+ virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& attrName) OVERRIDE;
+ virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
+ virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*) OVERRIDE;
+
+ RefPtr<SVGAnimatedNumber> m_scale;
+ RefPtr<SVGAnimatedString> m_in1;
+ RefPtr<SVGAnimatedString> m_in2;
+ RefPtr<SVGAnimatedEnumeration<ChannelSelectorType> > m_xChannelSelector;
+ RefPtr<SVGAnimatedEnumeration<ChannelSelectorType> > m_yChannelSelector;
};
} // namespace WebCore