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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 attributes.setGradientTransform(transform); | 141 attributes.setGradientTransform(transform); |
142 } | 142 } |
143 | 143 |
144 if (!attributes.hasStops()) { | 144 if (!attributes.hasStops()) { |
145 const Vector<Gradient::ColorStop>& stops(current->buildStops()); | 145 const Vector<Gradient::ColorStop>& stops(current->buildStops()); |
146 if (!stops.isEmpty()) | 146 if (!stops.isEmpty()) |
147 attributes.setStops(stops); | 147 attributes.setStops(stops); |
148 } | 148 } |
149 | 149 |
150 if (isLinear) { | 150 if (isLinear) { |
151 SVGLinearGradientElement* linear = static_cast<SVGLinearGradientElem
ent*>(current); | 151 SVGLinearGradientElement* linear = toSVGLinearGradientElement(curren
t); |
152 | 152 |
153 if (!attributes.hasX1() && current->hasAttribute(SVGNames::x1Attr)) | 153 if (!attributes.hasX1() && current->hasAttribute(SVGNames::x1Attr)) |
154 attributes.setX1(linear->x1CurrentValue()); | 154 attributes.setX1(linear->x1CurrentValue()); |
155 | 155 |
156 if (!attributes.hasY1() && current->hasAttribute(SVGNames::y1Attr)) | 156 if (!attributes.hasY1() && current->hasAttribute(SVGNames::y1Attr)) |
157 attributes.setY1(linear->y1CurrentValue()); | 157 attributes.setY1(linear->y1CurrentValue()); |
158 | 158 |
159 if (!attributes.hasX2() && current->hasAttribute(SVGNames::x2Attr)) | 159 if (!attributes.hasX2() && current->hasAttribute(SVGNames::x2Attr)) |
160 attributes.setX2(linear->x2CurrentValue()); | 160 attributes.setX2(linear->x2CurrentValue()); |
161 | 161 |
(...skipping 24 matching lines...) Expand all Loading... |
186 | 186 |
187 bool SVGLinearGradientElement::selfHasRelativeLengths() const | 187 bool SVGLinearGradientElement::selfHasRelativeLengths() const |
188 { | 188 { |
189 return x1CurrentValue().isRelative() | 189 return x1CurrentValue().isRelative() |
190 || y1CurrentValue().isRelative() | 190 || y1CurrentValue().isRelative() |
191 || x2CurrentValue().isRelative() | 191 || x2CurrentValue().isRelative() |
192 || y2CurrentValue().isRelative(); | 192 || y2CurrentValue().isRelative(); |
193 } | 193 } |
194 | 194 |
195 } | 195 } |
OLD | NEW |