mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +01:00
Don't count <img> elements with both name and id twice in document's named getter (#37455)
A document's named getter collects elements with either matching name or id's (varies per element type) and returns them . We implement this the following way: * Create an iterator with elements whose `name` attribute matches * Create an iterator with elements whose `id` attribute matches * Concatenate both The spec then asks us if there is more than one element in the list, which we implement by checking whether the iterator returns `None` after we get the first element. However, the same element can appear in both iterators if it is a `img` element and both it's name and id attribute match. Therefore, we need to check if there are more elements *which are not equal to the first one*. Testing: New web platform tests pass --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
ae20cdbdc9
commit
9d10e41a1a
4 changed files with 21 additions and 21 deletions
|
@ -1,9 +0,0 @@
|
|||
[nameditem-01.html]
|
||||
[img elements that have a name and id attribute with same value.]
|
||||
expected: FAIL
|
||||
|
||||
[Dynamically updating the name attribute from img elements, should be accessible by values.]
|
||||
expected: FAIL
|
||||
|
||||
[Dynamically updating the id attribute from img elements, should be accessible by values.]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue