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

Unified Diff: third_party/WebKit/Source/core/paint/SVGImagePainter.cpp

Issue 1732563007: [NOT FOR COMMIT] Pass defaultObjectSize to get image size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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: third_party/WebKit/Source/core/paint/SVGImagePainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp b/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp
index e118d126d9a5c90a8f76791d3b56e613b3648bfb..b034cfce0f2e19a9848b7e80ae9f1ae121e26724 100644
--- a/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp
@@ -57,7 +57,7 @@ void SVGImagePainter::paintForeground(const PaintInfo& paintInfo)
RefPtr<Image> image = imageResource->image(imageViewportSize, m_layoutSVGImage.style()->effectiveZoom());
FloatRect destRect = m_layoutSVGImage.objectBoundingBox();
- FloatRect srcRect(0, 0, image->width(), image->height());
+ FloatRect srcRect(0, 0, image->defaultConcreteObjectSizeWidth(), image->defaultConcreteObjectSizeHeight());
SVGImageElement* imageElement = toSVGImageElement(m_layoutSVGImage.element());
imageElement->preserveAspectRatio()->currentValue()->transformRect(destRect, srcRect);
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxPainter.cpp ('k') | third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698