OLD | NEW |
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 Loading... |
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 |
OLD | NEW |