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

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 mishap during rebase in svg.css 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 2a909413e7355dc51559c61e60815c83b82d93da..f9d4da6b7164ddb4015b4ec87e7c02301c153d5e 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