Bug 15544 - Wrong node used for range adjustment in the remove mutation
Wrong node used for range adjustment in the remove mutation
Status: RESOLVED FIXED
Product: WebAppsWG
Classification: Unclassified
Component: DOM
unspecified
All All
: P2 normal
: ---
Assigned To: Aryeh Gregor
public-webapps-bugzilla
http://dvcs.w3.org/hg/domcore/raw-fil...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-13 15:54 UTC by Stig Halvorsen
Modified: 2012-01-17 16:34 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stig Halvorsen 2012-01-13 15:54:51 UTC
In step 2 and 3 in the description of the remove mutation in DOMCore [1], the spec states that:

 "For each range whose start/end node is a descendant of _parent_, set its start/end to (parent, index)."

That doesn't seem to be what browsers do.

What browsers do seems to be more like:

 "For each range whose start/end node is a descendant of _child_, set its start/end to (parent, index)."

Which makes more sense, since child is being removed here and boundary points under child will be gone after the mutation, and so setting them to an offset of the parent seems appropriate.

[1] http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node-remove
Comment 1 Aryeh Gregor 2012-01-17 16:34:43 UTC
Thanks!  I've fixed it:

http://dvcs.w3.org/hg/domcore/rev/8fd99dd0579b