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

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

Issue 13008026: Merge 146227 "Separate SVG image size and container size" (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 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/WebCore/svg/graphics/SVGImage.h ('k') | Source/WebCore/svg/graphics/SVGImageCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/svg/graphics/SVGImage.cpp
===================================================================
--- Source/WebCore/svg/graphics/SVGImage.cpp (revision 146634)
+++ Source/WebCore/svg/graphics/SVGImage.cpp (working copy)
@@ -74,12 +74,12 @@
return;
FrameView* view = frameView();
- view->resize(this->size());
+ view->resize(this->containerSize());
renderer->setContainerSize(size);
}
-IntSize SVGImage::size() const
+IntSize SVGImage::containerSize() const
{
if (!m_page)
return IntSize();
@@ -192,7 +192,7 @@
context->translate(destOffset.x(), destOffset.y());
context->scale(scale);
- view->resize(size());
+ view->resize(containerSize());
if (view->needsLayout())
view->layout();
@@ -336,6 +336,9 @@
loader->activeDocumentLoader()->writer()->begin(KURL()); // create the empty document
loader->activeDocumentLoader()->writer()->addData(data()->data(), data()->size());
loader->activeDocumentLoader()->writer()->end();
+
+ // Set the intrinsic size before a container size is available.
+ m_intrinsicSize = containerSize();
}
return m_page;
« no previous file with comments | « Source/WebCore/svg/graphics/SVGImage.h ('k') | Source/WebCore/svg/graphics/SVGImageCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698