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

Side by Side Diff: Source/core/svg/SVGFECompositeElement.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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 return; 122 return;
123 } 123 }
124 124
125 ASSERT_NOT_REACHED(); 125 ASSERT_NOT_REACHED();
126 } 126 }
127 127
128 bool SVGFECompositeElement::setFilterEffectAttribute(FilterEffect* effect, const QualifiedName& attrName) 128 bool SVGFECompositeElement::setFilterEffectAttribute(FilterEffect* effect, const QualifiedName& attrName)
129 { 129 {
130 FEComposite* composite = static_cast<FEComposite*>(effect); 130 FEComposite* composite = static_cast<FEComposite*>(effect);
131 if (attrName == SVGNames::operatorAttr) 131 if (attrName == SVGNames::operatorAttr)
132 return composite->setOperation(_operator()); 132 return composite->setOperation(_operatorCurrentValue());
133 if (attrName == SVGNames::k1Attr) 133 if (attrName == SVGNames::k1Attr)
134 return composite->setK1(k1()); 134 return composite->setK1(k1CurrentValue());
135 if (attrName == SVGNames::k2Attr) 135 if (attrName == SVGNames::k2Attr)
136 return composite->setK2(k2()); 136 return composite->setK2(k2CurrentValue());
137 if (attrName == SVGNames::k3Attr) 137 if (attrName == SVGNames::k3Attr)
138 return composite->setK3(k3()); 138 return composite->setK3(k3CurrentValue());
139 if (attrName == SVGNames::k4Attr) 139 if (attrName == SVGNames::k4Attr)
140 return composite->setK4(k4()); 140 return composite->setK4(k4CurrentValue());
141 141
142 ASSERT_NOT_REACHED(); 142 ASSERT_NOT_REACHED();
143 return false; 143 return false;
144 } 144 }
145 145
146 146
147 void SVGFECompositeElement::svgAttributeChanged(const QualifiedName& attrName) 147 void SVGFECompositeElement::svgAttributeChanged(const QualifiedName& attrName)
148 { 148 {
149 if (!isSupportedAttribute(attrName)) { 149 if (!isSupportedAttribute(attrName)) {
150 SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName); 150 SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
(...skipping 14 matching lines...) Expand all
165 if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr) { 165 if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr) {
166 invalidate(); 166 invalidate();
167 return; 167 return;
168 } 168 }
169 169
170 ASSERT_NOT_REACHED(); 170 ASSERT_NOT_REACHED();
171 } 171 }
172 172
173 PassRefPtr<FilterEffect> SVGFECompositeElement::build(SVGFilterBuilder* filterBu ilder, Filter* filter) 173 PassRefPtr<FilterEffect> SVGFECompositeElement::build(SVGFilterBuilder* filterBu ilder, Filter* filter)
174 { 174 {
175 FilterEffect* input1 = filterBuilder->getEffectById(in1()); 175 FilterEffect* input1 = filterBuilder->getEffectById(in1CurrentValue());
176 FilterEffect* input2 = filterBuilder->getEffectById(in2()); 176 FilterEffect* input2 = filterBuilder->getEffectById(in2CurrentValue());
177 177
178 if (!input1 || !input2) 178 if (!input1 || !input2)
179 return 0; 179 return 0;
180 180
181 RefPtr<FilterEffect> effect = FEComposite::create(filter, _operator(), k1(), k2(), k3(), k4()); 181 RefPtr<FilterEffect> effect = FEComposite::create(filter, _operatorCurrentVa lue(), k1CurrentValue(), k2CurrentValue(), k3CurrentValue(), k4CurrentValue());
182 FilterEffectVector& inputEffects = effect->inputEffects(); 182 FilterEffectVector& inputEffects = effect->inputEffects();
183 inputEffects.reserveCapacity(2); 183 inputEffects.reserveCapacity(2);
184 inputEffects.append(input1); 184 inputEffects.append(input1);
185 inputEffects.append(input2); 185 inputEffects.append(input2);
186 return effect.release(); 186 return effect.release();
187 } 187 }
188 188
189 } 189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698