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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 } else { | 143 } else { |
144 geometryMap.push(object, object->localToParentTransform()); | 144 geometryMap.push(object, object->localToParentTransform()); |
145 } | 145 } |
146 | 146 |
147 return parent; | 147 return parent; |
148 } | 148 } |
149 | 149 |
150 // Update a bounding box taking into account the validity of the other bounding
box. | 150 // Update a bounding box taking into account the validity of the other bounding
box. |
151 inline void SVGLayoutSupport::updateObjectBoundingBox(FloatRect& objectBoundingB
ox, bool& objectBoundingBoxValid, LayoutObject* other, FloatRect otherBoundingBo
x) | 151 inline void SVGLayoutSupport::updateObjectBoundingBox(FloatRect& objectBoundingB
ox, bool& objectBoundingBoxValid, LayoutObject* other, FloatRect otherBoundingBo
x) |
152 { | 152 { |
153 bool otherValid = other->isSVGContainer() ? toRenderSVGContainer(other)->isO
bjectBoundingBoxValid() : true; | 153 bool otherValid = other->isSVGContainer() ? toLayoutSVGContainer(other)->isO
bjectBoundingBoxValid() : true; |
154 if (!otherValid) | 154 if (!otherValid) |
155 return; | 155 return; |
156 | 156 |
157 if (!objectBoundingBoxValid) { | 157 if (!objectBoundingBoxValid) { |
158 objectBoundingBox = otherBoundingBox; | 158 objectBoundingBox = otherBoundingBox; |
159 objectBoundingBoxValid = true; | 159 objectBoundingBoxValid = true; |
160 return; | 160 return; |
161 } | 161 } |
162 | 162 |
163 objectBoundingBox.uniteEvenIfEmpty(otherBoundingBox); | 163 objectBoundingBox.uniteEvenIfEmpty(otherBoundingBox); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 if (start->isSVGViewportContainer()) | 209 if (start->isSVGViewportContainer()) |
210 return toRenderSVGViewportContainer(start)->isLayoutSizeChanged(); | 210 return toRenderSVGViewportContainer(start)->isLayoutSizeChanged(); |
211 | 211 |
212 return toRenderSVGRoot(start)->isLayoutSizeChanged(); | 212 return toRenderSVGRoot(start)->isLayoutSizeChanged(); |
213 } | 213 } |
214 | 214 |
215 bool SVGLayoutSupport::transformToRootChanged(LayoutObject* ancestor) | 215 bool SVGLayoutSupport::transformToRootChanged(LayoutObject* ancestor) |
216 { | 216 { |
217 while (ancestor && !ancestor->isSVGRoot()) { | 217 while (ancestor && !ancestor->isSVGRoot()) { |
218 if (ancestor->isSVGTransformableContainer()) | 218 if (ancestor->isSVGTransformableContainer()) |
219 return toRenderSVGContainer(ancestor)->didTransformToRootUpdate(); | 219 return toLayoutSVGContainer(ancestor)->didTransformToRootUpdate(); |
220 if (ancestor->isSVGViewportContainer()) | 220 if (ancestor->isSVGViewportContainer()) |
221 return toRenderSVGViewportContainer(ancestor)->didTransformToRootUpd
ate(); | 221 return toRenderSVGViewportContainer(ancestor)->didTransformToRootUpd
ate(); |
222 ancestor = ancestor->parent(); | 222 ancestor = ancestor->parent(); |
223 } | 223 } |
224 | 224 |
225 return false; | 225 return false; |
226 } | 226 } |
227 | 227 |
228 void SVGLayoutSupport::layoutChildren(LayoutObject* start, bool selfNeedsLayout) | 228 void SVGLayoutSupport::layoutChildren(LayoutObject* start, bool selfNeedsLayout) |
229 { | 229 { |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 | 510 |
511 layer = layer->parent(); | 511 layer = layer->parent(); |
512 } | 512 } |
513 | 513 |
514 ctm.scale(deviceScaleFactor); | 514 ctm.scale(deviceScaleFactor); |
515 | 515 |
516 return narrowPrecisionToFloat(sqrt((pow(ctm.xScale(), 2) + pow(ctm.yScale(),
2)) / 2)); | 516 return narrowPrecisionToFloat(sqrt((pow(ctm.xScale(), 2) + pow(ctm.yScale(),
2)) / 2)); |
517 } | 517 } |
518 | 518 |
519 } | 519 } |
OLD | NEW |