| 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 13 matching lines...) Expand all Loading... |
| 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #include "config.h" | 28 #include "config.h" |
| 29 | 29 |
| 30 #include "core/layout/svg/LayoutSVGResourceFilterPrimitive.h" | 30 #include "core/layout/svg/LayoutSVGResourceFilterPrimitive.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 void LayoutSVGResourceFilterPrimitive::styleDidChange(StyleDifference diff, cons
t LayoutStyle* oldStyle) | 34 void LayoutSVGResourceFilterPrimitive::styleDidChange(StyleDifference diff, cons
t ComputedStyle* oldStyle) |
| 35 { | 35 { |
| 36 LayoutSVGHiddenContainer::styleDidChange(diff, oldStyle); | 36 LayoutSVGHiddenContainer::styleDidChange(diff, oldStyle); |
| 37 | 37 |
| 38 LayoutObject* filter = parent(); | 38 LayoutObject* filter = parent(); |
| 39 if (!filter) | 39 if (!filter) |
| 40 return; | 40 return; |
| 41 ASSERT(filter->isSVGResourceFilter()); | 41 ASSERT(filter->isSVGResourceFilter()); |
| 42 | 42 |
| 43 if (!oldStyle) | 43 if (!oldStyle) |
| 44 return; | 44 return; |
| 45 | 45 |
| 46 const SVGLayoutStyle& newStyle = this->style()->svgStyle(); | 46 const SVGComputedStyle& 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 toLayoutSVGResourceFilter(filter)->primitiveAttributeChanged(this, S
VGNames::flood_colorAttr); | 50 toLayoutSVGResourceFilter(filter)->primitiveAttributeChanged(this, S
VGNames::flood_colorAttr); |
| 51 if (newStyle.floodOpacity() != oldStyle->svgStyle().floodOpacity()) | 51 if (newStyle.floodOpacity() != oldStyle->svgStyle().floodOpacity()) |
| 52 toLayoutSVGResourceFilter(filter)->primitiveAttributeChanged(this, S
VGNames::flood_opacityAttr); | 52 toLayoutSVGResourceFilter(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 toLayoutSVGResourceFilter(filter)->primitiveAttributeChanged(this, S
VGNames::lighting_colorAttr); | 55 toLayoutSVGResourceFilter(filter)->primitiveAttributeChanged(this, S
VGNames::lighting_colorAttr); |
| 56 } | 56 } |
| 57 } | 57 } |
| 58 | 58 |
| 59 } // namespace blink | 59 } // namespace blink |
| OLD | NEW |