Index: Source/core/svg/SVGRadialGradientElement.cpp |
diff --git a/Source/core/svg/SVGRadialGradientElement.cpp b/Source/core/svg/SVGRadialGradientElement.cpp |
index d8fe2a87533664771aa6a0172e1ccf679ad55592..71961cd1dfd21368d3d536c2fa2bee917452ae62 100644 |
--- a/Source/core/svg/SVGRadialGradientElement.cpp |
+++ b/Source/core/svg/SVGRadialGradientElement.cpp |
@@ -134,7 +134,6 @@ bool SVGRadialGradientElement::collectGradientAttributes(RadialGradientAttribute |
{ |
HashSet<SVGGradientElement*> processedGradients; |
- bool isRadial = true; |
SVGGradientElement* current = this; |
while (current) { |
@@ -159,28 +158,6 @@ bool SVGRadialGradientElement::collectGradientAttributes(RadialGradientAttribute |
attributes.setStops(stops); |
} |
- if (isRadial) { |
- SVGRadialGradientElement* radial = toSVGRadialGradientElement(current); |
- |
- if (!attributes.hasCx() && current->hasAttribute(SVGNames::cxAttr)) |
- attributes.setCx(radial->cx()->currentValue()); |
- |
- if (!attributes.hasCy() && current->hasAttribute(SVGNames::cyAttr)) |
- attributes.setCy(radial->cy()->currentValue()); |
- |
- if (!attributes.hasR() && current->hasAttribute(SVGNames::rAttr)) |
- attributes.setR(radial->r()->currentValue()); |
- |
- if (!attributes.hasFx() && current->hasAttribute(SVGNames::fxAttr)) |
- attributes.setFx(radial->fx()->currentValue()); |
- |
- if (!attributes.hasFy() && current->hasAttribute(SVGNames::fyAttr)) |
- attributes.setFy(radial->fy()->currentValue()); |
- |
- if (!attributes.hasFr() && current->hasAttribute(SVGNames::frAttr)) |
- attributes.setFr(radial->fr()->currentValue()); |
- } |
- |
processedGradients.add(current); |
// Respect xlink:href, take attributes from referenced element |
@@ -194,7 +171,27 @@ bool SVGRadialGradientElement::collectGradientAttributes(RadialGradientAttribute |
break; |
} |
- isRadial = current->hasTagName(SVGNames::radialGradientTag); |
+ if (current->hasTagName(SVGNames::radialGradientTag)) { |
gyuyoung-inactive
2014/01/13 16:12:13
This moving do wrong behavior. I will update this
|
+ SVGRadialGradientElement* radial = toSVGRadialGradientElement(current); |
+ |
+ if (!attributes.hasCx() && current->hasAttribute(SVGNames::cxAttr)) |
+ attributes.setCx(radial->cx()->currentValue()); |
+ |
+ if (!attributes.hasCy() && current->hasAttribute(SVGNames::cyAttr)) |
+ attributes.setCy(radial->cy()->currentValue()); |
+ |
+ if (!attributes.hasR() && current->hasAttribute(SVGNames::rAttr)) |
+ attributes.setR(radial->r()->currentValue()); |
+ |
+ if (!attributes.hasFx() && current->hasAttribute(SVGNames::fxAttr)) |
+ attributes.setFx(radial->fx()->currentValue()); |
+ |
+ if (!attributes.hasFy() && current->hasAttribute(SVGNames::fyAttr)) |
+ attributes.setFy(radial->fy()->currentValue()); |
+ |
+ if (!attributes.hasFr() && current->hasAttribute(SVGNames::frAttr)) |
+ attributes.setFr(radial->fr()->currentValue()); |
+ } |
} else |
current = 0; |
} |