| Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| index 11eb39f893780a61a2d318887a1b6bf8c3fbf8b7..f830bb8fb77ebc4a7aed291e72a0cc77bd0e8803 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| @@ -118,7 +118,7 @@ PassRefPtr<Image> createTransparentImage(const IntSize& size)
|
| ASSERT(canCreateImageBuffer(size));
|
| RefPtr<SkSurface> surface = adoptRef(SkSurface::NewRasterN32Premul(size.width(), size.height()));
|
| surface->getCanvas()->clear(SK_ColorTRANSPARENT);
|
| - return StaticBitmapImage::create(adoptRef(surface->newImageSnapshot()));
|
| + return StaticBitmapImage::create(adoptRef(surface->newImageSnapshot()), true);
|
| }
|
|
|
| } // namespace
|
| @@ -978,7 +978,7 @@ PassRefPtr<Image> HTMLCanvasElement::getSourceImageForCanvas(SourceImageStatus*
|
| RefPtr<SkImage> image = buffer()->newSkImageSnapshot(hint);
|
| if (image) {
|
| *status = NormalSourceImageStatus;
|
| - return StaticBitmapImage::create(image.release());
|
| + return StaticBitmapImage::create(image.release(), true);
|
| }
|
|
|
| *status = InvalidSourceImageStatus;
|
| @@ -1003,10 +1003,6 @@ IntSize HTMLCanvasElement::bitmapSourceSize() const
|
| ScriptPromise HTMLCanvasElement::createImageBitmap(ScriptState* scriptState, EventTarget& eventTarget, int sx, int sy, int sw, int sh, ExceptionState& exceptionState)
|
| {
|
| ASSERT(eventTarget.toDOMWindow());
|
| - if (!originClean()) {
|
| - exceptionState.throwSecurityError("The canvas element provided is tainted with cross-origin data.");
|
| - return ScriptPromise();
|
| - }
|
| if (!sw || !sh) {
|
| exceptionState.throwDOMException(IndexSizeError, String::format("The source %s provided is 0.", sw ? "height" : "width"));
|
| return ScriptPromise();
|
|
|