| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 objectBoundingBoxValid = false; | 130 objectBoundingBoxValid = false; |
| 131 strokeBoundingBox = FloatRect(); | 131 strokeBoundingBox = FloatRect(); |
| 132 | 132 |
| 133 // When computing the strokeBoundingBox, we use the repaintRects of the cont
ainer's children so that the container's stroke includes | 133 // When computing the strokeBoundingBox, we use the repaintRects of the cont
ainer's children so that the container's stroke includes |
| 134 // the resources applied to the children (such as clips and filters). This a
llows filters applied to containers to correctly bound | 134 // the resources applied to the children (such as clips and filters). This a
llows filters applied to containers to correctly bound |
| 135 // the children, and also improves inlining of SVG content, as the stroke bo
und is used in that situation also. | 135 // the children, and also improves inlining of SVG content, as the stroke bo
und is used in that situation also. |
| 136 for (RenderObject* current = container->slowFirstChild(); current; current =
current->nextSibling()) { | 136 for (RenderObject* current = container->slowFirstChild(); current; current =
current->nextSibling()) { |
| 137 if (current->isSVGHiddenContainer()) | 137 if (current->isSVGHiddenContainer()) |
| 138 continue; | 138 continue; |
| 139 | 139 |
| 140 // Don't include elements in the union that do not render. |
| 141 if (current->isSVGShape() && toRenderSVGShape(current)->isRenderingDisab
led()) |
| 142 continue; |
| 143 |
| 140 const AffineTransform& transform = current->localToParentTransform(); | 144 const AffineTransform& transform = current->localToParentTransform(); |
| 141 updateObjectBoundingBox(objectBoundingBox, objectBoundingBoxValid, curre
nt, | 145 updateObjectBoundingBox(objectBoundingBox, objectBoundingBoxValid, curre
nt, |
| 142 transform.mapRect(current->objectBoundingBox())); | 146 transform.mapRect(current->objectBoundingBox())); |
| 143 strokeBoundingBox.unite(transform.mapRect(current->paintInvalidationRect
InLocalCoordinates())); | 147 strokeBoundingBox.unite(transform.mapRect(current->paintInvalidationRect
InLocalCoordinates())); |
| 144 } | 148 } |
| 145 | 149 |
| 146 repaintBoundingBox = strokeBoundingBox; | 150 repaintBoundingBox = strokeBoundingBox; |
| 147 } | 151 } |
| 148 | 152 |
| 149 bool SVGRenderSupport::paintInfoIntersectsRepaintRect(const FloatRect& localRepa
intRect, const AffineTransform& localTransform, const PaintInfo& paintInfo) | 153 bool SVGRenderSupport::paintInfoIntersectsRepaintRect(const FloatRect& localRepa
intRect, const AffineTransform& localTransform, const PaintInfo& paintInfo) |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 } | 387 } |
| 384 | 388 |
| 385 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object) | 389 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object) |
| 386 { | 390 { |
| 387 ASSERT(object->isText()); | 391 ASSERT(object->isText()); |
| 388 // <br> is marked as text, but is not handled by the SVG rendering code-path
. | 392 // <br> is marked as text, but is not handled by the SVG rendering code-path
. |
| 389 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty
Text(); | 393 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty
Text(); |
| 390 } | 394 } |
| 391 | 395 |
| 392 } | 396 } |
| OLD | NEW |