Bug 74670 - Remove legacy node types
Summary: Remove legacy node types
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 91316
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-15 17:32 PST by Ojan Vafai
Modified: 2016-08-04 14:18 PDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2011-12-15 17:32:06 PST
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.
Comment 1 Chris Dumez 2016-08-04 14:16:56 PDT
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.
Comment 2 Chris Dumez 2016-08-04 14:17:52 PDT
(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