Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: Source/core/svg/SVGFEMorphologyElement.cpp

Issue 177703004: [SVG] Remove SVGAnimatedPropertyMacros.h (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove ws Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGFEMorphologyElement.h ('k') | Source/core/svg/SVGFEOffsetElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 22 matching lines...) Expand all
33 { 33 {
34 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); 34 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ());
35 if (entries.isEmpty()) { 35 if (entries.isEmpty()) {
36 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_UNKNOWN, emptyString ())); 36 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_UNKNOWN, emptyString ()));
37 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_ERODE, "erode")); 37 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_ERODE, "erode"));
38 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_DILATE, "dilate")); 38 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_DILATE, "dilate"));
39 } 39 }
40 return entries; 40 return entries;
41 } 41 }
42 42
43 // Animated property definitions
44
45 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEMorphologyElement)
46 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
47 END_REGISTER_ANIMATED_PROPERTIES
48
49 inline SVGFEMorphologyElement::SVGFEMorphologyElement(Document& document) 43 inline SVGFEMorphologyElement::SVGFEMorphologyElement(Document& document)
50 : SVGFilterPrimitiveStandardAttributes(SVGNames::feMorphologyTag, document) 44 : SVGFilterPrimitiveStandardAttributes(SVGNames::feMorphologyTag, document)
51 , m_radius(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::radiusAtt r)) 45 , m_radius(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::radiusAtt r))
52 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create( ))) 46 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create( )))
53 , m_svgOperator(SVGAnimatedEnumeration<MorphologyOperatorType>::create(this, SVGNames::operatorAttr, FEMORPHOLOGY_OPERATOR_ERODE)) 47 , m_svgOperator(SVGAnimatedEnumeration<MorphologyOperatorType>::create(this, SVGNames::operatorAttr, FEMORPHOLOGY_OPERATOR_ERODE))
54 { 48 {
55 ScriptWrappable::init(this); 49 ScriptWrappable::init(this);
56 50
57 addToPropertyMap(m_radius); 51 addToPropertyMap(m_radius);
58 addToPropertyMap(m_in1); 52 addToPropertyMap(m_in1);
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 146
153 if (xRadius < 0 || yRadius < 0) 147 if (xRadius < 0 || yRadius < 0)
154 return nullptr; 148 return nullptr;
155 149
156 RefPtr<FilterEffect> effect = FEMorphology::create(filter, m_svgOperator->cu rrentValue()->enumValue(), xRadius, yRadius); 150 RefPtr<FilterEffect> effect = FEMorphology::create(filter, m_svgOperator->cu rrentValue()->enumValue(), xRadius, yRadius);
157 effect->inputEffects().append(input1); 151 effect->inputEffects().append(input1);
158 return effect.release(); 152 return effect.release();
159 } 153 }
160 154
161 } // namespace WebCore 155 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFEMorphologyElement.h ('k') | Source/core/svg/SVGFEOffsetElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698