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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 University of Szeged 2 * Copyright (C) 2010 University of Szeged
3 * Copyright (C) 2010 Zoltan Herczeg 3 * Copyright (C) 2010 Zoltan Herczeg
4 * Copyright (C) 2011 Renata Hodovan (reni@webkit.org) 4 * Copyright (C) 2011 Renata Hodovan (reni@webkit.org)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 26 matching lines...) Expand all
37 37
38 RenderObject* filter = parent(); 38 RenderObject* filter = parent();
39 if (!filter) 39 if (!filter)
40 return; 40 return;
41 ASSERT(filter->isSVGResourceFilter()); 41 ASSERT(filter->isSVGResourceFilter());
42 42
43 if (diff == StyleDifferenceEqual || !oldStyle) 43 if (diff == StyleDifferenceEqual || !oldStyle)
44 return; 44 return;
45 45
46 const SVGRenderStyle* newStyle = this->style()->svgStyle(); 46 const SVGRenderStyle* newStyle = this->style()->svgStyle();
47 if (element()->hasTagName(SVGNames::feFloodTag)) { 47 ASSERT(element());
48 if (isSVGFEFloodElement(*element())) {
48 if (newStyle->floodColor() != oldStyle->svgStyle()->floodColor()) 49 if (newStyle->floodColor() != oldStyle->svgStyle()->floodColor())
49 toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, S VGNames::flood_colorAttr); 50 toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, S VGNames::flood_colorAttr);
50 if (newStyle->floodOpacity() != oldStyle->svgStyle()->floodOpacity()) 51 if (newStyle->floodOpacity() != oldStyle->svgStyle()->floodOpacity())
51 toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, S VGNames::flood_opacityAttr); 52 toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, S VGNames::flood_opacityAttr);
52 } else if (element()->hasTagName(SVGNames::feDiffuseLightingTag) || element( )->hasTagName(SVGNames::feSpecularLightingTag)) { 53 } else if (isSVGFEDiffuseLightingElement(*element()) || isSVGFESpecularLight ingElement(*element())) {
53 if (newStyle->lightingColor() != oldStyle->svgStyle()->lightingColor()) 54 if (newStyle->lightingColor() != oldStyle->svgStyle()->lightingColor())
54 toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, S VGNames::lighting_colorAttr); 55 toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, S VGNames::lighting_colorAttr);
55 } 56 }
56 } 57 }
57 58
58 } // namespace WebCore 59 } // namespace WebCore
OLDNEW
« 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