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

Unified Diff: Source/core/rendering/svg/RenderSVGViewportContainer.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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/svg/RenderSVGViewportContainer.cpp
diff --git a/Source/core/rendering/svg/RenderSVGViewportContainer.cpp b/Source/core/rendering/svg/RenderSVGViewportContainer.cpp
index 05234c18b5707e0b6a7e2a19a3e0609fa44b6b22..63fa495991abdd111d965f27c34508784736958b 100644
--- a/Source/core/rendering/svg/RenderSVGViewportContainer.cpp
+++ b/Source/core/rendering/svg/RenderSVGViewportContainer.cpp
@@ -63,7 +63,7 @@ void RenderSVGViewportContainer::calcViewport()
FloatRect oldViewport = m_viewport;
SVGLengthContext lengthContext(element);
- m_viewport = FloatRect(svg->xCurrentValue().value(lengthContext), svg->yCurrentValue().value(lengthContext), svg->widthCurrentValue().value(lengthContext), svg->heightCurrentValue().value(lengthContext));
+ m_viewport = FloatRect(svg->x()->currentValue()->value(lengthContext), svg->y()->currentValue()->value(lengthContext), svg->width()->currentValue()->value(lengthContext), svg->height()->currentValue()->value(lengthContext));
SVGElement* correspondingElement = svg->correspondingElement();
if (correspondingElement && svg->isInShadowTree()) {
@@ -97,17 +97,19 @@ void RenderSVGViewportContainer::calcViewport()
SVGLengthContext lengthContext(element);
if (useElement->hasAttribute(SVGNames::widthAttr))
- m_viewport.setWidth(useElement->widthCurrentValue().value(lengthContext));
+ m_viewport.setWidth(useElement->width()->currentValue()->value(lengthContext));
else if (isSymbolElement && svg->hasAttribute(SVGNames::widthAttr)) {
- SVGLength containerWidth(LengthModeWidth, "100%");
- m_viewport.setWidth(containerWidth.value(lengthContext));
+ RefPtr<SVGLength> containerWidth = SVGLength::create(LengthModeWidth);
+ containerWidth->setValueAsString("100%", ASSERT_NO_EXCEPTION);
+ m_viewport.setWidth(containerWidth->value(lengthContext));
}
if (useElement->hasAttribute(SVGNames::heightAttr))
- m_viewport.setHeight(useElement->heightCurrentValue().value(lengthContext));
+ m_viewport.setHeight(useElement->height()->currentValue()->value(lengthContext));
else if (isSymbolElement && svg->hasAttribute(SVGNames::heightAttr)) {
- SVGLength containerHeight(LengthModeHeight, "100%");
- m_viewport.setHeight(containerHeight.value(lengthContext));
+ RefPtr<SVGLength> containerHeight = SVGLength::create(LengthModeHeight);
+ containerHeight->setValueAsString("100%", ASSERT_NO_EXCEPTION);
+ m_viewport.setHeight(containerHeight->value(lengthContext));
}
}
« no previous file with comments | « Source/core/rendering/svg/RenderSVGTransformableContainer.cpp ('k') | Source/core/rendering/svg/SVGPathData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698