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()); | |
fs
2014/01/21 09:07:57
This doesn't look right to me - I take it that in
Stephen Chennney
2014/01/21 22:12:11
I think that, like me, you are confused by the amb
| |
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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
406 | 406 |
407 bool SVGRenderSupport::isEmptySVGInlineText(const RenderObject* object) | 407 bool SVGRenderSupport::isEmptySVGInlineText(const RenderObject* object) |
408 { | 408 { |
409 // RenderSVGInlineText performs whitespace filtering in order to support xml :space | 409 // RenderSVGInlineText performs whitespace filtering in order to support xml :space |
410 // (http://www.w3.org/TR/SVG/struct.html#LangSpaceAttrs), and can end up wit h an empty string | 410 // (http://www.w3.org/TR/SVG/struct.html#LangSpaceAttrs), and can end up wit h an empty string |
411 // even when its original constructor argument is non-empty. | 411 // even when its original constructor argument is non-empty. |
412 return object->isSVGInlineText() && toRenderSVGInlineText(object)->hasEmptyT ext(); | 412 return object->isSVGInlineText() && toRenderSVGInlineText(object)->hasEmptyT ext(); |
413 } | 413 } |
414 | 414 |
415 } | 415 } |
OLD | NEW |