Chromium Code Reviews| Index: third_party/WebKit/Source/modules/imagebitmap/WindowImageBitmapFactories.cpp |
| diff --git a/third_party/WebKit/Source/modules/imagebitmap/WindowImageBitmapFactories.cpp b/third_party/WebKit/Source/modules/imagebitmap/WindowImageBitmapFactories.cpp |
| index 2d02ab5c44381840a71e2e00d80e144cb0477180..527df011ae60c728c5103eb38be1742b73068054 100644 |
| --- a/third_party/WebKit/Source/modules/imagebitmap/WindowImageBitmapFactories.cpp |
| +++ b/third_party/WebKit/Source/modules/imagebitmap/WindowImageBitmapFactories.cpp |
| @@ -42,6 +42,7 @@ |
| #include "core/html/HTMLImageElement.h" |
| #include "core/html/HTMLVideoElement.h" |
| #include "core/html/ImageData.h" |
| +#include "core/layout/LayoutObject.h" |
| #include "core/workers/WorkerGlobalScope.h" |
| #include "modules/canvas2d/CanvasRenderingContext2D.h" |
| #include "platform/SharedBuffer.h" |
| @@ -54,8 +55,12 @@ namespace blink { |
| static LayoutSize sizeFor(HTMLImageElement* image) |
| { |
| - if (ImageResource* cachedImage = image->cachedImage()) |
| - return cachedImage->imageSizeForLayoutObject(image->layoutObject(), 1.0f); // FIXME: Not sure about this. |
| + if (ImageResource* cachedImage = image->cachedImage()) { |
| + LayoutObject* layoutObject = image->layoutObject(); |
| + RespectImageOrientationEnum shouldRespectImageOrientation = |
| + layoutObject ? layoutObject->shouldRespectImageOrientation() : DoNotRespectImageOrientation; |
| + return cachedImage->imageSize(shouldRespectImageOrientation, 1.0f); // FIXME: Not sure about this. |
|
Yoav Weiss
2015/11/24 10:29:07
ditto
davve
2015/11/24 12:49:13
If I had such a function, yes. (again)
|
| + } |
| return LayoutSize(); |
| } |