From 51ee334329f4a8163bc388d5b7768bc834475a3d Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Tue, 31 Oct 2023 15:38:00 +0100 Subject: [PATCH] Fix incorrect computation in Compute Layout and Allocation Size when figuring out the destination rect This fixes #511. --- index.src.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.src.html b/index.src.html index 1bf05cb7..dad10fde 100644 --- a/index.src.html +++ b/index.src.html @@ -4093,10 +4093,12 @@ to the nearest integer. 9. Set |computedLayout|'s [=computed plane layout/sourceLeftBytes=] to the result of the integer division of - truncated |parsedRect|.{{DOMRectInit/x}} by |sampleWidthBytes|. + truncated |parsedRect|.{{DOMRectInit/x}} by |sampleWidth|, + multiplied by |sampleBytes|. 10. Set |computedLayout|'s [=computed plane layout/sourceWidthBytes=] to the result of the integer division of - truncated |parsedRect|.{{DOMRectInit/width}} by |sampleWidthBytes|. + truncated |parsedRect|.{{DOMRectInit/width}} by |sampleHeight|, + multiplied by |sampleBytes|. 11. If |layout| is not `undefined`: 1. Let |planeLayout| be the {{PlaneLayout}} in |layout| at position |planeIndex|.