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

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

Issue 2617783002: Migrate WTF::Vector::append() to ::push_back() [part 12 of N] (Closed)
Patch Set: rebase Created 3 years, 11 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
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 11 matching lines...) Expand all
22 #include "core/SVGNames.h" 22 #include "core/SVGNames.h"
23 #include "core/svg/graphics/filters/SVGFilterBuilder.h" 23 #include "core/svg/graphics/filters/SVGFilterBuilder.h"
24 24
25 namespace blink { 25 namespace blink {
26 26
27 template <> 27 template <>
28 const SVGEnumerationStringEntries& 28 const SVGEnumerationStringEntries&
29 getStaticStringEntries<MorphologyOperatorType>() { 29 getStaticStringEntries<MorphologyOperatorType>() {
30 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); 30 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ());
31 if (entries.isEmpty()) { 31 if (entries.isEmpty()) {
32 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_ERODE, "erode")); 32 entries.push_back(std::make_pair(FEMORPHOLOGY_OPERATOR_ERODE, "erode"));
33 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_DILATE, "dilate")); 33 entries.push_back(std::make_pair(FEMORPHOLOGY_OPERATOR_DILATE, "dilate"));
34 } 34 }
35 return entries; 35 return entries;
36 } 36 }
37 37
38 inline SVGFEMorphologyElement::SVGFEMorphologyElement(Document& document) 38 inline SVGFEMorphologyElement::SVGFEMorphologyElement(Document& document)
39 : SVGFilterPrimitiveStandardAttributes(SVGNames::feMorphologyTag, document), 39 : SVGFilterPrimitiveStandardAttributes(SVGNames::feMorphologyTag, document),
40 m_radius( 40 m_radius(
41 SVGAnimatedNumberOptionalNumber::create(this, SVGNames::radiusAttr)), 41 SVGAnimatedNumberOptionalNumber::create(this, SVGNames::radiusAttr)),
42 m_in1(SVGAnimatedString::create(this, SVGNames::inAttr)), 42 m_in1(SVGAnimatedString::create(this, SVGNames::inAttr)),
43 m_svgOperator(SVGAnimatedEnumeration<MorphologyOperatorType>::create( 43 m_svgOperator(SVGAnimatedEnumeration<MorphologyOperatorType>::create(
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 // "A negative or zero value disables the effect of the given filter 105 // "A negative or zero value disables the effect of the given filter
106 // primitive (i.e., the result is the filter input image)." 106 // primitive (i.e., the result is the filter input image)."
107 // https://drafts.fxtf.org/filters/#element-attrdef-femorphology-radius 107 // https://drafts.fxtf.org/filters/#element-attrdef-femorphology-radius
108 // 108 //
109 // (This is handled by FEMorphology) 109 // (This is handled by FEMorphology)
110 float xRadius = radiusX()->currentValue()->value(); 110 float xRadius = radiusX()->currentValue()->value();
111 float yRadius = radiusY()->currentValue()->value(); 111 float yRadius = radiusY()->currentValue()->value();
112 FilterEffect* effect = FEMorphology::create( 112 FilterEffect* effect = FEMorphology::create(
113 filter, m_svgOperator->currentValue()->enumValue(), xRadius, yRadius); 113 filter, m_svgOperator->currentValue()->enumValue(), xRadius, yRadius);
114 effect->inputEffects().append(input1); 114 effect->inputEffects().push_back(input1);
115 return effect; 115 return effect;
116 } 116 }
117 117
118 } // namespace blink 118 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGFEMergeElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGFEOffsetElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698