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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 void RenderSVGResourceFilterPrimitive::styleDidChange(StyleDifference diff, cons
t RenderStyle* oldStyle) | 34 void RenderSVGResourceFilterPrimitive::styleDidChange(StyleDifference diff, cons
t RenderStyle* oldStyle) |
35 { | 35 { |
36 RenderSVGHiddenContainer::styleDidChange(diff, oldStyle); | 36 RenderSVGHiddenContainer::styleDidChange(diff, oldStyle); |
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.hasNoChange() || !oldStyle) | 43 if (!diff.hasDifference() || !oldStyle) |
44 return; | 44 return; |
45 | 45 |
46 const SVGRenderStyle* newStyle = this->style()->svgStyle(); | 46 const SVGRenderStyle* newStyle = this->style()->svgStyle(); |
47 ASSERT(element()); | 47 ASSERT(element()); |
48 if (isSVGFEFloodElement(*element())) { | 48 if (isSVGFEFloodElement(*element())) { |
49 if (newStyle->floodColor() != oldStyle->svgStyle()->floodColor()) | 49 if (newStyle->floodColor() != oldStyle->svgStyle()->floodColor()) |
50 toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, S
VGNames::flood_colorAttr); | 50 toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, S
VGNames::flood_colorAttr); |
51 if (newStyle->floodOpacity() != oldStyle->svgStyle()->floodOpacity()) | 51 if (newStyle->floodOpacity() != oldStyle->svgStyle()->floodOpacity()) |
52 toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, S
VGNames::flood_opacityAttr); | 52 toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, S
VGNames::flood_opacityAttr); |
53 } else if (isSVGFEDiffuseLightingElement(*element()) || isSVGFESpecularLight
ingElement(*element())) { | 53 } else if (isSVGFEDiffuseLightingElement(*element()) || isSVGFESpecularLight
ingElement(*element())) { |
54 if (newStyle->lightingColor() != oldStyle->svgStyle()->lightingColor()) | 54 if (newStyle->lightingColor() != oldStyle->svgStyle()->lightingColor()) |
55 toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, S
VGNames::lighting_colorAttr); | 55 toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, S
VGNames::lighting_colorAttr); |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 } // namespace WebCore | 59 } // namespace WebCore |
OLD | NEW |