W3C home > Mailing lists > Public > public-webapi@w3.org > May 2008

Re: Proposed errata for DOM2 Range regarding insertNode()

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 14 May 2008 22:15:25 +0000 (UTC)
To: olli@pettay.fi, Boris Zbarsky <bzbarsky@MIT.EDU>
Cc: public-webapi@w3.org
Message-ID: <Pine.LNX.4.62.0805142211110.12907@hixie.dreamhostps.com>

On Wed, 14 May 2008, Olli Pettay wrote:
> 
> > which I believe to be the intent of the specification. This is 
> > implemented by Opera and WebKit already, and is tested by Acid3.
> 
> Gecko does what the current spec says.

All three implementations do what the spec says now -- the spec can be 
interpreted both ways.


> Does web content rely on the current spec behavior?

To my knowledge, very little Web content relies on this spec at all. 
That's why Acid3 tested it, to make it interoperable enough that it could 
be used. :-)


> Did Webkit or Opera change their behavior just to pass ACID3 (but not to 
> follow Range spec)?

I didn't check whether they implemented this before Acid3 or not.


On Wed, 14 May 2008, Boris Zbarsky wrote:
> Ian Hickson wrote:
> > I propose that we change the spec to explicitly say that if you call
> > insertNode() on a collapsed range, the end point offset is increased by one
> 
> Increased at what point in time, exactly?  Specifically, if there is a 
> DOMNodeInserted listener that repositions the range when the node 
> insertion happens, or even mutates the DOM, what is the expected 
> behavior?

DOM2 Range doesn't define anything to this level of detail yet, 
unfortunately. For example regular old insertions and deletions near 
ranges cause changes to the range values but the spec doesn't say if this 
is before or after the events.

It seems that for sanity we should say it happens before, if we specify 
this. Should we do this as a separate errata?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 14 May 2008 22:16:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 14 May 2008 22:16:04 GMT