OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> |
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2009 Google, Inc. All rights reserved. | 5 * Copyright (C) 2009 Google, Inc. All rights reserved. |
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 needsLayout = true; | 190 needsLayout = true; |
191 } | 191 } |
192 | 192 |
193 if (layoutSizeChanged) { | 193 if (layoutSizeChanged) { |
194 // When selfNeedsLayout is false and the layout size changed, we hav
e to check whether this child uses relative lengths | 194 // When selfNeedsLayout is false and the layout size changed, we hav
e to check whether this child uses relative lengths |
195 if (SVGElement* element = child->node()->isSVGElement() ? static_cas
t<SVGElement*>(child->node()) : 0) { | 195 if (SVGElement* element = child->node()->isSVGElement() ? static_cas
t<SVGElement*>(child->node()) : 0) { |
196 if (element->isStyled() && static_cast<SVGStyledElement*>(elemen
t)->hasRelativeLengths()) { | 196 if (element->isStyled() && static_cast<SVGStyledElement*>(elemen
t)->hasRelativeLengths()) { |
197 // When the layout size changed and when using relative valu
es tell the RenderSVGShape to update its shape object | 197 // When the layout size changed and when using relative valu
es tell the RenderSVGShape to update its shape object |
198 if (child->isSVGShape()) | 198 if (child->isSVGShape()) |
199 toRenderSVGShape(child)->setNeedsShapeUpdate(); | 199 toRenderSVGShape(child)->setNeedsShapeUpdate(); |
200 else if (child->isSVGText()) | 200 else if (child->isSVGText()) { |
| 201 toRenderSVGText(child)->setNeedsTextMetricsUpdate(); |
201 toRenderSVGText(child)->setNeedsPositioningValuesUpdate(
); | 202 toRenderSVGText(child)->setNeedsPositioningValuesUpdate(
); |
| 203 } |
202 | 204 |
203 needsLayout = true; | 205 needsLayout = true; |
204 } | 206 } |
205 } | 207 } |
206 } | 208 } |
207 | 209 |
208 if (needsLayout) { | 210 if (needsLayout) { |
209 child->setNeedsLayout(true, MarkOnlyThis); | 211 child->setNeedsLayout(true, MarkOnlyThis); |
210 child->layout(); | 212 child->layout(); |
211 } else { | 213 } else { |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 for (Vector<SVGLength>::const_iterator it = dashes.begin(); it != end; +
+it) | 335 for (Vector<SVGLength>::const_iterator it = dashes.begin(); it != end; +
+it) |
334 dashArray.append((*it).value(lengthContext)); | 336 dashArray.append((*it).value(lengthContext)); |
335 | 337 |
336 context->setLineDash(dashArray, svgStyle->strokeDashOffset().value(lengt
hContext)); | 338 context->setLineDash(dashArray, svgStyle->strokeDashOffset().value(lengt
hContext)); |
337 } | 339 } |
338 } | 340 } |
339 | 341 |
340 } | 342 } |
341 | 343 |
342 #endif | 344 #endif |
OLD | NEW |