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

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

Issue 19097005: Remove one SVG animated type special case from the bindings generator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix the regressions Created 7 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 return; 127 return;
128 } 128 }
129 129
130 ASSERT_NOT_REACHED(); 130 ASSERT_NOT_REACHED();
131 } 131 }
132 132
133 bool SVGFETurbulenceElement::setFilterEffectAttribute(FilterEffect* effect, cons t QualifiedName& attrName) 133 bool SVGFETurbulenceElement::setFilterEffectAttribute(FilterEffect* effect, cons t QualifiedName& attrName)
134 { 134 {
135 FETurbulence* turbulence = static_cast<FETurbulence*>(effect); 135 FETurbulence* turbulence = static_cast<FETurbulence*>(effect);
136 if (attrName == SVGNames::typeAttr) 136 if (attrName == SVGNames::typeAttr)
137 return turbulence->setType(type()); 137 return turbulence->setType(typeCurrentValue());
138 if (attrName == SVGNames::stitchTilesAttr) 138 if (attrName == SVGNames::stitchTilesAttr)
139 return turbulence->setStitchTiles(stitchTiles()); 139 return turbulence->setStitchTiles(stitchTilesCurrentValue());
140 if (attrName == SVGNames::baseFrequencyAttr) { 140 if (attrName == SVGNames::baseFrequencyAttr) {
141 bool baseFrequencyXChanged = turbulence->setBaseFrequencyX(baseFrequency X()); 141 bool baseFrequencyXChanged = turbulence->setBaseFrequencyX(baseFrequency XCurrentValue());
142 bool baseFrequencyYChanged = turbulence->setBaseFrequencyY(baseFrequency Y()); 142 bool baseFrequencyYChanged = turbulence->setBaseFrequencyY(baseFrequency YCurrentValue());
143 return (baseFrequencyXChanged || baseFrequencyYChanged); 143 return (baseFrequencyXChanged || baseFrequencyYChanged);
144 } 144 }
145 if (attrName == SVGNames::seedAttr) 145 if (attrName == SVGNames::seedAttr)
146 return turbulence->setSeed(seed()); 146 return turbulence->setSeed(seedCurrentValue());
147 if (attrName == SVGNames::numOctavesAttr) 147 if (attrName == SVGNames::numOctavesAttr)
148 return turbulence->setNumOctaves(numOctaves()); 148 return turbulence->setNumOctaves(numOctavesCurrentValue());
149 149
150 ASSERT_NOT_REACHED(); 150 ASSERT_NOT_REACHED();
151 return false; 151 return false;
152 } 152 }
153 153
154 void SVGFETurbulenceElement::svgAttributeChanged(const QualifiedName& attrName) 154 void SVGFETurbulenceElement::svgAttributeChanged(const QualifiedName& attrName)
155 { 155 {
156 if (!isSupportedAttribute(attrName)) { 156 if (!isSupportedAttribute(attrName)) {
157 SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName); 157 SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
158 return; 158 return;
159 } 159 }
160 160
161 SVGElementInstance::InvalidationGuard invalidationGuard(this); 161 SVGElementInstance::InvalidationGuard invalidationGuard(this);
162 162
163 if (attrName == SVGNames::baseFrequencyAttr 163 if (attrName == SVGNames::baseFrequencyAttr
164 || attrName == SVGNames::numOctavesAttr 164 || attrName == SVGNames::numOctavesAttr
165 || attrName == SVGNames::seedAttr 165 || attrName == SVGNames::seedAttr
166 || attrName == SVGNames::stitchTilesAttr 166 || attrName == SVGNames::stitchTilesAttr
167 || attrName == SVGNames::typeAttr) { 167 || attrName == SVGNames::typeAttr) {
168 primitiveAttributeChanged(attrName); 168 primitiveAttributeChanged(attrName);
169 return; 169 return;
170 } 170 }
171 171
172 ASSERT_NOT_REACHED(); 172 ASSERT_NOT_REACHED();
173 } 173 }
174 174
175 PassRefPtr<FilterEffect> SVGFETurbulenceElement::build(SVGFilterBuilder*, Filter * filter) 175 PassRefPtr<FilterEffect> SVGFETurbulenceElement::build(SVGFilterBuilder*, Filter * filter)
176 { 176 {
177 if (baseFrequencyX() < 0 || baseFrequencyY() < 0) 177 if (baseFrequencyXCurrentValue() < 0 || baseFrequencyYCurrentValue() < 0)
178 return 0; 178 return 0;
179 return FETurbulence::create(filter, type(), baseFrequencyX(), baseFrequencyY (), numOctaves(), seed(), stitchTiles() == SVG_STITCHTYPE_STITCH); 179 return FETurbulence::create(filter, typeCurrentValue(), baseFrequencyXCurren tValue(), baseFrequencyYCurrentValue(), numOctavesCurrentValue(), seedCurrentVal ue(), stitchTilesCurrentValue() == SVG_STITCHTYPE_STITCH);
180 } 180 }
181 181
182 } 182 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698