| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 { | 60 { |
| 61 repaintRect.inflate(object->style()->outlineWidth()); | 61 repaintRect.inflate(object->style()->outlineWidth()); |
| 62 | 62 |
| 63 // Translate to coords in our parent renderer, and then call computeFloatRec
tForRepaint() on our parent. | 63 // Translate to coords in our parent renderer, and then call computeFloatRec
tForRepaint() on our parent. |
| 64 repaintRect = object->localToParentTransform().mapRect(repaintRect); | 64 repaintRect = object->localToParentTransform().mapRect(repaintRect); |
| 65 object->parent()->computeFloatRectForRepaint(repaintContainer, repaintRect,
fixed); | 65 object->parent()->computeFloatRectForRepaint(repaintContainer, repaintRect,
fixed); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void SVGRenderSupport::mapLocalToContainer(const RenderObject* object, const Ren
derLayerModelObject* repaintContainer, TransformState& transformState, bool* was
Fixed) | 68 void SVGRenderSupport::mapLocalToContainer(const RenderObject* object, const Ren
derLayerModelObject* repaintContainer, TransformState& transformState, bool* was
Fixed) |
| 69 { | 69 { |
| 70 transformState.applyTransform(object->localToParentTransform()); |
| 71 |
| 70 RenderObject* parent = object->parent(); | 72 RenderObject* parent = object->parent(); |
| 71 | 73 |
| 72 // At the SVG/HTML boundary (aka RenderSVGRoot), we apply the localToBorderB
oxTransform | 74 // At the SVG/HTML boundary (aka RenderSVGRoot), we apply the localToBorderB
oxTransform |
| 73 // to map an element from SVG viewport coordinates to CSS box coordinates. | 75 // to map an element from SVG viewport coordinates to CSS box coordinates. |
| 74 // RenderSVGRoot's mapLocalToContainer method expects CSS box coordinates. | 76 // RenderSVGRoot's mapLocalToContainer method expects CSS box coordinates. |
| 75 if (parent->isSVGRoot()) | 77 if (parent->isSVGRoot()) |
| 76 transformState.applyTransform(toRenderSVGRoot(parent)->localToBorderBoxT
ransform()); | 78 transformState.applyTransform(toRenderSVGRoot(parent)->localToBorderBoxT
ransform()); |
| 77 | 79 |
| 78 transformState.applyTransform(object->localToParentTransform()); | |
| 79 | |
| 80 MapCoordinatesFlags mode = UseTransforms; | 80 MapCoordinatesFlags mode = UseTransforms; |
| 81 parent->mapLocalToContainer(repaintContainer, transformState, mode, wasFixed
); | 81 parent->mapLocalToContainer(repaintContainer, transformState, mode, wasFixed
); |
| 82 } | 82 } |
| 83 | 83 |
| 84 const RenderObject* SVGRenderSupport::pushMappingToContainer(const RenderObject*
object, const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap& geom
etryMap) | 84 const RenderObject* SVGRenderSupport::pushMappingToContainer(const RenderObject*
object, const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap& geom
etryMap) |
| 85 { | 85 { |
| 86 ASSERT_UNUSED(ancestorToStopAt, ancestorToStopAt != object); | 86 ASSERT_UNUSED(ancestorToStopAt, ancestorToStopAt != object); |
| 87 | 87 |
| 88 RenderObject* parent = object->parent(); | 88 RenderObject* parent = object->parent(); |
| 89 | 89 |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 } | 397 } |
| 398 | 398 |
| 399 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object) | 399 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object) |
| 400 { | 400 { |
| 401 ASSERT(object->isText()); | 401 ASSERT(object->isText()); |
| 402 // <br> is marked as text, but is not handled by the SVG rendering code-path
. | 402 // <br> is marked as text, but is not handled by the SVG rendering code-path
. |
| 403 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty
Text(); | 403 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty
Text(); |
| 404 } | 404 } |
| 405 | 405 |
| 406 } | 406 } |
| OLD | NEW |