mirror of
https://github.com/servo/servo.git
synced 2025-09-23 05:10:09 +01:00
Auto merge of #25070 - cagandhi:named-form-getter, r=jdm
Named form getter This PR contains changes related to adding named getter in Servo for getting the list of all meaningful property names for a HTMLFormElement object, and getting the value of a specific property name. The following changes have been made: * uncomment the [named getter](f63b404e0c/components/script/dom/webidls/HTMLFormElement.webidl (L30)
) from HTMLFormElement.webidl * add the missing `NamedGetter` and `SupportedPropertyNames` methods to [HTMLFormElement](f63b404e0c/components/script/dom/htmlformelement.rs (L113)
) * implement `SupportedPropertyNames` according to [the specification](https://html.spec.whatwg.org/multipage/forms.html#the-form-element:supported-property-names): * create an enum to represent the `id`, `name`, and `past` states for the sourced names * create a vector of `(SourcedName, DomRoot<HTMLElement>)` by iterating over `self.controls` and checking the element type and calling methods like `HTMLElement::is_listed_element` --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #16479 (GitHub issue number if applicable)
This commit is contained in:
commit
d205194618
8 changed files with 231 additions and 22 deletions
|
@ -1,5 +1,5 @@
|
|||
[form-double-submit-2.html]
|
||||
expected: ERROR
|
||||
expected: TIMEOUT
|
||||
[preventDefault should allow onclick submit() to succeed]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[form-double-submit.html]
|
||||
expected: ERROR
|
||||
expected: TIMEOUT
|
||||
[default submit action should supersede onclick submit()]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -14,3 +14,6 @@
|
|||
[firing an event named submit; form.requestSubmit()]
|
||||
expected: FAIL
|
||||
|
||||
[Cannot navigate (after constructing the entry list)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -6,6 +6,3 @@
|
|||
[The elements must return an HTMLFormControlsCollection object]
|
||||
expected: FAIL
|
||||
|
||||
[The controls must root at the fieldset element]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -3,33 +3,18 @@
|
|||
[Name for a single element should work]
|
||||
expected: FAIL
|
||||
|
||||
[Calling item() on the NodeList returned from the named getter should work]
|
||||
expected: FAIL
|
||||
|
||||
[Indexed getter on the NodeList returned from the named getter should work]
|
||||
expected: FAIL
|
||||
|
||||
[All listed elements except input type=image should be present in the form]
|
||||
expected: FAIL
|
||||
|
||||
[Named elements should override builtins]
|
||||
expected: FAIL
|
||||
|
||||
[The form attribute should be taken into account for named getters (single element)]
|
||||
expected: FAIL
|
||||
|
||||
[The form attribute should be taken into account for named getters (multiple elements)]
|
||||
expected: FAIL
|
||||
|
||||
[Input should only be a named property on the innermost form that contains it]
|
||||
expected: FAIL
|
||||
|
||||
[Trying to set an expando that would shadow an already-existing named property]
|
||||
expected: FAIL
|
||||
|
||||
[Trying to set an expando that shadows a named property that gets added later]
|
||||
expected: FAIL
|
||||
|
||||
[Past names map should work correctly]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue