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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 LinearGradientAttributes& attributes, | 98 LinearGradientAttributes& attributes, |
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() && element->hasTransform()) |
109 element->gradientTransform()->isSpecified()) { | 109 attributes.setGradientTransform(element->calculateTransform()); |
110 AffineTransform transform; | |
111 element->gradientTransform()->currentValue()->concatenate(transform); | |
112 attributes.setGradientTransform(transform); | |
113 } | |
114 | 110 |
115 if (!attributes.hasStops()) { | 111 if (!attributes.hasStops()) { |
116 const Vector<Gradient::ColorStop>& stops(element->buildStops()); | 112 const Vector<Gradient::ColorStop>& stops(element->buildStops()); |
117 if (!stops.isEmpty()) | 113 if (!stops.isEmpty()) |
118 attributes.setStops(stops); | 114 attributes.setStops(stops); |
119 } | 115 } |
120 | 116 |
121 if (isLinear) { | 117 if (isLinear) { |
122 SVGLinearGradientElement* linear = toSVGLinearGradientElement(element); | 118 SVGLinearGradientElement* linear = toSVGLinearGradientElement(element); |
123 | 119 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 } | 169 } |
174 | 170 |
175 bool SVGLinearGradientElement::selfHasRelativeLengths() const { | 171 bool SVGLinearGradientElement::selfHasRelativeLengths() const { |
176 return m_x1->currentValue()->isRelative() || | 172 return m_x1->currentValue()->isRelative() || |
177 m_y1->currentValue()->isRelative() || | 173 m_y1->currentValue()->isRelative() || |
178 m_x2->currentValue()->isRelative() || | 174 m_x2->currentValue()->isRelative() || |
179 m_y2->currentValue()->isRelative(); | 175 m_y2->currentValue()->isRelative(); |
180 } | 176 } |
181 | 177 |
182 } // namespace blink | 178 } // namespace blink |
OLD | NEW |