Spec differentiates between ImageDecoder initialization with unsupported non-image MIME type and an unsupported image MIME type
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Đọc các phần ImageDecoder constructor, valid ImageDecoderInit, valid image MIME type và Configure the ImageDecoder được liên kết trong issue. So sánh các lỗi được nêu trong đó với WPT tại dòng 163 của image-decoder.https.any.js. Hoàn thành khi đạt được sự thống nhất về việc cần sửa specification hay test và ghi lại behavior đã được giải quyết.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
There is a WPT that checks for a NotSupportedError promise rejection when the MIME type "junk/type"
https://github.com/web-platform-tests/wpt/blob/53a1437dcfc754a3dc8ffe0bd34f9a6524e49fcf/webcodecs/image-decoder.https.any.js#L163
This conflicts with a strict reading of the spec:
From https://w3c.github.io/webcodecs/#imagedecoder-constructor:
"If init is not valid ImageDecoderInit, throw a TypeError."
From https://w3c.github.io/webcodecs/#valid-imagedecoderinit:
"1. If type is not a valid image MIME type, return false."
From https://w3c.github.io/webcodecs/#valid-image-mime-type:
"A valid image MIME type is a string that is a valid MIME type string and for which the type, per Section 8.3.1 of [RFC9110], is image."
From https://w3c.github.io/webcodecs/#configure-the-image-decoder
"1. Let supported be the result of running the Check Type Support algorithm with init.type."
"2. If supported is false, run the Close ImageDecoder algorithm with a NotSupportedError DOMException and return "processed"."
If we put all this together, my reading of it says that if the MIME type supplied is anything besides "image/XXX", we should throw a TypeError in the ImageDecoder constructor. If we don't support XXX, then we should reject the ImageDecoder [[completed promise]] and ImageTrackList [[ready promise]] with NotSupportedError.
Is this what we want? I don't have any strong feelings either way, just want to understand if the test is wrong, or if this is an inconsistency in the spec that we want to correct.
- Ngôn ngữ chính
- HTML
- Star
- 1.3k
- Fork
- 192
- Merge trung bình
- 3 giờ 36 phút
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của w3c/webcodecs
-
privacy-needs-resolution
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
editorial
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
TPAC2026
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 8/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của w3c/webcodecs
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
FuRongJun-1999/dsh-memory#170 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
[BUG] Re-subscribing the Mono returned by listTools/listResources/listResourceTemplates/listPrompts/listRoots duplicates the resultsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/java-sdk#1174 · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[BUG] 运行位置的分支列表不自动刷新,外部新建的分支看不到Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NanmiCoder/cc-haha#1533 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Remove song from playlistĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
maxrave-dev/SimpMusic#2649 ·
Maintainer thường phản hồi trong vòng 2 ngày