From 67177c67220d016f4d1961d4ee85085e6df797b1 Mon Sep 17 00:00:00 2001 From: roytam1 Date: Sat, 24 Sep 2022 23:47:50 +0800 Subject: [PATCH] backout bug1767365 part from rev 591552c5 as it cause crash in viewing https://www.ventusky.com/?w=off --- dom/canvas/CanvasRenderingContext2D.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp index ec19d8385f..c17d3a3999 100644 --- a/dom/canvas/CanvasRenderingContext2D.cpp +++ b/dom/canvas/CanvasRenderingContext2D.cpp @@ -6075,8 +6075,8 @@ CanvasRenderingContext2D::PutImageData_explicit(int32_t aX, int32_t aY, uint32_t return NS_ERROR_FAILURE; } - uint32_t copyX = dirtyRect.x; - uint32_t copyY = dirtyRect.y; + uint32_t copyX = dirtyRect.x - aX; + uint32_t copyY = dirtyRect.y - aY; //uint8_t *src = aArray->Data(); uint8_t *dst = imgsurf->Data(); uint8_t* srcLine = aArray->Data() + copyY * (aW * 4) + copyX * 4;