Chromium Code Reviews| Index: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp |
| diff --git a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp |
| index ba022bd5e935d384778aa0a7db30851442ef4389..3931b164437a4d37e92317a49c7d1391b0749d90 100644 |
| --- a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp |
| +++ b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp |
| @@ -7,6 +7,7 @@ |
| #include "bindings/core/v8/ExceptionMessages.h" |
| #include "bindings/core/v8/ExceptionState.h" |
| #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| +#include "core/css/cssom/CSSURLImageValue.h" |
| #include "core/css/parser/CSSParser.h" |
| #include "core/frame/ImageBitmap.h" |
| #include "core/html/HTMLCanvasElement.h" |
| @@ -865,6 +866,8 @@ static inline void clipRectsToImageRect(const FloatRect& imageRect, FloatRect* s |
| static inline CanvasImageSource* toImageSourceInternal(const CanvasImageSourceUnion& value, ExceptionState& exceptionState) |
| { |
| + if (value.isCSSImageValue()) |
|
ikilpatrick
2016/09/27 18:06:00
it might be worth making this conditional on CSSPa
Gleb Lanbin
2016/09/28 16:58:22
Done.
|
| + return value.getAsCSSImageValue(); |
| if (value.isHTMLImageElement()) |
| return value.getAsHTMLImageElement(); |
| if (value.isHTMLVideoElement()) |