OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 bool isRadial = true) { | 108 bool isRadial = true) { |
109 if (!attributes.hasSpreadMethod() && element->spreadMethod()->isSpecified()) | 109 if (!attributes.hasSpreadMethod() && element->spreadMethod()->isSpecified()) |
110 attributes.setSpreadMethod( | 110 attributes.setSpreadMethod( |
111 element->spreadMethod()->currentValue()->enumValue()); | 111 element->spreadMethod()->currentValue()->enumValue()); |
112 | 112 |
113 if (!attributes.hasGradientUnits() && element->gradientUnits()->isSpecified()) | 113 if (!attributes.hasGradientUnits() && element->gradientUnits()->isSpecified()) |
114 attributes.setGradientUnits( | 114 attributes.setGradientUnits( |
115 element->gradientUnits()->currentValue()->enumValue()); | 115 element->gradientUnits()->currentValue()->enumValue()); |
116 | 116 |
117 if (!attributes.hasGradientTransform() && | 117 if (!attributes.hasGradientTransform() && |
118 element->gradientTransform()->isSpecified()) { | 118 element->hasTransform(SVGElement::ExcludeMotionTransform)) { |
119 AffineTransform transform; | 119 attributes.setGradientTransform( |
120 element->gradientTransform()->currentValue()->concatenate(transform); | 120 element->calculateTransform(SVGElement::ExcludeMotionTransform)); |
121 attributes.setGradientTransform(transform); | |
122 } | 121 } |
123 | 122 |
124 if (!attributes.hasStops()) { | 123 if (!attributes.hasStops()) { |
125 const Vector<Gradient::ColorStop>& stops(element->buildStops()); | 124 const Vector<Gradient::ColorStop>& stops(element->buildStops()); |
126 if (!stops.isEmpty()) | 125 if (!stops.isEmpty()) |
127 attributes.setStops(stops); | 126 attributes.setStops(stops); |
128 } | 127 } |
129 | 128 |
130 if (isRadial) { | 129 if (isRadial) { |
131 SVGRadialGradientElement* radial = toSVGRadialGradientElement(element); | 130 SVGRadialGradientElement* radial = toSVGRadialGradientElement(element); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 bool SVGRadialGradientElement::selfHasRelativeLengths() const { | 195 bool SVGRadialGradientElement::selfHasRelativeLengths() const { |
197 return m_cx->currentValue()->isRelative() || | 196 return m_cx->currentValue()->isRelative() || |
198 m_cy->currentValue()->isRelative() || | 197 m_cy->currentValue()->isRelative() || |
199 m_r->currentValue()->isRelative() || | 198 m_r->currentValue()->isRelative() || |
200 m_fx->currentValue()->isRelative() || | 199 m_fx->currentValue()->isRelative() || |
201 m_fy->currentValue()->isRelative() || | 200 m_fy->currentValue()->isRelative() || |
202 m_fr->currentValue()->isRelative(); | 201 m_fr->currentValue()->isRelative(); |
203 } | 202 } |
204 | 203 |
205 } // namespace blink | 204 } // namespace blink |
OLD | NEW |