diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-14 11:46:21 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-14 11:46:21 +0100 |
commit | 91799767e1c575dce6cdb1528f1f10a1fd62e35f (patch) | |
tree | 48d925ea0d3123ef18d8a810724b3cdf7ad3b734 /dom/canvas/ImageBitmapRenderingContext.cpp | |
parent | 0e80d10f4a10496a6657df210ff45a89fba68a75 (diff) | |
download | uxp-91799767e1c575dce6cdb1528f1f10a1fd62e35f.tar.gz |
Implement origin-clean algorithm for ImageBitmap.
This resolves #973.
Diffstat (limited to 'dom/canvas/ImageBitmapRenderingContext.cpp')
-rw-r--r-- | dom/canvas/ImageBitmapRenderingContext.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dom/canvas/ImageBitmapRenderingContext.cpp b/dom/canvas/ImageBitmapRenderingContext.cpp index 8f50745542..ad313906a3 100644 --- a/dom/canvas/ImageBitmapRenderingContext.cpp +++ b/dom/canvas/ImageBitmapRenderingContext.cpp @@ -63,6 +63,11 @@ ImageBitmapRenderingContext::TransferFromImageBitmap(ImageBitmap& aImageBitmap) if (!mImage) { return; } + + // Check if ImageBitmap is tainted, and if so flag the canvas tainted too. + if (aImageBitmap.IsWriteOnly() && mCanvasElement) { + mCanvasElement->SetWriteOnly(); + } Redraw(gfxRect(0, 0, mWidth, mHeight)); } |