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

Unified Diff: Source/core/svg/graphics/SVGImage.cpp

Issue 26390004: Rework SVG sizing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test that was disabled on linux and stand alone svg in error mode Created 6 years, 8 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/svg/graphics/SVGImage.cpp
diff --git a/Source/core/svg/graphics/SVGImage.cpp b/Source/core/svg/graphics/SVGImage.cpp
index 1219831c6b119cf83cd88d8ccca60ba28cac7591..ac06793fece98dedec57bc6c0285611d36a8c8d5 100644
--- a/Source/core/svg/graphics/SVGImage.cpp
+++ b/Source/core/svg/graphics/SVGImage.cpp
@@ -162,7 +162,7 @@ IntSize SVGImage::containerSize() const
ASSERT(renderer->style()->effectiveZoom() == 1);
FloatSize currentSize;
- if (rootElement->intrinsicWidth().isFixed() && rootElement->intrinsicHeight().isFixed())
+ if (rootElement->hasIntrinsicWidth() && rootElement->hasIntrinsicHeight())
currentSize = rootElement->currentViewportSize();
else
currentSize = rootElement->currentViewBoxRect().size();
@@ -311,22 +311,6 @@ FrameView* SVGImage::frameView() const
return m_page->mainFrame()->view();
}
-bool SVGImage::hasRelativeWidth() const
-{
- SVGSVGElement* rootElement = svgRootElement(m_page.get());
- if (!rootElement)
- return false;
- return rootElement->intrinsicWidth().isPercent();
-}
-
-bool SVGImage::hasRelativeHeight() const
-{
- SVGSVGElement* rootElement = svgRootElement(m_page.get());
- if (!rootElement)
- return false;
- return rootElement->intrinsicHeight().isPercent();
-}
-
void SVGImage::computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio)
{
SVGSVGElement* rootElement = svgRootElement(m_page.get());

Powered by Google App Engine
This is Rietveld 408576698