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

Unified Diff: Source/core/svg/SVGFEMergeElement.cpp

Issue 191963002: Use new Traversal<SVG*Element> API more in SVG code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/SVGFELightElement.h ('k') | Source/core/svg/SVGGradientElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGFEMergeElement.cpp
diff --git a/Source/core/svg/SVGFEMergeElement.cpp b/Source/core/svg/SVGFEMergeElement.cpp
index 3cf645a8edc3971dca126e8a941a1baf82faad88..36ea949ea686bec3acbc1f957786c875e8fc4a1c 100644
--- a/Source/core/svg/SVGFEMergeElement.cpp
+++ b/Source/core/svg/SVGFEMergeElement.cpp
@@ -44,13 +44,11 @@ PassRefPtr<FilterEffect> SVGFEMergeElement::build(SVGFilterBuilder* filterBuilde
{
RefPtr<FilterEffect> effect = FEMerge::create(filter);
FilterEffectVector& mergeInputs = effect->inputEffects();
- for (Element* element = ElementTraversal::firstWithin(*this); element; element = ElementTraversal::nextSibling(*element)) {
- if (element->hasTagName(SVGNames::feMergeNodeTag)) {
- FilterEffect* mergeEffect = filterBuilder->getEffectById(AtomicString(toSVGFEMergeNodeElement(element)->in1()->currentValue()->value()));
- if (!mergeEffect)
- return nullptr;
- mergeInputs.append(mergeEffect);
- }
+ for (SVGFEMergeNodeElement* element = Traversal<SVGFEMergeNodeElement>::firstChild(*this); element; element = Traversal<SVGFEMergeNodeElement>::nextSibling(*element)) {
+ FilterEffect* mergeEffect = filterBuilder->getEffectById(AtomicString(element->in1()->currentValue()->value()));
+ if (!mergeEffect)
+ return nullptr;
+ mergeInputs.append(mergeEffect);
}
if (mergeInputs.isEmpty())
« no previous file with comments | « Source/core/svg/SVGFELightElement.h ('k') | Source/core/svg/SVGGradientElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698