| 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 | |
| 72 RenderObject* parent = object->parent(); | 70 RenderObject* parent = object->parent(); |
| 73 | 71 |
| 74 // At the SVG/HTML boundary (aka RenderSVGRoot), we apply the localToBorderB
oxTransform | 72 // At the SVG/HTML boundary (aka RenderSVGRoot), we apply the localToBorderB
oxTransform |
| 75 // to map an element from SVG viewport coordinates to CSS box coordinates. | 73 // to map an element from SVG viewport coordinates to CSS box coordinates. |
| 76 // RenderSVGRoot's mapLocalToContainer method expects CSS box coordinates. | 74 // RenderSVGRoot's mapLocalToContainer method expects CSS box coordinates. |
| 77 if (parent->isSVGRoot()) | 75 if (parent->isSVGRoot()) |
| 78 transformState.applyTransform(toRenderSVGRoot(parent)->localToBorderBoxT
ransform()); | 76 transformState.applyTransform(toRenderSVGRoot(parent)->localToBorderBoxT
ransform()); |
| 79 | 77 |
| 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 } | 412 } |
| 413 | 413 |
| 414 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object) | 414 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object) |
| 415 { | 415 { |
| 416 ASSERT(object->isText()); | 416 ASSERT(object->isText()); |
| 417 // <br> is marked as text, but is not handled by the SVG rendering code-path
. | 417 // <br> is marked as text, but is not handled by the SVG rendering code-path
. |
| 418 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty
Text(); | 418 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty
Text(); |
| 419 } | 419 } |
| 420 | 420 |
| 421 } | 421 } |
| OLD | NEW |