mirror of
https://github.com/servo/servo.git
synced 2025-09-23 05:10:09 +01:00
html: Check the <source> MIME type on the source set updating (#39353)
Follow the HTML specification and check if the source element's MIME type ('type' attribute) is supported while updating the source set of the image element (step 5.8) https://html.spec.whatwg.org/multipage/#update-the-source-set Also add the missing descriptions for steps for the old and new methods: - selecting an image source - creating a source set from attributes - updating the source set - normalizing the source densities Testing: Improvements in the following tests - html/semantics/embedded-content/the-img-element/update-the-source-set.html - resource-timing/initiator-type/picture.html Fixes: #36675 Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
This commit is contained in:
parent
84577c9fd4
commit
c017420ee7
3 changed files with 176 additions and 142 deletions
|
@ -1,21 +0,0 @@
|
|||
[update-the-source-set.html]
|
||||
[<picture><source srcset="data:,b" type=""><img src="data:,a" data-expect="data:,b"></picture>]
|
||||
expected: FAIL
|
||||
|
||||
[<picture><source srcset="data:,b" type=" "><img src="data:,a" data-expect="data:,b"></picture>]
|
||||
expected: FAIL
|
||||
|
||||
[<picture><source srcset="data:,b" type=" image/gif"><img src="data:,a" data-expect="data:,b"></picture>]
|
||||
expected: FAIL
|
||||
|
||||
[<picture><source srcset="data:,b" type="image/gif "><img src="data:,a" data-expect="data:,b"></picture>]
|
||||
expected: FAIL
|
||||
|
||||
[<picture><source srcset="data:,b" type="image/gif;encodings"><img src="data:,a" data-expect="data:,b"></picture>]
|
||||
expected: FAIL
|
||||
|
||||
[<picture><source srcset="data:,b" type="image/*"><img src="data:,a" data-expect="data:,a"></picture>]
|
||||
expected: FAIL
|
||||
|
||||
[<picture><source srcset="data:,b" type="image/foobarbaz"><img src="data:,a" data-expect="data:,a"></picture>]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[picture.html]
|
||||
[The initiator type for <img> in a <picture> must be 'img']
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue