DescriptionMake Range::selectNode() and Range::surroundContents() to work with detached node
This patch makes Range::selectNode() and Range::surroundContents() to work with detached node by changing Range::selectNode() to call setStart/setEnd directly instead of via Range::setStartBefore/setEndAfter, which throw exception for detached node.
As of the spec, http://dom.spec.whatwg.org/#interface-range, Range::selectNode() accepts detached node but Range::setStartBefore/setEndAfter don't.
This patch also updates following layout tests:
- LayoutTests/fast/dom/Range/range-exceptions.js
Range::selectNode() for detached node no more throw exception.
- LayoutTests/fast/dom/Range/resources/intersectsNode.js
Range::selectNode() throws an exception with detail message.
BUG=275848
TEST=LayoutTests/fast/dom/Range/selectNode-for-detached-node.html, LayoutTests/fast/dom/Range/surroundContents-for-detached-node.html
Patch Set 1 : 2013-08-22T16:53:38 #
Total comments: 7
Patch Set 2 : 2013-08-22T18:44:46 #Messages
Total messages: 6 (0 generated)
|