Use spec compliant content-type extraction in more places and enable a <stylesheet> quirk (#28321)

This changes includes two semi-related things:

1. Fixes some specification compliance issues when parsing mime
   types and charsets for `XMLHttpRequest`.
2. Implements a `<stylesheet>` parsing quirk involving mime types.

Testing: There are tests for these changes.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Vincent Ricard 2025-05-19 13:38:01 +02:00 committed by GitHub
parent d8837e4a52
commit 6e97fc0bc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 231 additions and 1148 deletions

View file

@ -2,41 +2,23 @@
[text/html;x=(;charset=gbk]
expected: FAIL
[text/html ;charset=gbk]
expected: FAIL
[text/html;charset= gbk]
expected: FAIL
[text/html;test;charset=gbk]
expected: FAIL
[text/html;test=;charset=gbk]
expected: FAIL
[text/html;';charset=gbk]
expected: FAIL
[text/html;";charset=gbk]
expected: FAIL
[text/html ; ; charset=gbk]
expected: FAIL
[text/html;;;;charset=gbk]
expected: FAIL
[text/html;charset= ";charset=GBK]
expected: FAIL
[text/html;charset=";charset=foo";charset=GBK]
expected: FAIL
[text/html;charset="gbk]
expected: FAIL
[text/html;charset="gbk"x]
expected: FAIL
[text/html;test=ÿ;charset=gbk]
expected: FAIL
[text/html;charset=" gbk"]
expected: FAIL
[text/html;charset="gbk "]
expected: FAIL
[text/html;charset="\\ gbk"]
expected: FAIL

File diff suppressed because it is too large Load diff