mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #25424 - pshaughn:labelfixes, r=Manishearth
Make labelable element .labels a live list in tree order This is not the highest-performance solution possible but it's visibly spec-aligned in a way a faster-performing implementation would be harder to verify, and I don't expect label-getting to deal with more than a few nodes at once in practice. I added a macro by analogy with some of the existing make_XXX_getter! macros; I will change it if it doesn't seem right. Remaining test failures are because keygen, shadow DOM, and ElementInternals are unimplemented. Shadow DOM should already be handled by the existing code when it is implemented, and keygen should just be able to add a labels_node_list and use the macro like the other labelable elements. ElementInternals labels are slightly different and might need another NodeList case. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [X] These changes fix #25391 <!-- Either: --> - [X] There are tests for these changes, although there's room for more (see https://github.com/web-platform-tests/wpt/issues/21028) <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
fd2950e903
14 changed files with 161 additions and 102 deletions
|
@ -1,31 +1,3 @@
|
|||
[label-attributes.sub.html]
|
||||
[The labeled control for a label element that has no 'for' attribute is the first labelable element which is a descendant of that label element.]
|
||||
expected: FAIL
|
||||
|
||||
[A non-control follows by a control with same ID.]
|
||||
expected: FAIL
|
||||
|
||||
[A labelable element is moved to outside of nested associated labels.]
|
||||
expected: FAIL
|
||||
|
||||
[A labelable element is moved to inside of nested associated labels.]
|
||||
expected: FAIL
|
||||
|
||||
[A labelable element which is a descendant of non-labelable element is moved to outside of associated label.]
|
||||
expected: FAIL
|
||||
|
||||
[A labelable element is moved to iframe.]
|
||||
expected: FAIL
|
||||
|
||||
[A div element which contains labelable element is removed.]
|
||||
expected: FAIL
|
||||
|
||||
[A labelable element not in a document can label element in the same tree.]
|
||||
expected: FAIL
|
||||
|
||||
[A labelable element inside the shadow DOM.]
|
||||
expected: FAIL
|
||||
|
||||
[A form control has an implicit label.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -2,7 +2,3 @@
|
|||
type: testharness
|
||||
[Check if the keygen element is a labelable element]
|
||||
expected: FAIL
|
||||
|
||||
[Check if the hidden input element has null 'labels']
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue