Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 95b3748aa99a86fa04bf625ac3b70d6def411391
      
https://github.com/WebKit/WebKit/commit/95b3748aa99a86fa04bf625ac3b70d6def411391
  Author: Said Abou-Hallawa <[email protected]>
  Date:   2026-08-14 (Fri, 14 Aug 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any.worker-expected.txt
    M 
LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any-expected.txt
    M 
LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any.worker-expected.txt
    M Source/WebCore/Modules/webcodecs/WebCodecsImageDecoder.cpp
    M Source/WebCore/Modules/webcodecs/WebCodecsImageDecoder.h

  Log Message:
  -----------
  WebCodecsImageDecoder should return a Promise rejected if the mime type is 
not supported
https://bugs.webkit.org/show_bug.cgi?id=321733
rdar://184864621

Reviewed by Tim Nguyen.

Per the spec [1]: "Calling decode() on the constructed ImageDecoder will trigger
a NotSupportedError if the User Agent does not support type."

Handling the case of unsupported mime type is not implemented in the constructor
and the decode() method.

Also the type attribute of WebCodecsImageDecoder has to return what was passed 
in
the type of ImageDecoderInit when it is created. Currently it always returns an
empty string.

https://w3c.github.io/webcodecs/#dom-imagedecoder-imagedecoder

* 
LayoutTests/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any.worker-expected.txt:
* 
LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any-expected.txt:
* 
LayoutTests/platform/glib/imported/w3c/web-platform-tests/webcodecs/image-decoder.https.any.worker-expected.txt:
* Source/WebCore/Modules/webcodecs/WebCodecsImageDecoder.cpp:
(WebCore::WebCodecsImageDecoder::WebCodecsImageDecoder):
(WebCore::WebCodecsImageDecoder::sinkStreamToInternalDecoder):
(WebCore::WebCodecsImageDecoder::setInternalDecoderData):
(WebCore::WebCodecsImageDecoder::decode):
(WebCore::WebCodecsImageDecoder::isTypeSupported):
* Source/WebCore/Modules/webcodecs/WebCodecsImageDecoder.h:

Canonical link: https://commits.webkit.org/319171@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to