Bug 250659

Summary: ImageData object must initialize to source when the source is provided
Product: WebKit Reporter: Karl Dubost <karlcow>
Component: CanvasAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: dino, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar, WPTImpact
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
URL: https://wpt.fyi/results/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.html?label=experimental&label=master&aligned

Karl Dubost
Reported 2023-01-15 18:25:54 PST
Test to reproduce the issue var array = new Uint8ClampedArray(8); var imgdata = new window.ImageData(array, 1, 2); imgdata.data === array; This returns false in Safari and true in Firefox and Chrome. The spec says: > If source was given, then initialize the data attribute of imageData to source.https://html.spec.whatwg.org/multipage/canvas.html#initialize-an-imagedata-object This makes Safari fail https://github.com/web-platform-tests/wpt/blob/7a0b0c285b91a0b1fa08da58c964b82e5cf40733/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.html#L28 https://wpt.fyi/results/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.html?label=experimental&label=master&aligned
Attachments
Radar WebKit Bug Importer
Comment 1 2023-01-15 18:26:05 PST
Note You need to log in before you can comment on or make changes to this bug.