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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 2251493003: Adding nullability support to ImageBitmapRenderingContext.transferImageBitmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing final comments. Created 4 years, 4 months 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: 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 bb8273c54fa8abfdd2bc0caabca7139c45e94571..8acc2bacb2dcfb57d8a58d0bf75a673686d0c2e9 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -257,8 +257,8 @@ bool HTMLCanvasElement::isPaintable() const
{
if (!m_context)
return ImageBuffer::canCreateImageBuffer(size());
- if (renderingContext()->getImage())
- return true;
+ if (m_context->getContextType() == CanvasRenderingContext::ContextImageBitmap)
+ return (renderingContext()->getImage().get());
return buffer();
}

Powered by Google App Engine
This is Rietveld 408576698