OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
3 * Copyright (C) 2009 Google, Inc. | 3 * Copyright (C) 2009 Google, Inc. |
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 if (m_needsTransformUpdate) { | 130 if (m_needsTransformUpdate) { |
131 m_localTransform = foreign->animatedLocalTransform(); | 131 m_localTransform = foreign->animatedLocalTransform(); |
132 m_needsTransformUpdate = false; | 132 m_needsTransformUpdate = false; |
133 updateCachedBoundariesInParents = true; | 133 updateCachedBoundariesInParents = true; |
134 } | 134 } |
135 | 135 |
136 FloatRect oldViewport = m_viewport; | 136 FloatRect oldViewport = m_viewport; |
137 | 137 |
138 // Cache viewport boundaries | 138 // Cache viewport boundaries |
139 SVGLengthContext lengthContext(foreign); | 139 SVGLengthContext lengthContext(foreign); |
140 FloatPoint viewportLocation(foreign->x().value(lengthContext), foreign->y().
value(lengthContext)); | 140 FloatPoint viewportLocation(foreign->xCurrentValue().value(lengthContext), f
oreign->yCurrentValue().value(lengthContext)); |
141 m_viewport = FloatRect(viewportLocation, FloatSize(foreign->width().value(le
ngthContext), foreign->height().value(lengthContext))); | 141 m_viewport = FloatRect(viewportLocation, FloatSize(foreign->widthCurrentValu
e().value(lengthContext), foreign->heightCurrentValue().value(lengthContext))); |
142 if (!updateCachedBoundariesInParents) | 142 if (!updateCachedBoundariesInParents) |
143 updateCachedBoundariesInParents = oldViewport != m_viewport; | 143 updateCachedBoundariesInParents = oldViewport != m_viewport; |
144 | 144 |
145 // Set box origin to the foreignObject x/y translation, so positioned object
s in XHTML content get correct | 145 // Set box origin to the foreignObject x/y translation, so positioned object
s in XHTML content get correct |
146 // positions. A regular RenderBoxModelObject would pull this information fro
m RenderStyle - in SVG those | 146 // positions. A regular RenderBoxModelObject would pull this information fro
m RenderStyle - in SVG those |
147 // properties are ignored for non <svg> elements, so we mimic what happens w
hen specifying them through CSS. | 147 // properties are ignored for non <svg> elements, so we mimic what happens w
hen specifying them through CSS. |
148 | 148 |
149 // FIXME: Investigate in location rounding issues - only affects RenderSVGFo
reignObject & RenderSVGText | 149 // FIXME: Investigate in location rounding issues - only affects RenderSVGFo
reignObject & RenderSVGText |
150 setLocation(roundedIntPoint(viewportLocation)); | 150 setLocation(roundedIntPoint(viewportLocation)); |
151 | 151 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 { | 193 { |
194 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState
, wasFixed); | 194 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState
, wasFixed); |
195 } | 195 } |
196 | 196 |
197 const RenderObject* RenderSVGForeignObject::pushMappingToContainer(const RenderL
ayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const | 197 const RenderObject* RenderSVGForeignObject::pushMappingToContainer(const RenderL
ayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const |
198 { | 198 { |
199 return SVGRenderSupport::pushMappingToContainer(this, ancestorToStopAt, geom
etryMap); | 199 return SVGRenderSupport::pushMappingToContainer(this, ancestorToStopAt, geom
etryMap); |
200 } | 200 } |
201 | 201 |
202 } | 202 } |
OLD | NEW |