Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutImage.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutImage.cpp b/third_party/WebKit/Source/core/layout/LayoutImage.cpp |
| index e2c218ee307c366118ab6f71b3422e6b565abd64..41032bd16efc128b49743304bb8253b84473600a 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutImage.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutImage.cpp |
| @@ -216,7 +216,7 @@ bool LayoutImage::foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, |
| { |
| if (!m_imageResource->hasImage() || m_imageResource->errorOccurred()) |
| return false; |
| - if (m_imageResource->cachedImage() && !m_imageResource->cachedImage()->isLoaded()) |
| + if (!m_imageResource->cachedImage() || !m_imageResource->cachedImage()->isLoaded()) |
| return false; |
| if (!contentBoxRect().contains(localRect)) |
| return false; |
| @@ -234,8 +234,6 @@ bool LayoutImage::foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, |
| ObjectFit objectFit = style()->getObjectFit(); |
| if (objectFit != ObjectFitFill && objectFit != ObjectFitCover) |
| return false; |
| - if (!m_imageResource->cachedImage()) |
|
chrishtr
2016/08/09 16:05:17
?
Xianzhu
2016/08/09 18:51:48
This is combined into the condition at line 219.
chrishtr
2016/08/09 22:07:54
Ah ok.
|
| - return false; |
| // Check for image with alpha. |
| TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", "data", InspectorPaintImageEvent::data(this, *m_imageResource->cachedImage())); |
| return m_imageResource->cachedImage()->getImage()->currentFrameKnownToBeOpaque(Image::PreCacheMetadata); |