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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 bool isLinear = true) { | 99 bool isLinear = true) { |
100 if (!attributes.hasSpreadMethod() && element->spreadMethod()->isSpecified()) | 100 if (!attributes.hasSpreadMethod() && element->spreadMethod()->isSpecified()) |
101 attributes.setSpreadMethod( | 101 attributes.setSpreadMethod( |
102 element->spreadMethod()->currentValue()->enumValue()); | 102 element->spreadMethod()->currentValue()->enumValue()); |
103 | 103 |
104 if (!attributes.hasGradientUnits() && element->gradientUnits()->isSpecified()) | 104 if (!attributes.hasGradientUnits() && element->gradientUnits()->isSpecified()) |
105 attributes.setGradientUnits( | 105 attributes.setGradientUnits( |
106 element->gradientUnits()->currentValue()->enumValue()); | 106 element->gradientUnits()->currentValue()->enumValue()); |
107 | 107 |
108 if (!attributes.hasGradientTransform() && | 108 if (!attributes.hasGradientTransform() && |
109 element->gradientTransform()->isSpecified()) { | 109 element->hasTransform(SVGElement::ExcludeMotionTransform)) { |
110 AffineTransform transform; | 110 attributes.setGradientTransform( |
111 element->gradientTransform()->currentValue()->concatenate(transform); | 111 element->calculateTransform(SVGElement::ExcludeMotionTransform)); |
112 attributes.setGradientTransform(transform); | |
113 } | 112 } |
114 | 113 |
115 if (!attributes.hasStops()) { | 114 if (!attributes.hasStops()) { |
116 const Vector<Gradient::ColorStop>& stops(element->buildStops()); | 115 const Vector<Gradient::ColorStop>& stops(element->buildStops()); |
117 if (!stops.isEmpty()) | 116 if (!stops.isEmpty()) |
118 attributes.setStops(stops); | 117 attributes.setStops(stops); |
119 } | 118 } |
120 | 119 |
121 if (isLinear) { | 120 if (isLinear) { |
122 SVGLinearGradientElement* linear = toSVGLinearGradientElement(element); | 121 SVGLinearGradientElement* linear = toSVGLinearGradientElement(element); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 } | 172 } |
174 | 173 |
175 bool SVGLinearGradientElement::selfHasRelativeLengths() const { | 174 bool SVGLinearGradientElement::selfHasRelativeLengths() const { |
176 return m_x1->currentValue()->isRelative() || | 175 return m_x1->currentValue()->isRelative() || |
177 m_y1->currentValue()->isRelative() || | 176 m_y1->currentValue()->isRelative() || |
178 m_x2->currentValue()->isRelative() || | 177 m_x2->currentValue()->isRelative() || |
179 m_y2->currentValue()->isRelative(); | 178 m_y2->currentValue()->isRelative(); |
180 } | 179 } |
181 | 180 |
182 } // namespace blink | 181 } // namespace blink |
OLD | NEW |