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

Re: Proposed errata for DOM2 Range regarding insertNode()

From: Olli Pettay <Olli.Pettay@helsinki.fi>
Date: Fri, 23 May 2008 16:38:25 +0300
Message-ID: <4836C8D1.7030803@helsinki.fi>
To: public-webapi@w3.org

Olli Pettay wrote:
> Olli Pettay wrote:
>> Ian Hickson wrote:
>>> The test verifies that when you call insertNode() on a range, the node
>>> that is passed is inserted into the range, as is required by DOM2 range
>>> section 2.9. Inserting Content, sentences 1 and 2 (before and after the
>>> code snippet).
>> The 2nd sentence doesn't require adding node to range. It talks about
>> context tree which isn't the same thing as range.
>> -Olli
> "A node may be inserted into a Range using the following method:"
> - 'may' is pretty vague.
> "The insertNode() method inserts the specified node into the Range's
> context tree. "
> - In 2.2.1 "... the content of a Range must be entirely within the
> subtree rooted by a single Document, DocumentFragment or Attr Node.
> This common ancestor container is known as the root container of the
> Range. The tree rooted by the root container is known as the Range's
> context tree."
> So that doesn't say that the node is inserted to Range, but to
> context tree.
> "The node is inserted at the start boundary-point of the Range, without
> modifying it."
> What does the 'it' actually refer to? Boundary-point or Range or node?
> And since end boundary-point isn't mentioned, one could argue that the
> behavior defined in 2.12.1 should be used. When the range is collapsed,
> the following:
> "Note that when content is inserted at a boundary-point, it is
> ambiguous as to where the boundary-point should be repositioned if
> its relative position is to be maintained. There are two
> possibilities: at the start or at the end of the newly inserted
> content. We have chosen that in this case neither the container nor
> offset of the boundary-point is changed. As a result, the
> boundary-point will be positioned at the start of the newly inserted
> content."
> -Olli
So I'm not sure the errata for this issue is actually needed.
(In which case ACID3 should be changed)
Received on Friday, 23 May 2008 13:39:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:10:02 UTC