Bug 256640 - Partial Sync 'TextDecoderStream.idl' based on WebIDL Spec
Summary: Partial Sync 'TextDecoderStream.idl' based on WebIDL Spec
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-05-11 04:42 PDT by Ahmad Saleem
Modified: 2023-10-21 12:10 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-05-11 04:42:11 PDT
Hi Team,

It is just to align WebKit's TextDecoderStream.idl file with Web-Spec:

Web-Spec: https://encoding.spec.whatwg.org/#interface-textdecoderstream

We have:

constructor(optional DOMString label, optional any options);

While as per spec, it should be:

constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {});

___________

Changing above works and does progress any WPT but align us with web-spec.

___________

Similarly, spec has also to add this:

TextDecoderStream includes TextDecoderCommon;
TextDecoderStream includes GenericTransformStream;

___________

But just want it to be partial to fix 'constructor' bit rather than latter.

Thanks!
Comment 1 Radar WebKit Bug Importer 2023-05-18 04:43:18 PDT
<rdar://problem/109508762>
Comment 2 Anne van Kesteren 2023-09-25 01:57:07 PDT
Youenn should probably look at this. It's not clear to me this helps as it's implemented in JS rather than C++.
Comment 3 youenn fablet 2023-09-25 05:43:41 PDT
I think this is handled by JS built-in.
As a pure refactoring, we could try to move this code to C++ now that we have better C++ wrappers for readable/writable.
Comment 4 Ahmad Saleem 2023-09-27 14:52:30 PDT
I raised this because we were still failing three WPT test cases (sub-tests here):

https://wpt.fyi/results/encoding/idlharness.any.html?label=master&label=experimental&aligned&q=safari%3Afail

Live Link - http://wpt.live/encoding/idlharness.any.html

_________

>> TextDecoderStream interface: attribute encoding	
>> TextDecoderStream interface: attribute fatal	
>> TextDecoderStream interface: attribute ignoreBOM	

___

We fail one in 'TextEncoderStream' as well:

>> TextEncoderStream interface: attribute encoding
Comment 5 Ahmad Saleem 2023-09-27 14:53:38 PDT
(In reply to Ahmad Saleem from comment #4)
> I raised this because we were still failing three WPT test cases (sub-tests
> here):
> 
> https://wpt.fyi/results/encoding/idlharness.any.
> html?label=master&label=experimental&aligned&q=safari%3Afail
> 
> Live Link - http://wpt.live/encoding/idlharness.any.html
> 
> _________
> 
> >> TextDecoderStream interface: attribute encoding	
> >> TextDecoderStream interface: attribute fatal	
> >> TextDecoderStream interface: attribute ignoreBOM	
> 
> ___
> 
> We fail one in 'TextEncoderStream' as well:
> 
> >> TextEncoderStream interface: attribute encoding

Ignore - running directly in Safari 17 - we pass it (macOS Sonoma).
Comment 6 Ahmad Saleem 2023-10-21 12:10:10 PDT
We are passing this now reliably in Safari Technology Preview 181 in WPT runs.

Closing as 'RESOLVED CONFIGURATION CHANGED'.