| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 if (parent->isSVGRoot()) { | 87 if (parent->isSVGRoot()) { |
| 88 TransformationMatrix matrix(object->localToParentTransform()); | 88 TransformationMatrix matrix(object->localToParentTransform()); |
| 89 matrix.multiply(toRenderSVGRoot(parent)->localToBorderBoxTransform()); | 89 matrix.multiply(toRenderSVGRoot(parent)->localToBorderBoxTransform()); |
| 90 geometryMap.push(object, matrix); | 90 geometryMap.push(object, matrix); |
| 91 } else | 91 } else |
| 92 geometryMap.push(object, object->localToParentTransform()); | 92 geometryMap.push(object, object->localToParentTransform()); |
| 93 | 93 |
| 94 return parent; | 94 return parent; |
| 95 } | 95 } |
| 96 | 96 |
| 97 bool SVGRenderSupport::parentTransformDidChange(RenderObject* object) |
| 98 { |
| 99 // When a parent container is transformed in SVG, all children will be paint
ed automatically |
| 100 // so we are able to skip redundant repaint checks. |
| 101 RenderObject* parent = object->parent(); |
| 102 return !(parent && parent->isSVGContainer() && toRenderSVGContainer(parent)-
>didTransformToRootUpdate()); |
| 103 } |
| 104 |
| 97 bool SVGRenderSupport::checkForSVGRepaintDuringLayout(RenderObject* object) | 105 bool SVGRenderSupport::checkForSVGRepaintDuringLayout(RenderObject* object) |
| 98 { | 106 { |
| 99 if (!object->checkForRepaintDuringLayout()) | 107 if (!object->checkForRepaintDuringLayout()) |
| 100 return false; | 108 return false; |
| 101 // When a parent container is transformed in SVG, all children will be paint
ed automatically | 109 |
| 102 // so we are able to skip redundant repaint checks. | 110 return parentTransformDidChange(object); |
| 103 RenderObject* parent = object->parent(); | |
| 104 return !(parent && parent->isSVGContainer() && toRenderSVGContainer(parent)-
>didTransformToRootUpdate()); | |
| 105 } | 111 } |
| 106 | 112 |
| 107 bool SVGRenderSupport::paintInfoIntersectsRepaintRect(const FloatRect& localRepa
intRect, const AffineTransform& localTransform, const PaintInfo& paintInfo) | 113 bool SVGRenderSupport::paintInfoIntersectsRepaintRect(const FloatRect& localRepa
intRect, const AffineTransform& localTransform, const PaintInfo& paintInfo) |
| 108 { | 114 { |
| 109 return localTransform.mapRect(localRepaintRect).intersects(paintInfo.rect); | 115 return localTransform.mapRect(localRepaintRect).intersects(paintInfo.rect); |
| 110 } | 116 } |
| 111 | 117 |
| 112 const RenderSVGRoot* SVGRenderSupport::findTreeRootObject(const RenderObject* st
art) | 118 const RenderSVGRoot* SVGRenderSupport::findTreeRootObject(const RenderObject* st
art) |
| 113 { | 119 { |
| 114 while (start && !start->isSVGRoot()) | 120 while (start && !start->isSVGRoot()) |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 } | 263 } |
| 258 | 264 |
| 259 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object) | 265 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object) |
| 260 { | 266 { |
| 261 ASSERT(object->isText()); | 267 ASSERT(object->isText()); |
| 262 // <br> is marked as text, but is not handled by the SVG rendering code-path
. | 268 // <br> is marked as text, but is not handled by the SVG rendering code-path
. |
| 263 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty
Text(); | 269 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty
Text(); |
| 264 } | 270 } |
| 265 | 271 |
| 266 } | 272 } |
| OLD | NEW |