Closed
Bug 1318576
Opened 9 years ago
Closed 9 years ago
Past names map is not updated when an element that no longer has a name/id is removed from the form
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla53
| Tracking | Status | |
|---|---|---|
| firefox53 | --- | fixed |
People
(Reporter: myvyang, Assigned: bzbarsky)
References
Details
Attachments
(2 files)
|
372 bytes,
text/html
|
Details | |
|
19.60 KB,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36
Steps to reproduce:
as code attached in attr.html
in other browsers, after removeChild, attributes will be update; but on firefox not.
Actual results:
in firefox, console shows `<input>`
in other browser ,like chrome, safari ,IE, console shows `NamedNodeMap`
Expected results:
run like other browser
Boris, can you check if Gecko behaves normaly according to the specs and the other browsers, please.
Component: Untriaged → DOM
Flags: needinfo?(bzbarsky)
Product: Firefox → Core
| Assignee | ||
Comment 2•9 years ago
|
||
The relevant spec bit here is:
If an element listed in a form element's past names map changes form owner, then its entries must be
removed from that map.
We definitely have code to do that in HTMLFormElement::RemoveElementFromTable. The problem is that this code is only called when the element has a name/id that should place it in the table. I'll write up a fix.
Blocks: 879319
Summary: tag.attributes not update while tag's childNode update → Past names map is not updated when an element that no longer has a name/id is removed from the form
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bzbarsky
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8812408 -
Flags: review?(amarchesini)
| Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(bzbarsky)
Comment 4•9 years ago
|
||
Comment on attachment 8812408 [details] [diff] [review]
Remove entries from a form's past names map when an element is removed from the form, even if that element doesn't have a name or id anymore
Review of attachment 8812408 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/html/HTMLFormElement.cpp
@@ +2560,5 @@
> + if (!aElement->HasFlag(MAY_BE_IN_PAST_NAMES_MAP)) {
> + return;
> + }
> +
> + aElement->UnsetFlags(MAY_BE_IN_PAST_NAMES_MAP);
extra spaces.
Attachment #8812408 -
Flags: review?(amarchesini) → review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2a9eb529688b
Remove entries from a form's past names map when an element is removed from the form, even if that element doesn't have a name or id anymore. r=baku
Comment 6•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•