# HG changeset patch # User stighal@opera.com # Date 1326711489 -3600 # Branch stighal_patch_02 # Node ID 855f2217db367a281dab64dcb5338d0dc3537e2e # Parent a1e9690cb3f027889cc976337ac3b6f5832b5b6a Fixup! According to point 10 in the Range spec for insertNode() [1], the end should be set to (parent, new offset) if start and end points are equal after pre-inserting the new node. [1] http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-range-insertnode diff -r a1e9690cb3f0 -r 855f2217db36 DOMCore/tests/approved/common.js --- a/DOMCore/tests/approved/common.js Fri Jan 13 15:45:22 2012 +0100 +++ b/DOMCore/tests/approved/common.js Mon Jan 16 11:58:09 2012 +0100 @@ -867,7 +867,7 @@ // "Add node's length to new offset, if node is a DocumentFragment. Otherwise add one to new offset." if (newNode.nodeType == Node.DOCUMENT_FRAGMENT_NODE) { - newOffset += newNode.length; + newOffset += nodeLength(newNode); } else { newOffset++; }