Bug 74670
Summary: | Remove legacy node types | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ojan Vafai <ojan> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | adamk, annevk, ap, arv, cdumez, darin, rniwa, syoichi |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 91316 | ||
Bug Blocks: |
Ojan Vafai
http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
DOM4 removes a bunch of node types. We should remove them from webcore.
const unsigned short ATTRIBUTE_NODE = 2; // historical
const unsigned short CDATA_SECTION_NODE = 4; // historical
const unsigned short ENTITY_REFERENCE_NODE = 5; // historical
const unsigned short NOTATION_NODE = 12; // historical
There's already bug 74371 for attributes.
It appears that ENTITY_REFERENCE_NODE can only be created in XML documents by script calling document.createEntityReference. I think we can safely remove them. This will also have the added benefit of improving appendChild/insertBefore performance.
I haven't looked into cdata_section or notation.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Chris Dumez
The following were already removed:
const unsigned short ENTITY_REFERENCE_NODE = 5; // historical
const unsigned short NOTATION_NODE = 12; // historical
I believe Anne plans to add CDATA_SECTION_NODE / ATTRIBUTE_NODE back into the DOM specification this month because no major browser has been able to drop them.
Chris Dumez
(In reply to comment #1)
> The following were already removed:
> const unsigned short ENTITY_REFERENCE_NODE = 5; // historical
> const unsigned short NOTATION_NODE = 12; // historical
>
> I believe Anne plans to add CDATA_SECTION_NODE / ATTRIBUTE_NODE back into
> the DOM specification this month because no major browser has been able to
> drop them.
Referring to Anne's recent comment on https://github.com/whatwg/dom/issues/102#issuecomment-236141842