mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Past names expire when form owner is reset
This commit is contained in:
parent
1d645f3741
commit
9ff6717992
2 changed files with 7 additions and 3 deletions
|
@ -1081,6 +1081,13 @@ impl HTMLFormElement {
|
|||
.iter()
|
||||
.position(|c| &**c == control)
|
||||
.map(|idx| controls.remove(idx));
|
||||
|
||||
// https://html.spec.whatwg.org/multipage#forms.html#the-form-element:past-names-map-5
|
||||
// "If an element listed in a form element's past names map
|
||||
// changes form owner, then its entries must be removed
|
||||
// from that map."
|
||||
let mut past_names_map = self.past_names_map.borrow_mut();
|
||||
past_names_map.retain(|_k, v| v.0 != control);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,3 @@
|
|||
[Trying to set an expando that would shadow an already-existing named property]
|
||||
expected: FAIL
|
||||
|
||||
[Past names map should work correctly]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue