Bug 1526218 - transferFromImageBitmap() should propage the origin-clean state to the canvas element. r=aosmond, a=RyanVM DEVEDITION_66_0b7_BUILD1 DEVEDITION_66_0b7_RELEASE FENNEC_66_0b7_BUILD1 FENNEC_66_0b7_RELEASE FIREFOX_66_0b7_BUILD1 FIREFOX_66_0b7_RELEASE
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 11 Feb 2019 16:54:05 +0000
changeset 515884 d9a3fc93437f01530bc58ddf984e75837994cd57
parent 515883 a61f757afab3036bd346a8e1dff36fadafb12fc3
child 515885 3b0339f40a385d8b49ec1035e0b6d2a6baeb2701
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaosmond, RyanVM
bugs1526218
milestone66.0
Bug 1526218 - transferFromImageBitmap() should propage the origin-clean state to the canvas element. r=aosmond, a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D19371
dom/canvas/ImageBitmapRenderingContext.cpp
--- a/dom/canvas/ImageBitmapRenderingContext.cpp
+++ b/dom/canvas/ImageBitmapRenderingContext.cpp
@@ -55,16 +55,20 @@ void ImageBitmapRenderingContext::Transf
     ImageBitmap& aImageBitmap) {
   Reset();
   mImage = aImageBitmap.TransferAsImage();
 
   if (!mImage) {
     return;
   }
 
+  if (aImageBitmap.IsWriteOnly() && mCanvasElement) {
+    mCanvasElement->SetWriteOnly();
+  }
+
   Redraw(gfxRect(0, 0, mWidth, mHeight));
 }
 
 NS_IMETHODIMP
 ImageBitmapRenderingContext::SetDimensions(int32_t aWidth, int32_t aHeight) {
   mWidth = aWidth;
   mHeight = aHeight;
   return NS_OK;