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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp

Issue 2592613002: LayoutSVGImage should work correctly even when image size is unavailable (Closed)
Patch Set: Created 4 years 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 | « no previous file | third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp
index 1bce9cf781b9e3d55e4e815f6aa1d17cd2c83b77..d95b5566c8eaa959f28d00f8833bd4fa3cefbc9f 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp
@@ -69,7 +69,8 @@ static float resolveHeightForRatio(float width,
FloatSize LayoutSVGImage::calculateObjectSize() const {
ImageResourceContent* cachedImage = m_imageResource->cachedImage();
- if (!cachedImage || cachedImage->errorOccurred())
+ if (!cachedImage || cachedImage->errorOccurred() ||
+ !cachedImage->isSizeAvailable())
fs 2016/12/20 10:08:12 Would this not affect other similar code-paths sim
yhirano 2016/12/20 12:06:30 I'm not sure (I'm not familiar with the layout / i
fs 2016/12/20 12:15:45 My observation was mostly that other code seems to
hiroshige 2016/12/21 17:51:06 If we can replace isSizeAvailable() here and in Im
return m_objectBoundingBox.size();
FloatSize intrinsicSize = FloatSize(cachedImage->getImage()->size());
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698