html: Count <image> attributes state changes as the relevant mutations (#39483)

Follow the HTML specification and take into account that state changes
of the <image> 'crossorigin' and 'referrerpolicy' content attributes
(not 'crossOrigin' and 'referrerPolicy' IDL attributes) should be
counted as relevant mutations.

See https://html.spec.whatwg.org/multipage/#relevant-mutations

Testing: Improvements in the following tests
- html/dom/reflection-embedded.html
-
html/semantics/embedded-content/the-img-element/relevant-mutations.html

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
This commit is contained in:
Andrei Volykhin 2025-09-29 12:00:51 +03:00 committed by GitHub
parent aaa7f83176
commit af74db4e92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 96 additions and 245 deletions

View file

@ -503,168 +503,6 @@
[img.srcset: IDL set to object "test-valueOf"]
expected: FAIL
[img.referrerPolicy: IDL set to ""]
expected: FAIL
[img.referrerPolicy: IDL set to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo "]
expected: FAIL
[img.referrerPolicy: IDL set to undefined]
expected: FAIL
[img.referrerPolicy: IDL set to 7]
expected: FAIL
[img.referrerPolicy: IDL set to 1.5]
expected: FAIL
[img.referrerPolicy: IDL set to "5%"]
expected: FAIL
[img.referrerPolicy: IDL set to "+100"]
expected: FAIL
[img.referrerPolicy: IDL set to ".5"]
expected: FAIL
[img.referrerPolicy: IDL set to true]
expected: FAIL
[img.referrerPolicy: IDL set to false]
expected: FAIL
[img.referrerPolicy: IDL set to object "[object Object\]"]
expected: FAIL
[img.referrerPolicy: IDL set to NaN]
expected: FAIL
[img.referrerPolicy: IDL set to Infinity]
expected: FAIL
[img.referrerPolicy: IDL set to -Infinity]
expected: FAIL
[img.referrerPolicy: IDL set to "\\0"]
expected: FAIL
[img.referrerPolicy: IDL set to object "test-toString"]
expected: FAIL
[img.referrerPolicy: IDL set to object "test-valueOf"]
expected: FAIL
[img.referrerPolicy: IDL set to "xno-referrer"]
expected: FAIL
[img.referrerPolicy: IDL set to "no-referrer\\0"]
expected: FAIL
[img.referrerPolicy: IDL set to "o-referrer"]
expected: FAIL
[img.referrerPolicy: IDL set to "NO-REFERRER"]
expected: FAIL
[img.referrerPolicy: IDL set to "xno-referrer-when-downgrade"]
expected: FAIL
[img.referrerPolicy: IDL set to "no-referrer-when-downgrade\\0"]
expected: FAIL
[img.referrerPolicy: IDL set to "o-referrer-when-downgrade"]
expected: FAIL
[img.referrerPolicy: IDL set to "NO-REFERRER-WHEN-DOWNGRADE"]
expected: FAIL
[img.referrerPolicy: IDL set to "xsame-origin"]
expected: FAIL
[img.referrerPolicy: IDL set to "same-origin\\0"]
expected: FAIL
[img.referrerPolicy: IDL set to "ame-origin"]
expected: FAIL
[img.referrerPolicy: IDL set to "SAME-ORIGIN"]
expected: FAIL
[img.referrerPolicy: IDL set to "ſame-origin"]
expected: FAIL
[img.referrerPolicy: IDL set to "xorigin"]
expected: FAIL
[img.referrerPolicy: IDL set to "origin\\0"]
expected: FAIL
[img.referrerPolicy: IDL set to "rigin"]
expected: FAIL
[img.referrerPolicy: IDL set to "ORIGIN"]
expected: FAIL
[img.referrerPolicy: IDL set to "xstrict-origin"]
expected: FAIL
[img.referrerPolicy: IDL set to "strict-origin\\0"]
expected: FAIL
[img.referrerPolicy: IDL set to "trict-origin"]
expected: FAIL
[img.referrerPolicy: IDL set to "STRICT-ORIGIN"]
expected: FAIL
[img.referrerPolicy: IDL set to "ſtrict-origin"]
expected: FAIL
[img.referrerPolicy: IDL set to "xorigin-when-cross-origin"]
expected: FAIL
[img.referrerPolicy: IDL set to "origin-when-cross-origin\\0"]
expected: FAIL
[img.referrerPolicy: IDL set to "rigin-when-cross-origin"]
expected: FAIL
[img.referrerPolicy: IDL set to "ORIGIN-WHEN-CROSS-ORIGIN"]
expected: FAIL
[img.referrerPolicy: IDL set to "origin-when-croſſ-origin"]
expected: FAIL
[img.referrerPolicy: IDL set to "xstrict-origin-when-cross-origin"]
expected: FAIL
[img.referrerPolicy: IDL set to "strict-origin-when-cross-origin\\0"]
expected: FAIL
[img.referrerPolicy: IDL set to "trict-origin-when-cross-origin"]
expected: FAIL
[img.referrerPolicy: IDL set to "STRICT-ORIGIN-WHEN-CROSS-ORIGIN"]
expected: FAIL
[img.referrerPolicy: IDL set to "ſtrict-origin-when-croſſ-origin"]
expected: FAIL
[img.referrerPolicy: IDL set to "xunsafe-url"]
expected: FAIL
[img.referrerPolicy: IDL set to "unsafe-url\\0"]
expected: FAIL
[img.referrerPolicy: IDL set to "nsafe-url"]
expected: FAIL
[img.referrerPolicy: IDL set to "UNSAFE-URL"]
expected: FAIL
[img.referrerPolicy: IDL set to "unſafe-url"]
expected: FAIL
[img.decoding: typeof IDL attribute]
expected: FAIL

View file

@ -1,9 +0,0 @@
[relevant-mutations.html]
[crossorigin state not changed: empty to anonymous]
expected: FAIL
[crossorigin state not changed: use-credentials to USE-CREDENTIALS]
expected: FAIL
[crossorigin state not changed: anonymous to foobar]
expected: FAIL