Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1349)

Unified Diff: Source/core/imagebitmap/ImageBitmapFactories.cpp

Issue 758493004: canvas: make a temporary buffer when a context doesn't exist. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rename to isPaintable() Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/imagebitmap/ImageBitmapFactories.cpp
diff --git a/Source/core/imagebitmap/ImageBitmapFactories.cpp b/Source/core/imagebitmap/ImageBitmapFactories.cpp
index ac39e7032e001e5c89048930235a59cff6d70ac8..148046f7de8c6c71750055cbc4e183d5954cb6e2 100644
--- a/Source/core/imagebitmap/ImageBitmapFactories.cpp
+++ b/Source/core/imagebitmap/ImageBitmapFactories.cpp
@@ -178,7 +178,7 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState,
}
// FIXME: make ImageBitmap creation asynchronous crbug.com/258082
- return fulfillImageBitmap(scriptState, canvas->buffer() ? ImageBitmap::create(canvas, IntRect(sx, sy, sw, sh)) : nullptr);
+ return fulfillImageBitmap(scriptState, canvas->isPaintable() ? ImageBitmap::create(canvas, IntRect(sx, sy, sw, sh)) : nullptr);
}
ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState, EventTarget& eventTarget, Blob* blob, ExceptionState& exceptionState)

Powered by Google App Engine
This is Rietveld 408576698