[Webkit-unassigned] [Bug 227792] New: Canvas and OffscreenCanvas getContext should convert argument to object before trying to convert it to a dictionary
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 8 05:00:56 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=227792
Bug ID: 227792
Summary: Canvas and OffscreenCanvas getContext should convert
argument to object before trying to convert it to a
dictionary
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Canvas
Assignee: webkit-unassigned at lists.webkit.org
Reporter: clord at igalia.com
CC: dino at apple.com
Depends on: 225836
Blocks: 225870
Since r277543, which introduced canvas settings handling, imported/w3c/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.html and the worker equivalent have been failing. This is due to a TypeError when trying to convert the non-object arguments into a dictionary.
Reading the spec, both the section on getContext[1] and the section on context creation[2], it seems that arguments are expected to be converted to either an object or null before being converted to a settings dictionary. As we lack this step, there are more situations where we throw an exception when a compliant browser wouldn't.
[1] https://html.spec.whatwg.org/multipage/canvas.html#dom-offscreencanvas-getcontext
[2] https://html.spec.whatwg.org/multipage/canvas.html#offscreen-2d-context-creation-algorithm
Ms2ger is working on more tests for this in WPT, we should fix this bug and sync those tests here once they exist.
Referenced Bugs:
https://bugs.webkit.org/show_bug.cgi?id=225836
[Bug 225836] Move CanvasRenderingContext2DSettings down to CanvasRenderingContext2DBase so it can be used there (and to support OffscreenCanvas)
https://bugs.webkit.org/show_bug.cgi?id=225870
[Bug 225870] [GLIB] Several offscreen canvas tests are failing since r277543
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210708/24f4ae16/attachment-0001.htm>
More information about the webkit-unassigned
mailing list