Closed Bug 1870116 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 43673 - Throw exceptions for malformed operations while layers are opened

Categories

(Core :: Graphics: Canvas2D, task, P4)

task

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 43673 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/43673
Details from upstream follow.

Andres Ricardo Perez <andresrperez@chromium.org> wrote:

Throw exceptions for malformed operations while layers are opened

Since layers are only filtered and composited into their parent bitmap
once the layer is closed, operations that access bitmap pixels are
malformed if there are layers open.

This can happen when reading the pixels from the canvas (for example
with getImageData) or directly overwriting pixels (with
putImageData).

With this change, exceptions are thrown in the missing cases for these
malformed operations. Promises also fail in the case of
createImageBitmap and convertToBlob.

The existing tests for unclosed layers had to be moved to manual, since for the offscreen and worker cases the generator uses methods that now throw exceptions.

Bug: 1396372
Change-Id: I3e187c9ae4f68135219a6178adf079616c470f9b

Reviewed-on: https://chromium-review.googlesource.com/5075139
WPT-Export-Revision: 2dc7cad138b219eefb910a80edc49fc46aca0bfe

Component: web-platform-tests → Graphics: Canvas2D
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 25 tests

Status Summary

Firefox

OK : 18
PASS : 1
FAIL : 1[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview] 19[Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt, GitHub]
TIMEOUT: 5

Chrome

OK : 18
PASS : 12
FAIL : 13

Safari

OK : 18
PASS : 1
FAIL : 19
TIMEOUT: 5

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

  • /html/canvas/element/layers/2d.layer.flush-on-frame-presentation.html [wpt.fyi]: SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt], TIMEOUT [GitHub] (Chrome: PASS, Safari: TIMEOUT)
  • /html/canvas/offscreen/manual/layers/unclosed-layers.html [wpt.fyi]: SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt], TIMEOUT [GitHub] (Chrome: PASS, Safari: TIMEOUT)
  • /html/canvas/offscreen/manual/layers/unclosed-layers.w.html [wpt.fyi]: SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt], TIMEOUT [GitHub] (Chrome: PASS, Safari: TIMEOUT)
  • /html/canvas/offscreen/manual/layers/unclosed-nested-layers.html [wpt.fyi]: SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt], TIMEOUT [GitHub] (Chrome: PASS, Safari: TIMEOUT)
  • /html/canvas/offscreen/manual/layers/unclosed-nested-layers.w.html [wpt.fyi]: SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt], TIMEOUT [GitHub] (Chrome: PASS, Safari: TIMEOUT)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d0a86bdacc07 [wpt PR 43673] - Throw exceptions for malformed operations while layers are opened, a=testonly https://hg.mozilla.org/integration/autoland/rev/6afd0166b7fe [wpt PR 43673] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
You need to log in before you can comment on or make changes to this bug.