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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGElement.cpp ('k') | Source/core/svg/SVGSVGElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2007 Apple Inc. All rights reserved.
5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 301 }
302 302
303 // Root <svg> element lengths are resolved against the top level viewport. 303 // Root <svg> element lengths are resolved against the top level viewport.
304 if (m_context->isOutermostSVGSVGElement()) { 304 if (m_context->isOutermostSVGSVGElement()) {
305 viewportSize = toSVGSVGElement(m_context)->currentViewportSize(); 305 viewportSize = toSVGSVGElement(m_context)->currentViewportSize();
306 return true; 306 return true;
307 } 307 }
308 308
309 // Take size from nearest viewport element. 309 // Take size from nearest viewport element.
310 SVGElement* viewportElement = m_context->viewportElement(); 310 SVGElement* viewportElement = m_context->viewportElement();
311 if (!viewportElement || !viewportElement->isSVGSVGElement()) 311 if (!isSVGSVGElement(viewportElement))
312 return false; 312 return false;
313 313
314 const SVGSVGElement* svg = toSVGSVGElement(viewportElement); 314 const SVGSVGElement& svg = toSVGSVGElement(*viewportElement);
315 viewportSize = svg->currentViewBoxRect().size(); 315 viewportSize = svg.currentViewBoxRect().size();
316 if (viewportSize.isEmpty()) 316 if (viewportSize.isEmpty())
317 viewportSize = svg->currentViewportSize(); 317 viewportSize = svg.currentViewportSize();
318 318
319 return true; 319 return true;
320 } 320 }
321 321
322 } 322 }
OLDNEW
« 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