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

Unified Diff: Source/core/svg/SVGLengthContext.cpp

Issue 192093002: Drop SVGElement::isSVGSVGElement() virtual function (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/core/svg/SVGElement.cpp ('k') | Source/core/svg/SVGSVGElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGLengthContext.cpp
diff --git a/Source/core/svg/SVGLengthContext.cpp b/Source/core/svg/SVGLengthContext.cpp
index c5c3a4ff1db8ab290f435f104c419be3c5c6b9cd..31b54e1b9dda22cbe1a22bf9440c3630ae7ad540 100644
--- a/Source/core/svg/SVGLengthContext.cpp
+++ b/Source/core/svg/SVGLengthContext.cpp
@@ -308,13 +308,13 @@ bool SVGLengthContext::determineViewport(FloatSize& viewportSize) const
// Take size from nearest viewport element.
SVGElement* viewportElement = m_context->viewportElement();
- if (!viewportElement || !viewportElement->isSVGSVGElement())
+ if (!isSVGSVGElement(viewportElement))
return false;
- const SVGSVGElement* svg = toSVGSVGElement(viewportElement);
- viewportSize = svg->currentViewBoxRect().size();
+ const SVGSVGElement& svg = toSVGSVGElement(*viewportElement);
+ viewportSize = svg.currentViewBoxRect().size();
if (viewportSize.isEmpty())
- viewportSize = svg->currentViewportSize();
+ viewportSize = svg.currentViewportSize();
return true;
}
« no previous file with comments | « Source/core/svg/SVGElement.cpp ('k') | Source/core/svg/SVGSVGElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698