This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In the steps given in the "To split a Text node [...] run these steps" section (see http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-text-split) there are a few logical errors that I'd like to point out. For step 8, substeps 1 and 2: "1. For each range whose start node is node, start offset is greater than or equal to offset, and end offset is greater than offset, set both its start node and end node to new node and decrease its start offset and end offset by offset. 2. For each range whose end node is node and end offset is greater than offset, set its end offset is offset." and for steps 9 and 10: "9. For each range whose start node is node and start offset is greater than offset, set its start node to new node and decrease its start offset by offset. 10. For each range whose end node is node and end offset is greater than offset, set its end node to new node and decrease its end offset by offset." As a reminder, each range's boundary point's offset must be a value from 0 (inclusive) to the node length (exclusive). So, these steps should be changed to read ... "1. For each range whose start node is node, start offset is greater than or equal to offset, and end offset is greater than OR EQUAL TO offset, set both its start node and end node to new node and decrease its start offset and end offset by offset. 2. For each range whose end node is node and end offset is greater than OR EQUAL TO offset, set its end offset is offset." ... and ... "9. For each range whose start node is node and start offset is greater than OR EQUAL TO offset, set its start node to new node and decrease its start offset by offset. 10. For each range whose end node is node and end offset is greater than OR EQUAL TO offset, set its end node to new node and decrease its end offset by offset." These modifications prevent a range boundary's offset from being set to the node's length.
I fixed the typo, but the essence here is correct. Unless end offset is actually greater, nothing needs to be done. Note that start offset cannot be greater while end offset is not. https://bitbucket.org/ms2ger/dom-core/changeset/be8a6d334ecf Thanks for your feedback!