corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmke...@apache.org
Subject [28/92] [abbrv] [partial] incubator-corinthia git commit: Add editing code from UX Write
Date Wed, 17 Dec 2014 13:28:38 GMT
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode14-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode14-expected.html b/Editor/tests/dom/moveNode14-expected.html
new file mode 100644
index 0000000..f05211e
--- /dev/null
+++ b/Editor/tests/dom/moveNode14-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>Two</p>
+    <p>
+      <tt/>
+      <span>Zero</span>
+      <span>One</span>
+    </p>
+    <p>Three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode14-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode14-input.html b/Editor/tests/dom/moveNode14-input.html
new file mode 100644
index 0000000..6b75dbf
--- /dev/null
+++ b/Editor/tests/dom/moveNode14-input.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var ps = document.getElementsByTagName("P");
+    var position = new Position(ps[0],0);
+
+    Position_trackWhileExecuting([position],function() {
+        DOM_insertBefore(document.body,ps[0],ps[2]);
+    });
+
+    var tt = DOM_createElement(document,"tt");
+    insertAtPosition(position,tt);
+}
+</script>
+</head>
+<body><p><span>Zero</span><span>One</span></p><p>Two</p><p>Three</p></body></html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode15-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode15-expected.html b/Editor/tests/dom/moveNode15-expected.html
new file mode 100644
index 0000000..18b713e
--- /dev/null
+++ b/Editor/tests/dom/moveNode15-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>Two</p>
+    <p>Three</p>
+    <p>
+      <tt/>
+      <span>Zero</span>
+      <span>One</span>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode15-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode15-input.html b/Editor/tests/dom/moveNode15-input.html
new file mode 100644
index 0000000..18e8ce2
--- /dev/null
+++ b/Editor/tests/dom/moveNode15-input.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var ps = document.getElementsByTagName("P");
+    var position = new Position(ps[0],0);
+
+    Position_trackWhileExecuting([position],function() {
+        DOM_insertBefore(document.body,ps[0],null);
+    });
+
+    var tt = DOM_createElement(document,"tt");
+    insertAtPosition(position,tt);
+}
+</script>
+</head>
+<body><p><span>Zero</span><span>One</span></p><p>Two</p><p>Three</p></body></html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode16-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode16-expected.html b/Editor/tests/dom/moveNode16-expected.html
new file mode 100644
index 0000000..755c665
--- /dev/null
+++ b/Editor/tests/dom/moveNode16-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <tt/>
+      <span>One</span>
+      <span>Zero</span>
+    </p>
+    <p>Two</p>
+    <p>Three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode16-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode16-input.html b/Editor/tests/dom/moveNode16-input.html
new file mode 100644
index 0000000..e68ea06
--- /dev/null
+++ b/Editor/tests/dom/moveNode16-input.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var ps = document.getElementsByTagName("P");
+    var position = new Position(ps[0],0);
+
+    Position_trackWhileExecuting([position],function() {
+        DOM_insertBefore(ps[0],ps[0].childNodes[1],ps[0].childNodes[0]);
+    });
+
+    var tt = DOM_createElement(document,"tt");
+    insertAtPosition(position,tt);
+}
+</script>
+</head>
+<body><p><span>Zero</span><span>One</span></p><p>Two</p><p>Three</p></body></html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode17-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode17-expected.html b/Editor/tests/dom/moveNode17-expected.html
new file mode 100644
index 0000000..8f57d94
--- /dev/null
+++ b/Editor/tests/dom/moveNode17-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <tt/>
+      <p>Two</p>
+      <p>Three</p>
+      <span>Zero</span>
+      <span>One</span>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode17-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode17-input.html b/Editor/tests/dom/moveNode17-input.html
new file mode 100644
index 0000000..10a0f66
--- /dev/null
+++ b/Editor/tests/dom/moveNode17-input.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var ps = document.getElementsByTagName("P");
+    var position = new Position(ps[0],0);
+
+    Position_trackWhileExecuting([position],function() {
+        var p2 = ps[2];
+        var p1 = ps[1];
+        DOM_insertBefore(ps[0],p2,ps[0].childNodes[0]);
+        DOM_insertBefore(ps[0],p1,ps[0].childNodes[0]);
+   });
+
+    var tt = DOM_createElement(document,"tt");
+    insertAtPosition(position,tt);
+}
+</script>
+</head>
+<body><p><span>Zero</span><span>One</span></p><p>Two</p><p>Three</p></body></html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode18-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode18-expected.html b/Editor/tests/dom/moveNode18-expected.html
new file mode 100644
index 0000000..651d030
--- /dev/null
+++ b/Editor/tests/dom/moveNode18-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <p>Two</p>
+      <p>Three</p>
+      <span>Zero</span>
+      <tt/>
+      <span>One</span>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode18-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode18-input.html b/Editor/tests/dom/moveNode18-input.html
new file mode 100644
index 0000000..ce625dd
--- /dev/null
+++ b/Editor/tests/dom/moveNode18-input.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var ps = document.getElementsByTagName("P");
+    var position = new Position(ps[0],1);
+
+    Position_trackWhileExecuting([position],function() {
+        var p2 = ps[2];
+        var p1 = ps[1];
+        DOM_insertBefore(ps[0],p2,ps[0].childNodes[0]);
+        DOM_insertBefore(ps[0],p1,ps[0].childNodes[0]);
+   });
+
+    var tt = DOM_createElement(document,"tt");
+    insertAtPosition(position,tt);
+}
+</script>
+</head>
+<body><p><span>Zero</span><span>One</span></p><p>Two</p><p>Three</p></body></html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode19-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode19-expected.html b/Editor/tests/dom/moveNode19-expected.html
new file mode 100644
index 0000000..214a26f
--- /dev/null
+++ b/Editor/tests/dom/moveNode19-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <p>Two</p>
+      <p>Three</p>
+      <span>Zero</span>
+      <span>One</span>
+      <tt/>
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode19-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode19-input.html b/Editor/tests/dom/moveNode19-input.html
new file mode 100644
index 0000000..5c1892e
--- /dev/null
+++ b/Editor/tests/dom/moveNode19-input.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var ps = document.getElementsByTagName("P");
+    var position = new Position(ps[0],2);
+
+    Position_trackWhileExecuting([position],function() {
+        var p2 = ps[2];
+        var p1 = ps[1];
+        DOM_insertBefore(ps[0],p2,ps[0].childNodes[0]);
+        DOM_insertBefore(ps[0],p1,ps[0].childNodes[0]);
+   });
+
+    var tt = DOM_createElement(document,"tt");
+    insertAtPosition(position,tt);
+}
+</script>
+</head>
+<body><p><span>Zero</span><span>One</span></p><p>Two</p><p>Three</p></body></html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode20-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode20-expected.html b/Editor/tests/dom/moveNode20-expected.html
new file mode 100644
index 0000000..755c665
--- /dev/null
+++ b/Editor/tests/dom/moveNode20-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <tt/>
+      <span>One</span>
+      <span>Zero</span>
+    </p>
+    <p>Two</p>
+    <p>Three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode20-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode20-input.html b/Editor/tests/dom/moveNode20-input.html
new file mode 100644
index 0000000..e68ea06
--- /dev/null
+++ b/Editor/tests/dom/moveNode20-input.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var ps = document.getElementsByTagName("P");
+    var position = new Position(ps[0],0);
+
+    Position_trackWhileExecuting([position],function() {
+        DOM_insertBefore(ps[0],ps[0].childNodes[1],ps[0].childNodes[0]);
+    });
+
+    var tt = DOM_createElement(document,"tt");
+    insertAtPosition(position,tt);
+}
+</script>
+</head>
+<body><p><span>Zero</span><span>One</span></p><p>Two</p><p>Three</p></body></html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode21-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode21-expected.html b/Editor/tests/dom/moveNode21-expected.html
new file mode 100644
index 0000000..f581aa7
--- /dev/null
+++ b/Editor/tests/dom/moveNode21-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <span>One</span>
+      <tt/>
+      <span>Zero</span>
+    </p>
+    <p>Two</p>
+    <p>Three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode21-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode21-input.html b/Editor/tests/dom/moveNode21-input.html
new file mode 100644
index 0000000..c5f6902
--- /dev/null
+++ b/Editor/tests/dom/moveNode21-input.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var ps = document.getElementsByTagName("P");
+    var position = new Position(ps[0],0);
+
+    Position_trackWhileExecuting([position],function() {
+        DOM_insertBefore(ps[0],ps[0].childNodes[0],null);
+    });
+
+    var tt = DOM_createElement(document,"tt");
+    insertAtPosition(position,tt);
+}
+</script>
+</head>
+<body><p><span>Zero</span><span>One</span></p><p>Two</p><p>Three</p></body></html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode22-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode22-expected.html b/Editor/tests/dom/moveNode22-expected.html
new file mode 100644
index 0000000..755c665
--- /dev/null
+++ b/Editor/tests/dom/moveNode22-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <tt/>
+      <span>One</span>
+      <span>Zero</span>
+    </p>
+    <p>Two</p>
+    <p>Three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode22-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode22-input.html b/Editor/tests/dom/moveNode22-input.html
new file mode 100644
index 0000000..5664cf1
--- /dev/null
+++ b/Editor/tests/dom/moveNode22-input.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var ps = document.getElementsByTagName("P");
+    var position = new Position(ps[0],1);
+
+    Position_trackWhileExecuting([position],function() {
+        DOM_insertBefore(ps[0],ps[0].childNodes[1],ps[0].childNodes[0]);
+    });
+
+    var tt = DOM_createElement(document,"tt");
+    insertAtPosition(position,tt);
+}
+</script>
+</head>
+<body><p><span>Zero</span><span>One</span></p><p>Two</p><p>Three</p></body></html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode23-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode23-expected.html b/Editor/tests/dom/moveNode23-expected.html
new file mode 100644
index 0000000..ada5910
--- /dev/null
+++ b/Editor/tests/dom/moveNode23-expected.html
@@ -0,0 +1,13 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <span>Two</span>
+      <span>Zero</span>
+      <tt/>
+      <span>One</span>
+    </p>
+    <p>Three</p>
+    <p>Four</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode23-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode23-input.html b/Editor/tests/dom/moveNode23-input.html
new file mode 100644
index 0000000..94907ad
--- /dev/null
+++ b/Editor/tests/dom/moveNode23-input.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var ps = document.getElementsByTagName("P");
+    var position = new Position(ps[0],1);
+
+    Position_trackWhileExecuting([position],function() {
+        DOM_insertBefore(ps[0],ps[0].childNodes[2],ps[0].childNodes[0]);
+    });
+
+    var tt = DOM_createElement(document,"tt");
+    insertAtPosition(position,tt);
+}
+</script>
+</head>
+<body><p><span>Zero</span><span>One</span><span>Two</span></p><p>Three</p><p>Four</p></body></html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode24-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode24-expected.html b/Editor/tests/dom/moveNode24-expected.html
new file mode 100644
index 0000000..1d4e46e
--- /dev/null
+++ b/Editor/tests/dom/moveNode24-expected.html
@@ -0,0 +1,13 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      <span>Zero</span>
+      <tt/>
+      <span>Two</span>
+      <span>One</span>
+    </p>
+    <p>Three</p>
+    <p>Four</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/moveNode24-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/moveNode24-input.html b/Editor/tests/dom/moveNode24-input.html
new file mode 100644
index 0000000..3446e6c
--- /dev/null
+++ b/Editor/tests/dom/moveNode24-input.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var ps = document.getElementsByTagName("P");
+    var position = new Position(ps[0],1);
+
+    Position_trackWhileExecuting([position],function() {
+        DOM_insertBefore(ps[0],ps[0].childNodes[2],ps[0].childNodes[1]);
+    });
+
+    var tt = DOM_createElement(document,"tt");
+    insertAtPosition(position,tt);
+}
+</script>
+</head>
+<body><p><span>Zero</span><span>One</span><span>Two</span></p><p>Three</p><p>Four</p></body></html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/nextNode01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/nextNode01-expected.html b/Editor/tests/dom/nextNode01-expected.html
new file mode 100644
index 0000000..2ab6dd7
--- /dev/null
+++ b/Editor/tests/dom/nextNode01-expected.html
@@ -0,0 +1,25 @@
+BODY
+n1
+n2
+n3
+n4
+n5
+n6
+n7
+n8
+n9
+n10
+n11
+n12
+n13
+n14
+n15
+n16
+n17
+n18
+n19
+n20
+n21
+n22
+n23
+n24

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/nextNode01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/nextNode01-input.html b/Editor/tests/dom/nextNode01-input.html
new file mode 100644
index 0000000..7a01d19
--- /dev/null
+++ b/Editor/tests/dom/nextNode01-input.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    removeWhitespaceAndCommentNodes(document.body);
+    var result = new Array();
+    var current = document.body;
+    while (current != null) {
+        result.push(stringForNode(current));
+        current = nextNode(current);
+    }
+    return result.join("\n");
+
+    function stringForNode(node)
+    {
+        if ((node.nodeType == Node.ELEMENT_NODE) && (node.hasAttribute("id")))
+            return node.getAttribute("id");
+        else if (node.nodeType == Node.TEXT_NODE)
+            return node.nodeValue;
+        else
+            return node.nodeName;
+    }
+}
+</script>
+</head>
+<body>
+
+  <div id="n1">
+    <p id="n2">
+      <span id="n3">n4</span>
+      <span id="n5">n6</span>
+    </p>
+    <p id="n7">
+      <span id="n8"></span>
+      <span id="n9"></span>
+    </p>
+    <p id="n10">
+      <span id="n11"></span>
+    </p>
+    <p id="n12">
+    </p>
+  </div>
+
+  <div id="n13">
+    <p id="n14">
+    </p>
+    <p id="n15">
+      <span id="n16"></span>
+    </p>
+    <p id="n17">
+      <span id="n18"></span>
+      <span id="n19"></span>
+    </p>
+    <p id="n20">
+      <span id="n21">n22</span>
+      <span id="n23">n24</span>
+    </p>
+  </div>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/nextNode02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/nextNode02-expected.html b/Editor/tests/dom/nextNode02-expected.html
new file mode 100644
index 0000000..209a7a6
--- /dev/null
+++ b/Editor/tests/dom/nextNode02-expected.html
@@ -0,0 +1,76 @@
+Current BODY
+Entering n1
+    Current n1
+    Entering n2
+        Current n2
+        Entering n3
+            Current n3
+            Entering n4
+                Current n4
+            Exiting n4
+        Exiting n3
+        Entering n5
+            Current n5
+            Entering n6
+                Current n6
+            Exiting n6
+        Exiting n5
+    Exiting n2
+    Entering n7
+        Current n7
+        Entering n8
+            Current n8
+        Exiting n8
+        Entering n9
+            Current n9
+        Exiting n9
+    Exiting n7
+    Entering n10
+        Current n10
+        Entering n11
+            Current n11
+        Exiting n11
+    Exiting n10
+    Entering n12
+        Current n12
+    Exiting n12
+Exiting n1
+Entering n13
+    Current n13
+    Entering n14
+        Current n14
+    Exiting n14
+    Entering n15
+        Current n15
+        Entering n16
+            Current n16
+        Exiting n16
+    Exiting n15
+    Entering n17
+        Current n17
+        Entering n18
+            Current n18
+        Exiting n18
+        Entering n19
+            Current n19
+        Exiting n19
+    Exiting n17
+    Entering n20
+        Current n20
+        Entering n21
+            Current n21
+            Entering n22
+                Current n22
+            Exiting n22
+        Exiting n21
+        Entering n23
+            Current n23
+            Entering n24
+                Current n24
+            Exiting n24
+        Exiting n23
+    Exiting n20
+Exiting n13
+Exiting BODY
+Exiting HTML
+Exiting #document

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/nextNode02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/nextNode02-input.html b/Editor/tests/dom/nextNode02-input.html
new file mode 100644
index 0000000..04d52a3
--- /dev/null
+++ b/Editor/tests/dom/nextNode02-input.html
@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    removeWhitespaceAndCommentNodes(document.body);
+    var result = new Array();
+    var current = document.body;
+    var indent = "";
+    while (current != null) {
+        result.push(indent+"Current "+stringForNode(current));
+        current = nextNode(current,entering,exiting);
+    }
+    return result.join("\n");
+
+    function entering(node)
+    {
+        result.push(indent+"Entering "+stringForNode(node));
+        indent += "    ";
+    }
+
+    function exiting(node)
+    {
+        indent = indent.substring(0,indent.length-4);
+        result.push(indent+"Exiting "+stringForNode(node));
+    }
+
+    function stringForNode(node)
+    {
+        if ((node.nodeType == Node.ELEMENT_NODE) && (node.hasAttribute("id")))
+            return node.getAttribute("id");
+        else if (node.nodeType == Node.TEXT_NODE)
+            return node.nodeValue;
+        else
+            return node.nodeName;
+    }
+}
+</script>
+</head>
+<body>
+
+  <div id="n1">
+    <p id="n2">
+      <span id="n3">n4</span>
+      <span id="n5">n6</span>
+    </p>
+    <p id="n7">
+      <span id="n8"></span>
+      <span id="n9"></span>
+    </p>
+    <p id="n10">
+      <span id="n11"></span>
+    </p>
+    <p id="n12">
+    </p>
+  </div>
+
+  <div id="n13">
+    <p id="n14">
+    </p>
+    <p id="n15">
+      <span id="n16"></span>
+    </p>
+    <p id="n17">
+      <span id="n18"></span>
+      <span id="n19"></span>
+    </p>
+    <p id="n20">
+      <span id="n21">n22</span>
+      <span id="n23">n24</span>
+    </p>
+  </div>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/removeNodeButKeepChildren1-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/removeNodeButKeepChildren1-expected.html b/Editor/tests/dom/removeNodeButKeepChildren1-expected.html
new file mode 100644
index 0000000..13bb807
--- /dev/null
+++ b/Editor/tests/dom/removeNodeButKeepChildren1-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    (0)
+    <span>Zero</span>
+    (1)
+    <span>One</span>
+    (2)
+    <p>Two</p>
+    <p>Three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/removeNodeButKeepChildren1-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/removeNodeButKeepChildren1-input.html b/Editor/tests/dom/removeNodeButKeepChildren1-input.html
new file mode 100644
index 0000000..46f4181
--- /dev/null
+++ b/Editor/tests/dom/removeNodeButKeepChildren1-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var p = document.getElementsByTagName("P")[0];
+    var positions = new Array();
+    for (var i = 0; i <= p.childNodes.length; i++)
+        positions[i] = new Position(p,i);
+
+    Position_trackWhileExecuting(positions,function() {
+        DOM_removeNodeButKeepChildren(p);
+
+        for (var i = 0; i < positions.length; i++)
+            insertTextAtPosition(positions[i],"("+i+")");
+    });
+}
+</script>
+</head>
+<body><p><span>Zero</span><span>One</span></p><p>Two</p><p>Three</p></body></html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/removeNodeButKeepChildren2-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/removeNodeButKeepChildren2-expected.html b/Editor/tests/dom/removeNodeButKeepChildren2-expected.html
new file mode 100644
index 0000000..ad670da
--- /dev/null
+++ b/Editor/tests/dom/removeNodeButKeepChildren2-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>Zero</p>
+    (0)
+    <span>One</span>
+    (1)
+    <span>Two</span>
+    (2)
+    <p>Three</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/removeNodeButKeepChildren2-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/removeNodeButKeepChildren2-input.html b/Editor/tests/dom/removeNodeButKeepChildren2-input.html
new file mode 100644
index 0000000..4dd7ea9
--- /dev/null
+++ b/Editor/tests/dom/removeNodeButKeepChildren2-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var p = document.getElementsByTagName("P")[1];
+    var positions = new Array();
+    for (var i = 0; i <= p.childNodes.length; i++)
+        positions[i] = new Position(p,i);
+
+    Position_trackWhileExecuting(positions,function() {
+        DOM_removeNodeButKeepChildren(p);
+
+        for (var i = 0; i < positions.length; i++)
+            insertTextAtPosition(positions[i],"("+i+")");
+    });
+}
+</script>
+</head>
+<body><p>Zero</p><p><span>One</span><span>Two</span></p><p>Three</p></body></html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/removeNodeButKeepChildren3-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/removeNodeButKeepChildren3-expected.html b/Editor/tests/dom/removeNodeButKeepChildren3-expected.html
new file mode 100644
index 0000000..0690de8
--- /dev/null
+++ b/Editor/tests/dom/removeNodeButKeepChildren3-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>Zero</p>
+    <p>One</p>
+    (0)
+    <span>Two</span>
+    (1)
+    <span>Three</span>
+    (2)
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/removeNodeButKeepChildren3-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/removeNodeButKeepChildren3-input.html b/Editor/tests/dom/removeNodeButKeepChildren3-input.html
new file mode 100644
index 0000000..d63c2b8
--- /dev/null
+++ b/Editor/tests/dom/removeNodeButKeepChildren3-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var p = document.getElementsByTagName("P")[2];
+    var positions = new Array();
+    for (var i = 0; i <= p.childNodes.length; i++)
+        positions[i] = new Position(p,i);
+
+    Position_trackWhileExecuting(positions,function() {
+        DOM_removeNodeButKeepChildren(p);
+
+        for (var i = 0; i < positions.length; i++)
+            insertTextAtPosition(positions[i],"("+i+")");
+    });
+}
+</script>
+</head>
+<body><p>Zero</p><p>One</p><p><span>Two</span><span>Three</span></p></body></html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/removeNodeButKeepChildren4-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/removeNodeButKeepChildren4-expected.html b/Editor/tests/dom/removeNodeButKeepChildren4-expected.html
new file mode 100644
index 0000000..b38eae0
--- /dev/null
+++ b/Editor/tests/dom/removeNodeButKeepChildren4-expected.html
@@ -0,0 +1,13 @@
+<html>
+  <head></head>
+  <body>
+    (0)
+    <span>Zero</span>
+    <span>One</span>
+    (1)
+    <p>Two</p>
+    (2)
+    <p>Three</p>
+    (3)
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/removeNodeButKeepChildren4-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/removeNodeButKeepChildren4-input.html b/Editor/tests/dom/removeNodeButKeepChildren4-input.html
new file mode 100644
index 0000000..c8d2853
--- /dev/null
+++ b/Editor/tests/dom/removeNodeButKeepChildren4-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var positions = new Array();
+    for (var i = 0; i <= document.body.childNodes.length; i++)
+        positions[i] = new Position(document.body,i);
+    var p = document.getElementsByTagName("P")[0];
+
+    Position_trackWhileExecuting(positions,function() {
+        DOM_removeNodeButKeepChildren(p);
+
+        for (var i = 0; i < positions.length; i++)
+            insertTextAtPosition(positions[i],"("+i+")");
+    });
+}
+</script>
+</head>
+<body><p><span>Zero</span><span>One</span></p><p>Two</p><p>Three</p></body></html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/removeNodeButKeepChildren5-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/removeNodeButKeepChildren5-expected.html b/Editor/tests/dom/removeNodeButKeepChildren5-expected.html
new file mode 100644
index 0000000..a29dcec
--- /dev/null
+++ b/Editor/tests/dom/removeNodeButKeepChildren5-expected.html
@@ -0,0 +1,13 @@
+<html>
+  <head></head>
+  <body>
+    (0)
+    <p>Zero</p>
+    (1)
+    <span>One</span>
+    <span>Two</span>
+    (2)
+    <p>Three</p>
+    (3)
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/removeNodeButKeepChildren5-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/removeNodeButKeepChildren5-input.html b/Editor/tests/dom/removeNodeButKeepChildren5-input.html
new file mode 100644
index 0000000..298c04f
--- /dev/null
+++ b/Editor/tests/dom/removeNodeButKeepChildren5-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var positions = new Array();
+    for (var i = 0; i <= document.body.childNodes.length; i++)
+        positions[i] = new Position(document.body,i);
+    var p = document.getElementsByTagName("P")[1];
+
+    Position_trackWhileExecuting(positions,function() {
+        DOM_removeNodeButKeepChildren(p);
+
+        for (var i = 0; i < positions.length; i++)
+            insertTextAtPosition(positions[i],"("+i+")");
+    });
+}
+</script>
+</head>
+<body><p>Zero</p><p><span>One</span><span>Two</span></p><p>Three</p></body></html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/removeNodeButKeepChildren6-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/removeNodeButKeepChildren6-expected.html b/Editor/tests/dom/removeNodeButKeepChildren6-expected.html
new file mode 100644
index 0000000..9804d95
--- /dev/null
+++ b/Editor/tests/dom/removeNodeButKeepChildren6-expected.html
@@ -0,0 +1,13 @@
+<html>
+  <head></head>
+  <body>
+    (0)
+    <p>Zero</p>
+    (1)
+    <p>One</p>
+    (2)
+    <span>Two</span>
+    <span>Three</span>
+    (3)
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/removeNodeButKeepChildren6-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/removeNodeButKeepChildren6-input.html b/Editor/tests/dom/removeNodeButKeepChildren6-input.html
new file mode 100644
index 0000000..5c9c95f
--- /dev/null
+++ b/Editor/tests/dom/removeNodeButKeepChildren6-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var positions = new Array();
+    for (var i = 0; i <= document.body.childNodes.length; i++)
+        positions[i] = new Position(document.body,i);
+    var p = document.getElementsByTagName("P")[2];
+
+    Position_trackWhileExecuting(positions,function() {
+        DOM_removeNodeButKeepChildren(p);
+
+        for (var i = 0; i < positions.length; i++)
+            insertTextAtPosition(positions[i],"("+i+")");
+    });
+}
+</script>
+</head>
+<body><p>Zero</p><p>One</p><p><span>Two</span><span>Three</span></p></body></html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement01-expected.html b/Editor/tests/dom/replaceElement01-expected.html
new file mode 100644
index 0000000..a788a5c
--- /dev/null
+++ b/Editor/tests/dom/replaceElement01-expected.html
@@ -0,0 +1,4 @@
+<html>
+  <head></head>
+  <body><div>Sample text</div></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement01-input.html b/Editor/tests/dom/replaceElement01-input.html
new file mode 100644
index 0000000..f545023
--- /dev/null
+++ b/Editor/tests/dom/replaceElement01-input.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var p = document.getElementsByTagName("P")[0];
+    DOM_replaceElement(p,"DIV");
+}
+</script>
+</head>
+<body>
+
+<p>Sample text</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement02-expected.html b/Editor/tests/dom/replaceElement02-expected.html
new file mode 100644
index 0000000..2ba0efc
--- /dev/null
+++ b/Editor/tests/dom/replaceElement02-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head></head>
+  <body>
+    <p>One</p>
+    <p>Two</p>
+    <div>Three</div>
+    <p>Four</p>
+    <p>Five</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement02-input.html b/Editor/tests/dom/replaceElement02-input.html
new file mode 100644
index 0000000..075be26
--- /dev/null
+++ b/Editor/tests/dom/replaceElement02-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var p = document.getElementsByTagName("P")[2];
+    DOM_replaceElement(p,"DIV");
+}
+</script>
+</head>
+<body>
+
+<p>One</p>
+<p>Two</p>
+<p>Three</p>
+<p>Four</p>
+<p>Five</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement03-expected.html b/Editor/tests/dom/replaceElement03-expected.html
new file mode 100644
index 0000000..d5a25eb
--- /dev/null
+++ b/Editor/tests/dom/replaceElement03-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head></head>
+  <body>
+    <p>One</p>
+    <p>Two</p>
+    <div align="center" style="color: red">Three</div>
+    <p>Four</p>
+    <p>Five</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement03-input.html b/Editor/tests/dom/replaceElement03-input.html
new file mode 100644
index 0000000..e10bdf9
--- /dev/null
+++ b/Editor/tests/dom/replaceElement03-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var p = document.getElementsByTagName("P")[2];
+    DOM_replaceElement(p,"DIV");
+}
+</script>
+</head>
+<body>
+
+<p>One</p>
+<p>Two</p>
+<p align="center" style="color: red">Three</p>
+<p>Four</p>
+<p>Five</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement04-expected.html b/Editor/tests/dom/replaceElement04-expected.html
new file mode 100644
index 0000000..11aea06
--- /dev/null
+++ b/Editor/tests/dom/replaceElement04-expected.html
@@ -0,0 +1,16 @@
+<html>
+  <head></head>
+  <body>
+    <p>One</p>
+    <p>Two</p>
+    <div>
+      Three
+      <br/>
+      Four
+      <br/>
+      Five
+    </div>
+    <p>Six</p>
+    <p>Seven</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement04-input.html b/Editor/tests/dom/replaceElement04-input.html
new file mode 100644
index 0000000..3b980f7
--- /dev/null
+++ b/Editor/tests/dom/replaceElement04-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var p = document.getElementsByTagName("P")[2];
+    DOM_replaceElement(p,"DIV");
+}
+</script>
+</head>
+<body>
+
+<p>One</p>
+<p>Two</p>
+<p>Three<br>Four<br>Five</p>
+<p>Six</p>
+<p>Seven</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement05-expected.html b/Editor/tests/dom/replaceElement05-expected.html
new file mode 100644
index 0000000..bb0e745
--- /dev/null
+++ b/Editor/tests/dom/replaceElement05-expected.html
@@ -0,0 +1,18 @@
+<html>
+  <head></head>
+  <body>
+    <p>One</p>
+    <p>Two</p>
+    <div>
+      Three
+      <br/>
+      <b>
+        <u>Four</u>
+        <br/>
+        <i>Five</i>
+      </b>
+    </div>
+    <p>Six</p>
+    <p>Seven</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement05-input.html b/Editor/tests/dom/replaceElement05-input.html
new file mode 100644
index 0000000..30d494a
--- /dev/null
+++ b/Editor/tests/dom/replaceElement05-input.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var p = document.getElementsByTagName("P")[2];
+    DOM_replaceElement(p,"DIV");
+}
+</script>
+</head>
+<body>
+
+<p>One</p>
+<p>Two</p>
+<p>Three<br><b><u>Four</u><br><i>Five</i></b></p>
+<p>Six</p>
+<p>Seven</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement06-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement06-expected.html b/Editor/tests/dom/replaceElement06-expected.html
new file mode 100644
index 0000000..86ba135
--- /dev/null
+++ b/Editor/tests/dom/replaceElement06-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head></head>
+  <body>
+    <p>One</p>
+    <p>Two</p>
+    <div>Sam[ple te]xt</div>
+    <p>Six</p>
+    <p>Seven</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement06-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement06-input.html b/Editor/tests/dom/replaceElement06-input.html
new file mode 100644
index 0000000..a8aa329
--- /dev/null
+++ b/Editor/tests/dom/replaceElement06-input.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var p = document.getElementsByTagName("P")[2];
+    Selection_set(p.firstChild,3,p.firstChild,9);
+    DOM_replaceElement(p,"DIV");
+    showSelection();
+}
+</script>
+</head>
+<body>
+
+<p>One</p>
+<p>Two</p>
+<p>Sample text</p>
+<p>Six</p>
+<p>Seven</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement07-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement07-expected.html b/Editor/tests/dom/replaceElement07-expected.html
new file mode 100644
index 0000000..13ec421
--- /dev/null
+++ b/Editor/tests/dom/replaceElement07-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>One</p>
+    <p>Two</p>
+    [
+    <div>Sample text</div>
+    ]
+    <p>Six</p>
+    <p>Seven</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement07-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement07-input.html b/Editor/tests/dom/replaceElement07-input.html
new file mode 100644
index 0000000..68d035e
--- /dev/null
+++ b/Editor/tests/dom/replaceElement07-input.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var p = document.getElementsByTagName("P")[2];
+    var offset = DOM_nodeOffset(p);
+    Selection_set(document.body,offset,document.body,offset+1);
+    DOM_replaceElement(p,"DIV");
+    showSelection();
+}
+</script>
+</head>
+<body>
+
+<p>One</p>
+<p>Two</p>
+<p>Sample text</p>
+<p>Six</p>
+<p>Seven</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement08-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement08-expected.html b/Editor/tests/dom/replaceElement08-expected.html
new file mode 100644
index 0000000..b4e915d
--- /dev/null
+++ b/Editor/tests/dom/replaceElement08-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head></head>
+  <body>
+    <p>One</p>
+    <p>Two</p>
+    <div>[Sample text]</div>
+    <p>Six</p>
+    <p>Seven</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement08-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement08-input.html b/Editor/tests/dom/replaceElement08-input.html
new file mode 100644
index 0000000..90560bf
--- /dev/null
+++ b/Editor/tests/dom/replaceElement08-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var p = document.getElementsByTagName("P")[2];
+    var range = new Range(p,0,p,1);
+    Range_trackWhileExecuting(range,function() {
+        DOM_replaceElement(p,"DIV");
+    });
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+<p>One</p>
+<p>Two</p>
+<p>Sample text</p>
+<p>Six</p>
+<p>Seven</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement09-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement09-expected.html b/Editor/tests/dom/replaceElement09-expected.html
new file mode 100644
index 0000000..6c27a53
--- /dev/null
+++ b/Editor/tests/dom/replaceElement09-expected.html
@@ -0,0 +1,20 @@
+<html>
+  <head></head>
+  <body>
+    <p>One</p>
+    <p>Two</p>
+    <div>
+      A
+      <br/>
+      [B
+      <br/>
+      C
+      <br/>
+      D]
+      <br/>
+      E
+    </div>
+    <p>Six</p>
+    <p>Seven</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement09-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement09-input.html b/Editor/tests/dom/replaceElement09-input.html
new file mode 100644
index 0000000..0e46abf
--- /dev/null
+++ b/Editor/tests/dom/replaceElement09-input.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var p = document.getElementsByTagName("P")[2];
+    var range = new Range(p,2,p,7);
+    Range_trackWhileExecuting(range,function() {
+        DOM_replaceElement(p,"DIV");
+    });
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+<p>One</p>
+<p>Two</p>
+<p>A<br>B<br>C<br>D<br>E</p>
+<p>Six</p>
+<p>Seven</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement10-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement10-expected.html b/Editor/tests/dom/replaceElement10-expected.html
new file mode 100644
index 0000000..34c2a40
--- /dev/null
+++ b/Editor/tests/dom/replaceElement10-expected.html
@@ -0,0 +1,22 @@
+<html>
+  <head></head>
+  <body>
+    <p>One</p>
+    <p>Two</p>
+    [
+    <div>
+      A
+      <br/>
+      B
+      <br/>
+      C
+      <br/>
+      D
+      <br/>
+      E
+    </div>
+    ]
+    <p>Six</p>
+    <p>Seven</p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/replaceElement10-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/replaceElement10-input.html b/Editor/tests/dom/replaceElement10-input.html
new file mode 100644
index 0000000..0113327
--- /dev/null
+++ b/Editor/tests/dom/replaceElement10-input.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var p = document.getElementsByTagName("P")[2];
+    var offset = DOM_nodeOffset(p);
+    var range = new Range(document.body,offset,document.body,offset+1);
+    Range_trackWhileExecuting(range,function() {
+        DOM_replaceElement(p,"DIV");
+    });
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body>
+
+<p>One</p>
+<p>Two</p>
+<p>A<br>B<br>C<br>D<br>E</p>
+<p>Six</p>
+<p>Seven</p>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested01-expected.html b/Editor/tests/dom/splitAroundSelection-nested01-expected.html
new file mode 100644
index 0000000..9861c31
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested01-expected.html
@@ -0,0 +1,18 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>
+        Two
+        <u>Thr</u>
+      </b>
+      <b><u>[]</u></b>
+      <b>
+        <u>ee</u>
+        Four
+      </b>
+      Five
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested01-input.html b/Editor/tests/dom/splitAroundSelection-nested01-input.html
new file mode 100644
index 0000000..1e79e0e
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested01-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(u.firstChild,3,u.firstChild,3);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two <u>Three</u> Four</b> Five</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested02-expected.html b/Editor/tests/dom/splitAroundSelection-nested02-expected.html
new file mode 100644
index 0000000..588be88
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested02-expected.html
@@ -0,0 +1,15 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b><u>T</u></b>
+      <b><u>[]</u></b>
+      <b>
+        <u>wo</u>
+        Three Four
+      </b>
+      Five
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested02-input.html b/Editor/tests/dom/splitAroundSelection-nested02-input.html
new file mode 100644
index 0000000..9e1c9d2
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested02-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(u.firstChild,1,u.firstChild,1);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b><u>Two</u> Three Four</b> Five</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested03-expected.html b/Editor/tests/dom/splitAroundSelection-nested03-expected.html
new file mode 100644
index 0000000..34ebb6e
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested03-expected.html
@@ -0,0 +1,15 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>
+        Two Three
+        <u>Fo</u>
+      </b>
+      <b><u>[]</u></b>
+      <b><u>ur</u></b>
+      Five
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested03-input.html b/Editor/tests/dom/splitAroundSelection-nested03-input.html
new file mode 100644
index 0000000..67dbe53
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested03-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(u.firstChild,2,u.firstChild,2);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two Three <u>Four</u></b> Five</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested04-expected.html b/Editor/tests/dom/splitAroundSelection-nested04-expected.html
new file mode 100644
index 0000000..2ce8c68
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested04-expected.html
@@ -0,0 +1,25 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>
+        Two
+        <u>
+          Three
+          <br/>
+        </u>
+      </b>
+      <b><u>[]</u></b>
+      <b>
+        <u>
+          Four
+          <br/>
+          Five
+        </u>
+        Six
+      </b>
+      Seven
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested04-input.html b/Editor/tests/dom/splitAroundSelection-nested04-input.html
new file mode 100644
index 0000000..9d72929
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested04-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(u,2,u,2);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two <u>Three<br>Four<br>Five</u> Six</b> Seven</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested05-expected.html b/Editor/tests/dom/splitAroundSelection-nested05-expected.html
new file mode 100644
index 0000000..30e33ac
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested05-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>Two</b>
+      <b><u>[]</u></b>
+      <b>
+        <u>
+          Three
+          <br/>
+          Four
+          <br/>
+          Five
+        </u>
+        Six
+      </b>
+      Seven
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested05-input.html b/Editor/tests/dom/splitAroundSelection-nested05-input.html
new file mode 100644
index 0000000..668288a
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested05-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(u,0,u,0);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two <u>Three<br>Four<br>Five</u> Six</b> Seven</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested06-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested06-expected.html b/Editor/tests/dom/splitAroundSelection-nested06-expected.html
new file mode 100644
index 0000000..20aba8c
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested06-expected.html
@@ -0,0 +1,21 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>
+        Two
+        <u>
+          Three
+          <br/>
+          Four
+          <br/>
+          Five
+        </u>
+      </b>
+      <b><u>[]</u></b>
+      <b>Six</b>
+      Seven
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested06-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested06-input.html b/Editor/tests/dom/splitAroundSelection-nested06-input.html
new file mode 100644
index 0000000..7b0b3d2
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested06-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(u,5,u,5);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two <u>Three<br>Four<br>Five</u> Six</b> Seven</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested07-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested07-expected.html b/Editor/tests/dom/splitAroundSelection-nested07-expected.html
new file mode 100644
index 0000000..bee2071
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested07-expected.html
@@ -0,0 +1,30 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>
+        Two
+        <u>
+          Three
+          <br/>
+        </u>
+      </b>
+      <b>
+        <u>
+          [Four
+          <br/>
+          ]
+        </u>
+      </b>
+      <b>
+        <u>
+          Five
+          <br/>
+        </u>
+        Six
+      </b>
+      Seven
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested07-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested07-input.html b/Editor/tests/dom/splitAroundSelection-nested07-input.html
new file mode 100644
index 0000000..3696e5c
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested07-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(u,2,u,4);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two <u>Three<br>Four<br>Five<br></u> Six</b> Seven</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested08-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested08-expected.html b/Editor/tests/dom/splitAroundSelection-nested08-expected.html
new file mode 100644
index 0000000..d60fec1
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested08-expected.html
@@ -0,0 +1,26 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>Two</b>
+      <b>
+        <u>
+          [Three
+          <br/>
+          ]
+        </u>
+      </b>
+      <b>
+        <u>
+          Four
+          <br/>
+          Five
+          <br/>
+        </u>
+        Six
+      </b>
+      Seven
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested08-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested08-input.html b/Editor/tests/dom/splitAroundSelection-nested08-input.html
new file mode 100644
index 0000000..941b295
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested08-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(u,0,u,2);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two <u>Three<br>Four<br>Five<br></u> Six</b> Seven</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested09-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested09-expected.html b/Editor/tests/dom/splitAroundSelection-nested09-expected.html
new file mode 100644
index 0000000..044db5e
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested09-expected.html
@@ -0,0 +1,26 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>
+        Two
+        <u>
+          Three
+          <br/>
+          Four
+          <br/>
+        </u>
+      </b>
+      <b>
+        <u>
+          [Five
+          <br/>
+          ]
+        </u>
+      </b>
+      <b>Six</b>
+      Seven
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested09-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested09-input.html b/Editor/tests/dom/splitAroundSelection-nested09-input.html
new file mode 100644
index 0000000..e0f04d9
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested09-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(u,4,u,6);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two <u>Three<br>Four<br>Five<br></u> Six</b> Seven</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested10-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested10-expected.html b/Editor/tests/dom/splitAroundSelection-nested10-expected.html
new file mode 100644
index 0000000..9b485e2
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested10-expected.html
@@ -0,0 +1,26 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>
+        Two
+        <u>Three</u>
+      </b>
+      <b>
+        <u>
+          [
+          <br/>
+          Four
+          <br/>
+          ]
+        </u>
+      </b>
+      <b>
+        <u>Five</u>
+        Six
+      </b>
+      Seven
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested10-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested10-input.html b/Editor/tests/dom/splitAroundSelection-nested10-input.html
new file mode 100644
index 0000000..4a37f40
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested10-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(u,1,u,4);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two <u>Three<br>Four<br>Five</u> Six</b> Seven</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested11-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested11-expected.html b/Editor/tests/dom/splitAroundSelection-nested11-expected.html
new file mode 100644
index 0000000..6b492b2
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested11-expected.html
@@ -0,0 +1,23 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>Two</b>
+      <b>
+        <u>
+          [Three
+          <br/>
+          Four
+          <br/>
+          ]
+        </u>
+      </b>
+      <b>
+        <u>Five</u>
+        Six
+      </b>
+      Seven
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested11-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested11-input.html b/Editor/tests/dom/splitAroundSelection-nested11-input.html
new file mode 100644
index 0000000..d101094
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested11-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(u,0,u,4);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two <u>Three<br>Four<br>Five</u> Six</b> Seven</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested12-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested12-expected.html b/Editor/tests/dom/splitAroundSelection-nested12-expected.html
new file mode 100644
index 0000000..f7e5904
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested12-expected.html
@@ -0,0 +1,23 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>
+        Two
+        <u>Three</u>
+      </b>
+      <b>
+        <u>
+          [
+          <br/>
+          Four
+          <br/>
+          Five]
+        </u>
+      </b>
+      <b>Six</b>
+      Seven
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested12-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested12-input.html b/Editor/tests/dom/splitAroundSelection-nested12-input.html
new file mode 100644
index 0000000..f95d420
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested12-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(u,1,u,5);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two <u>Three<br>Four<br>Five</u> Six</b> Seven</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested13-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested13-expected.html b/Editor/tests/dom/splitAroundSelection-nested13-expected.html
new file mode 100644
index 0000000..cded002
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested13-expected.html
@@ -0,0 +1,20 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>Two</b>
+      <b>
+        <u>
+          [Three
+          <br/>
+          Four
+          <br/>
+          Five]
+        </u>
+      </b>
+      <b>Six</b>
+      Seven
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested13-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested13-input.html b/Editor/tests/dom/splitAroundSelection-nested13-input.html
new file mode 100644
index 0000000..4f655fb
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested13-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(u,0,u,5);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two <u>Three<br>Four<br>Five</u> Six</b> Seven</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested14-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested14-expected.html b/Editor/tests/dom/splitAroundSelection-nested14-expected.html
new file mode 100644
index 0000000..29b775a
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested14-expected.html
@@ -0,0 +1,18 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <span style="color: red">
+        Two
+        <a href="#">Thr</a>
+      </span>
+      <span style="color: red"><a href="#">[]</a></span>
+      <span style="color: red">
+        <a href="#">ee</a>
+        Four
+      </span>
+      Five
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested14-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested14-input.html b/Editor/tests/dom/splitAroundSelection-nested14-input.html
new file mode 100644
index 0000000..c80eee6
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested14-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var a = document.getElementsByTagName("A")[0];
+    var range = new Range(a.firstChild,3,a.firstChild,3);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <span style="color: red">Two <a href="#">Three</a> Four</span> Five</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested15-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested15-expected.html b/Editor/tests/dom/splitAroundSelection-nested15-expected.html
new file mode 100644
index 0000000..12f3656
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested15-expected.html
@@ -0,0 +1,24 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <span style="color: red">
+        Two
+        <a href="#">
+          Three
+          <br/>
+        </a>
+      </span>
+      <span style="color: red"><a href="#" id="testlink">[Four]</a></span>
+      <span style="color: red">
+        <a href="#">
+          <br/>
+          Five
+        </a>
+        Six
+      </span>
+      Seven
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested15-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested15-input.html b/Editor/tests/dom/splitAroundSelection-nested15-input.html
new file mode 100644
index 0000000..ee62a5f
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested15-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var a = document.getElementsByTagName("A")[0];
+    var range = new Range(a,2,a,3);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <span style="color: red">Two <a href="#" id="testlink">Three<br>Four<br>Five</a> Six</span> Seven</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested16-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested16-expected.html b/Editor/tests/dom/splitAroundSelection-nested16-expected.html
new file mode 100644
index 0000000..aa5b470
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested16-expected.html
@@ -0,0 +1,25 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <span style="color: red">Two</span>
+      <span style="color: red">
+        <a href="#" id="testlink">
+          [Three
+          <br/>
+          ]
+        </a>
+      </span>
+      <span style="color: red">
+        <a href="#">
+          Four
+          <br/>
+          Five
+        </a>
+        Six
+      </span>
+      Seven
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested16-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested16-input.html b/Editor/tests/dom/splitAroundSelection-nested16-input.html
new file mode 100644
index 0000000..2c7c3e6
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested16-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var a = document.getElementsByTagName("A")[0];
+    var range = new Range(a,0,a,2);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <span style="color: red">Two <a href="#" id="testlink">Three<br>Four<br>Five</a> Six</span> Seven</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested17-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested17-expected.html b/Editor/tests/dom/splitAroundSelection-nested17-expected.html
new file mode 100644
index 0000000..549f5f2
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested17-expected.html
@@ -0,0 +1,25 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <span style="color: red">
+        Two
+        <a href="#">
+          Three
+          <br/>
+          Four
+        </a>
+      </span>
+      <span style="color: red">
+        <a href="#" id="testlink">
+          [
+          <br/>
+          Five]
+        </a>
+      </span>
+      <span style="color: red">Six</span>
+      Seven
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested17-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested17-input.html b/Editor/tests/dom/splitAroundSelection-nested17-input.html
new file mode 100644
index 0000000..ea75034
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested17-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var a = document.getElementsByTagName("A")[0];
+    var range = new Range(a,3,a,5);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <span style="color: red">Two <a href="#" id="testlink">Three<br>Four<br>Five</a> Six</span> Seven</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested18-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested18-expected.html b/Editor/tests/dom/splitAroundSelection-nested18-expected.html
new file mode 100644
index 0000000..49e722f
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested18-expected.html
@@ -0,0 +1,30 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>
+        Two
+        <u>
+          Three
+          <i>Fo</i>
+        </u>
+      </b>
+      <b>
+        <u>
+          <i>
+            [ur
+            <br/>
+            Five
+          </i>
+          S]
+        </u>
+      </b>
+      <b>
+        <u>ix</u>
+        Seven
+      </b>
+      Eight
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested18-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested18-input.html b/Editor/tests/dom/splitAroundSelection-nested18-input.html
new file mode 100644
index 0000000..70d1544
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested18-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var i = document.getElementsByTagName("I")[0];
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(i.firstChild,2,u.lastChild,2);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two <u>Three <i>Four<br>Five</i> Six</u> Seven</b> Eight</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested19-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested19-expected.html b/Editor/tests/dom/splitAroundSelection-nested19-expected.html
new file mode 100644
index 0000000..f8e10c2
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested19-expected.html
@@ -0,0 +1,30 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>
+        Two
+        <u>Thr</u>
+      </b>
+      <b>
+        <u>
+          [ee
+          <i>
+            Four
+            <br/>
+            Fi]
+          </i>
+        </u>
+      </b>
+      <b>
+        <u>
+          <i>ve</i>
+          Six
+        </u>
+        Seven
+      </b>
+      Eight
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested19-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested19-input.html b/Editor/tests/dom/splitAroundSelection-nested19-input.html
new file mode 100644
index 0000000..8c00da8
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested19-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var i = document.getElementsByTagName("I")[0];
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(u.firstChild,3,i.lastChild,2);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two <u>Three <i>Four<br>Five</i> Six</u> Seven</b> Eight</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested20-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested20-expected.html b/Editor/tests/dom/splitAroundSelection-nested20-expected.html
new file mode 100644
index 0000000..72260c1
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested20-expected.html
@@ -0,0 +1,37 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>
+        Two
+        <u>Three</u>
+      </b>
+      <b>
+        <u>
+          [
+          <br/>
+          Four
+          <i>
+            Five
+            <br/>
+            Six]
+          </i>
+        </u>
+      </b>
+      <b>
+        <u>
+          <i>
+            <br/>
+            Seven
+          </i>
+          Eight
+          <br/>
+          Nine
+        </u>
+        Ten
+      </b>
+      Eleven
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested20-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested20-input.html b/Editor/tests/dom/splitAroundSelection-nested20-input.html
new file mode 100644
index 0000000..8691274
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested20-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var i = document.getElementsByTagName("I")[0];
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(u,1,i,3);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two <u>Three<br>Four <i>Five<br>Six<br>Seven</i> Eight<br>Nine</u> Ten</b> Eleven</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested21-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested21-expected.html b/Editor/tests/dom/splitAroundSelection-nested21-expected.html
new file mode 100644
index 0000000..a34e2a5
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested21-expected.html
@@ -0,0 +1,38 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>
+        Two
+        <u>
+          Three
+          <br/>
+          Four
+          <i>
+            Five
+            <br/>
+          </i>
+        </u>
+      </b>
+      <b>
+        <u>
+          <i>
+            [Six
+            <br/>
+            Seven
+          </i>
+          Eight]
+        </u>
+      </b>
+      <b>
+        <u>
+          <br/>
+          Nine
+        </u>
+        Ten
+      </b>
+      Eleven
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection-nested21-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection-nested21-input.html b/Editor/tests/dom/splitAroundSelection-nested21-input.html
new file mode 100644
index 0000000..a73b844
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection-nested21-input.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var i = document.getElementsByTagName("I")[0];
+    var u = document.getElementsByTagName("U")[0];
+    var range = new Range(i,2,u,5);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two <u>Three<br>Four <i>Five<br>Six<br>Seven</i> Eight<br>Nine</u> Ten</b> Eleven</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection01-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection01-expected.html b/Editor/tests/dom/splitAroundSelection01-expected.html
new file mode 100644
index 0000000..165e68c
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection01-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>Two</b>
+      <b>[Three]</b>
+      <b>Four</b>
+      Five
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection01-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection01-input.html b/Editor/tests/dom/splitAroundSelection01-input.html
new file mode 100644
index 0000000..8171d29
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection01-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var b = document.getElementsByTagName("B")[0];
+    var range = new Range(b.firstChild,4,b.firstChild,9);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two Three Four</b> Five</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection02-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection02-expected.html b/Editor/tests/dom/splitAroundSelection02-expected.html
new file mode 100644
index 0000000..e6cbe37
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection02-expected.html
@@ -0,0 +1,11 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>[Two Three]</b>
+      <b>Four</b>
+      Five
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection02-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection02-input.html b/Editor/tests/dom/splitAroundSelection02-input.html
new file mode 100644
index 0000000..9c3af1d
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection02-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var b = document.getElementsByTagName("B")[0];
+    var range = new Range(b.firstChild,0,b.firstChild,9);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two Three Four</b> Five</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection03-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection03-expected.html b/Editor/tests/dom/splitAroundSelection03-expected.html
new file mode 100644
index 0000000..8e08479
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection03-expected.html
@@ -0,0 +1,11 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>Two</b>
+      <b>[Three Four]</b>
+      Five
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection03-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection03-input.html b/Editor/tests/dom/splitAroundSelection03-input.html
new file mode 100644
index 0000000..ccd8543
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection03-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var b = document.getElementsByTagName("B")[0];
+    var range = new Range(b.firstChild,4,b.firstChild,14);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two Three Four</b> Five</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection04-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection04-expected.html b/Editor/tests/dom/splitAroundSelection04-expected.html
new file mode 100644
index 0000000..cdb7e62
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection04-expected.html
@@ -0,0 +1,10 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>[Two Three Four]</b>
+      Five
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection04-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection04-input.html b/Editor/tests/dom/splitAroundSelection04-input.html
new file mode 100644
index 0000000..d7bff68
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection04-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var b = document.getElementsByTagName("B")[0];
+    var range = new Range(b.firstChild,0,b.firstChild,14);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two Three Four</b> Five</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection05-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection05-expected.html b/Editor/tests/dom/splitAroundSelection05-expected.html
new file mode 100644
index 0000000..0be2f25
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection05-expected.html
@@ -0,0 +1,11 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>[]</b>
+      <b>Two Three Four</b>
+      Five
+    </p>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection05-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection05-input.html b/Editor/tests/dom/splitAroundSelection05-input.html
new file mode 100644
index 0000000..751c2b3
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection05-input.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+function performTest()
+{
+    var b = document.getElementsByTagName("B")[0];
+    var range = new Range(b.firstChild,0,b.firstChild,0);
+    Formatting_splitAroundSelection(range);
+    showRangeAsBrackets(range);
+}
+</script>
+</head>
+<body><p>One <b>Two Three Four</b> Five</p></body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/03bd5af0/Editor/tests/dom/splitAroundSelection06-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/dom/splitAroundSelection06-expected.html b/Editor/tests/dom/splitAroundSelection06-expected.html
new file mode 100644
index 0000000..1d0541a
--- /dev/null
+++ b/Editor/tests/dom/splitAroundSelection06-expected.html
@@ -0,0 +1,12 @@
+<html>
+  <head></head>
+  <body>
+    <p>
+      One
+      <b>Two</b>
+      <b>[]</b>
+      <b>Three Four</b>
+      Five
+    </p>
+  </body>
+</html>


Mime
View raw message