Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/ImageDocument.cpp |
| diff --git a/third_party/WebKit/Source/core/html/ImageDocument.cpp b/third_party/WebKit/Source/core/html/ImageDocument.cpp |
| index 5a716aa9331096f846fcd571083c1446490fd60f..0adad97975ba5e1d8bd39ef786f0c9701dfeb259 100644 |
| --- a/third_party/WebKit/Source/core/html/ImageDocument.cpp |
| +++ b/third_party/WebKit/Source/core/html/ImageDocument.cpp |
| @@ -48,6 +48,7 @@ |
| #include "core/loader/FrameLoader.h" |
| #include "core/loader/FrameLoaderClient.h" |
| #include "core/loader/resource/ImageResource.h" |
| +#include "core/page/Page.h" |
| #include "platform/HostWindow.h" |
| #include "wtf/text/StringBuilder.h" |
| #include <limits> |
| @@ -594,7 +595,9 @@ ImageResource* ImageDocument::cachedImageResourceDeprecated() { |
| } |
| bool ImageDocument::shouldShrinkToFit() const { |
| - return frame()->isMainFrame(); |
| + bool isWrapContentWebView = |
| + page() ? page()->settings().getForceZeroLayoutHeight() : false; |
|
pdr.
2017/01/19 03:17:32
Is getForceZeroLayoutHeight causing the height to
aelias_OOO_until_Jul13
2017/01/19 03:53:07
It's used as isWebView (_in_WRAP_CONTENT_mode). T
pdr.
2017/01/19 05:04:27
Could we just add an isWebView() function instead
|
| + return frame()->isMainFrame() && !isWrapContentWebView; |
| } |
| DEFINE_TRACE(ImageDocument) { |