Chromium Code Reviews| Index: Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp |
| diff --git a/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp b/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp |
| index 44fafb8bfeaa6d0bd913355f295ce68f3aae8b88..f6684338c523ea097fcffaccf00d9274ecbbce6c 100644 |
| --- a/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp |
| +++ b/Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp |
| @@ -57,6 +57,7 @@ |
| #include "platform/RuntimeEnabledFeatures.h" |
| #include "platform/fonts/FontCache.h" |
| #include "platform/geometry/TransformState.h" |
| +#include "platform/graphics/BitmapImage.h" |
| #include "platform/graphics/GraphicsContext.h" |
| #include "platform/graphics/paint/ClipDisplayItem.h" |
| #include "platform/graphics/paint/DisplayItemList.h" |
| @@ -1851,7 +1852,11 @@ bool CompositedDeprecatedPaintLayerMapping::isDirectlyCompositedImage() const |
| return false; |
| Image* image = cachedImage->imageForLayoutObject(imageLayoutObject); |
| - return image->isBitmapImage(); |
| + if (!image->isBitmapImage()) |
| + return false; |
| + |
| + return imageLayoutObject->style()->respectImageOrientation() != RespectImageOrientation |
| + || toBitmapImage(image)->size() == toBitmapImage(image)->sizeRespectingOrientation(); |
|
Noel Gordon
2015/06/12 16:21:04
The first part of the clause looks right to me. B
rwlbuis
2015/06/15 17:21:52
Done.
|
| } |
| return false; |