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

Unified Diff: Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp

Issue 1162793003: Add CSS image-orientation: from-image (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improved check Created 5 years, 6 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: 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;

Powered by Google App Engine
This is Rietveld 408576698