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..7fdf95e08e1ee5067bfd4ba32a2286d50209e498 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,10 @@ 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(); |
|
Yoav Weiss
2015/11/24 14:59:05
I think the extra variable is not really needed
|
| + return cachedImage->imageSize(LayoutObject::shouldRespectImageOrientation(layoutObject), 1.0f); // FIXME: Not sure about this. |
| + } |
| return LayoutSize(); |
| } |