Bug 15892 - DOM Range operations are not implemented for ProcessingInstruction nodes
Summary: DOM Range operations are not implemented for ProcessingInstruction nodes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-07 22:53 PST by Alexey Proskuryakov
Modified: 2019-02-06 09:02 PST (History)
1 user (show)

See Also:


Attachments
proposed fix (9.37 KB, patch)
2007-11-07 22:58 PST, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2007-11-07 22:53:11 PST
ProcessingInstruction nodes are ignored in Range.deleteContents, Range.cloneContents and Range.extractContents.

This is not a very big deal, since neither Firefox nor Opera support these operations on ProcessingInstructions. However, WebKit behavior is already different: we let Ranges start/end in ProcessingInstruction text, while other browsers raise INDEX_SIZE_ERR. Seems logical to implement the rest of the spec in this case.

<http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html>: "INDEX_SIZE_ERR: Raised if offset is negative or greater than the number of child units in refNode. Child units are 16-bit units if refNode is a type of CharacterData node (e.g., a Text or Comment node) or a ProcessingInstruction node. Child units are Nodes in all other cases."
Comment 1 Alexey Proskuryakov 2007-11-07 22:58:38 PST
Created attachment 17117 [details]
proposed fix
Comment 2 Darin Adler 2007-11-10 12:15:17 PST
Comment on attachment 17117 [details]
proposed fix

r=me
Comment 3 Alexey Proskuryakov 2007-11-10 12:27:53 PST
Committed revision 27665.
Comment 4 Lucas Forschler 2019-02-06 09:02:33 PST
Mass moving XML DOM bugs to the "DOM" Component.