Index: Source/core/rendering/RenderImage.cpp |
diff --git a/Source/core/rendering/RenderImage.cpp b/Source/core/rendering/RenderImage.cpp |
index e622c9c11317792966e7f71abf6e04e1b55f2bdd..8a2c63775e4dd2ad008ce5c12544385ffb0da329 100644 |
--- a/Source/core/rendering/RenderImage.cpp |
+++ b/Source/core/rendering/RenderImage.cpp |
@@ -517,6 +517,9 @@ bool RenderImage::foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, |
// Background shows in padding area. |
if ((backgroundClip == BorderFillBox || backgroundClip == PaddingFillBox) && style()->hasPadding()) |
return false; |
+ // Object-position may leave parts of the content box empty, regardless of the value of object-fit. |
+ if (style()->objectPosition() != RenderStyle::initialObjectPosition()) |
+ return false; |
// Object-fit may leave parts of the content box empty. |
ObjectFit objectFit = style()->objectFit(); |
if (objectFit != ObjectFitFill && objectFit != ObjectFitCover) |