Chromium Code Reviews| Index: third_party/WebKit/Source/core/fetch/ImageResource.h |
| diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.h b/third_party/WebKit/Source/core/fetch/ImageResource.h |
| index 43eeabf34b94c428a1504b569be43dc684c485ac..4044423f7b46112f7d1f2d56a53769232b162be8 100644 |
| --- a/third_party/WebKit/Source/core/fetch/ImageResource.h |
| +++ b/third_party/WebKit/Source/core/fetch/ImageResource.h |
| @@ -29,6 +29,7 @@ |
| #include "platform/geometry/IntSizeHash.h" |
| #include "platform/geometry/LayoutSize.h" |
| #include "platform/graphics/ImageObserver.h" |
| +#include "platform/graphics/ImageOrientation.h" |
| #include "wtf/HashMap.h" |
| namespace blink { |
| @@ -68,7 +69,7 @@ public: |
| bool willPaintBrokenImage() const; |
| // Assumes that image rotation or scale doesn't effect the image size being empty or not. |
| - bool canRender() { return !errorOccurred() && !imageSizeForLayoutObject(nullptr, 1).isEmpty(); } |
| + bool canRender() { return !errorOccurred() && !imageSize(DoNotRespectImageOrientation, 1).isEmpty(); } |
|
Yoav Weiss
2015/11/24 10:29:07
It adds an extra call, but it might be better to h
davve
2015/11/24 13:33:33
fetch/ shouldn't depend on the rest of core/ (see
|
| bool usesImageContainerSize() const; |
| bool imageHasRelativeWidth() const; |
| @@ -82,7 +83,7 @@ public: |
| IntrinsicCorrectedToDPR, // Report the intrinsic size corrected to account for image density. |
| }; |
| // This method takes a zoom multiplier that can be used to increase the natural size of the image by the zoom. |
| - LayoutSize imageSizeForLayoutObject(const LayoutObject*, float multiplier, SizeType = IntrinsicSize); // returns the size of the complete image. |
| + LayoutSize imageSize(RespectImageOrientationEnum shouldRespectImageOrientation, float multiplier, SizeType = IntrinsicSize); |
| void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio); |
| bool isAccessAllowed(SecurityOrigin*); |