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

Unified Diff: Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.cpp

Issue 191003007: Use isSVG*Element() helpers more in SVG code (Part 3) (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
Index: Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.cpp
diff --git a/Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.cpp b/Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.cpp
index e34449d35eaaedcb4080832d671d31327d580323..f7073cad183dd354a8077c338373e2c6d7f99e10 100644
--- a/Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.cpp
@@ -44,12 +44,13 @@ void RenderSVGResourceFilterPrimitive::styleDidChange(StyleDifference diff, cons
return;
const SVGRenderStyle* newStyle = this->style()->svgStyle();
- if (element()->hasTagName(SVGNames::feFloodTag)) {
+ ASSERT(element());
+ if (isSVGFEFloodElement(*element())) {
if (newStyle->floodColor() != oldStyle->svgStyle()->floodColor())
toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, SVGNames::flood_colorAttr);
if (newStyle->floodOpacity() != oldStyle->svgStyle()->floodOpacity())
toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, SVGNames::flood_opacityAttr);
- } else if (element()->hasTagName(SVGNames::feDiffuseLightingTag) || element()->hasTagName(SVGNames::feSpecularLightingTag)) {
+ } else if (isSVGFEDiffuseLightingElement(*element()) || isSVGFESpecularLightingElement(*element())) {
if (newStyle->lightingColor() != oldStyle->svgStyle()->lightingColor())
toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, SVGNames::lighting_colorAttr);
}
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceFilter.cpp ('k') | Source/core/rendering/svg/RenderSVGResourceMasker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698