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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp

Issue 2121973002: Fallback to 300x150 instead of 0x0 size for SVG inside content() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test Created 4 years, 5 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/layout/LayoutImageResourceStyleImage.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp b/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp
index 41f37eff7ae65d22a3b696735e1f90a7022f6f6e..813f6a09ffc21c63a567e5f796f04f6f31a08833 100644
--- a/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp
@@ -28,6 +28,7 @@
#include "core/layout/LayoutImageResourceStyleImage.h"
#include "core/fetch/ImageResource.h"
+#include "core/layout/LayoutReplaced.h"
#include "core/style/StyleFetchedImage.h"
namespace blink {
@@ -68,6 +69,12 @@ PassRefPtr<Image> LayoutImageResourceStyleImage::image(const IntSize& size, floa
return m_styleImage->image(*m_layoutObject, size, zoom);
}
+LayoutSize LayoutImageResourceStyleImage::imageSize(float multiplier) const
+{
+ // TODO(davve): Find out the correct default object size in this context.
+ return m_styleImage->imageSize(*m_layoutObject, multiplier, LayoutSize(LayoutReplaced::defaultWidth, LayoutReplaced::defaultHeight));
+}
+
DEFINE_TRACE(LayoutImageResourceStyleImage)
{
visitor->trace(m_styleImage);

Powered by Google App Engine
This is Rietveld 408576698