Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: Source/core/rendering/svg/RenderSVGForeignObject.cpp

Issue 112003003: [SVG] SVGLength{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert aggressive svgAttributeChanged, add NeedsRebaseline Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 if (m_needsTransformUpdate) { 131 if (m_needsTransformUpdate) {
132 m_localTransform = foreign->animatedLocalTransform(); 132 m_localTransform = foreign->animatedLocalTransform();
133 m_needsTransformUpdate = false; 133 m_needsTransformUpdate = false;
134 updateCachedBoundariesInParents = true; 134 updateCachedBoundariesInParents = true;
135 } 135 }
136 136
137 FloatRect oldViewport = m_viewport; 137 FloatRect oldViewport = m_viewport;
138 138
139 // Cache viewport boundaries 139 // Cache viewport boundaries
140 SVGLengthContext lengthContext(foreign); 140 SVGLengthContext lengthContext(foreign);
141 FloatPoint viewportLocation(foreign->xCurrentValue().value(lengthContext), f oreign->yCurrentValue().value(lengthContext)); 141 FloatPoint viewportLocation(foreign->x()->currentValue()->value(lengthContex t), foreign->y()->currentValue()->value(lengthContext));
142 m_viewport = FloatRect(viewportLocation, FloatSize(foreign->widthCurrentValu e().value(lengthContext), foreign->heightCurrentValue().value(lengthContext))); 142 m_viewport = FloatRect(viewportLocation, FloatSize(foreign->width()->current Value()->value(lengthContext), foreign->height()->currentValue()->value(lengthCo ntext)));
143 if (!updateCachedBoundariesInParents) 143 if (!updateCachedBoundariesInParents)
144 updateCachedBoundariesInParents = oldViewport != m_viewport; 144 updateCachedBoundariesInParents = oldViewport != m_viewport;
145 145
146 // Set box origin to the foreignObject x/y translation, so positioned object s in XHTML content get correct 146 // Set box origin to the foreignObject x/y translation, so positioned object s in XHTML content get correct
147 // positions. A regular RenderBoxModelObject would pull this information fro m RenderStyle - in SVG those 147 // positions. A regular RenderBoxModelObject would pull this information fro m RenderStyle - in SVG those
148 // properties are ignored for non <svg> elements, so we mimic what happens w hen specifying them through CSS. 148 // properties are ignored for non <svg> elements, so we mimic what happens w hen specifying them through CSS.
149 149
150 // FIXME: Investigate in location rounding issues - only affects RenderSVGFo reignObject & RenderSVGText 150 // FIXME: Investigate in location rounding issues - only affects RenderSVGFo reignObject & RenderSVGText
151 setLocation(roundedIntPoint(viewportLocation)); 151 setLocation(roundedIntPoint(viewportLocation));
152 152
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 { 194 {
195 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState , wasFixed); 195 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState , wasFixed);
196 } 196 }
197 197
198 const RenderObject* RenderSVGForeignObject::pushMappingToContainer(const RenderL ayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const 198 const RenderObject* RenderSVGForeignObject::pushMappingToContainer(const RenderL ayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const
199 { 199 {
200 return SVGRenderSupport::pushMappingToContainer(this, ancestorToStopAt, geom etryMap); 200 return SVGRenderSupport::pushMappingToContainer(this, ancestorToStopAt, geom etryMap);
201 } 201 }
202 202
203 } 203 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGEllipse.cpp ('k') | Source/core/rendering/svg/RenderSVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698