summaryrefslogtreecommitdiffstats
path: root/layout/reftests/ib-split
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /layout/reftests/ib-split
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--layout/reftests/ib-split/append-to-empty-trailing-inline-1-ref.html19
-rw-r--r--layout/reftests/ib-split/append-to-empty-trailing-inline-1.html32
-rw-r--r--layout/reftests/ib-split/append-to-nested-split-inline-1-noib-ref.html34
-rw-r--r--layout/reftests/ib-split/append-to-nested-split-inline-1-ref.html22
-rw-r--r--layout/reftests/ib-split/append-to-nested-split-inline-1.html37
-rw-r--r--layout/reftests/ib-split/ignored-margins-1-ref.html8
-rw-r--r--layout/reftests/ib-split/ignored-margins-1a.html16
-rw-r--r--layout/reftests/ib-split/ignored-margins-1b.html16
-rw-r--r--layout/reftests/ib-split/ignored-margins-2-ref.html8
-rw-r--r--layout/reftests/ib-split/ignored-margins-2a.html16
-rw-r--r--layout/reftests/ib-split/ignored-margins-2b.html16
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-1-noib-ref.html27
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-1-ref.html23
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-10-noib-ref.html34
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-10-ref.html23
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-10.html34
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-11-noib-ref.html36
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-11-ref.html25
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-11.html36
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-12-noib-ref.html10
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-12-ref.html6
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-12.html17
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-13-noib-ref.html8
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-13-ref.html6
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-13.html24
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-14-noib-ref.html8
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-14-ref.html6
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-14.html23
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-15-noib-ref.html10
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-15-ref.html6
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-15.html17
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-16-noib-ref.html8
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-16-ref.html6
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-16a.html23
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-16b.html23
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-17-ref.html9
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-17.html20
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-1a.html35
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-1b.html35
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-1c.html35
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-1d.html35
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-1e.html35
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-1f.html35
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-1g.html35
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-1h.html35
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-1i.html35
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-1j.html35
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-1k.html35
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-1l.html34
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-2-noib-ref.html25
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-2-ref.html20
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-2a.html32
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-2b.html32
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-2c.html32
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-2d.html32
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-2e.html32
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-2f.html32
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-2g.html32
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-2h.html32
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-2i.html31
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-3-noib-ref.html27
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-3-ref.html21
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-3.html32
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-4-noib-ref.html27
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-4-ref.html22
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-4.html34
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-5-noib-ref.html27
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-5-ref.html21
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-5-shadow.html42
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-6-noib-ref.html17
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-6-ref.html14
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-6.html26
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-7-noib-ref.html17
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-7-ref.html14
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-7.html26
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-8-noib-ref.html23
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-8-ref.html17
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-8a.html29
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-8b.html29
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-8c.html29
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-9-noib-ref.html34
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-9-ref.html22
-rw-r--r--layout/reftests/ib-split/insert-into-split-inline-9.html33
-rw-r--r--layout/reftests/ib-split/reftest.list65
-rw-r--r--layout/reftests/ib-split/relpos-inline-1-ref.html15
-rw-r--r--layout/reftests/ib-split/relpos-inline-1a.html22
-rw-r--r--layout/reftests/ib-split/relpos-inline-1b.html30
-rw-r--r--layout/reftests/ib-split/trailing-inline-with-continuations-1-ref.html14
-rw-r--r--layout/reftests/ib-split/trailing-inline-with-continuations-1.html17
89 files changed, 2189 insertions, 0 deletions
diff --git a/layout/reftests/ib-split/append-to-empty-trailing-inline-1-ref.html b/layout/reftests/ib-split/append-to-empty-trailing-inline-1-ref.html
new file mode 100644
index 0000000000..91dbb4659f
--- /dev/null
+++ b/layout/reftests/ib-split/append-to-empty-trailing-inline-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body > span { outline: 1px dotted black; }
+ body > span > span { display: block; width: 10em; }
+
+ </style>
+
+</head>
+<body>
+
+<span><span>A</span><span>A</span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/ib-split/append-to-empty-trailing-inline-1.html b/layout/reftests/ib-split/append-to-empty-trailing-inline-1.html
new file mode 100644
index 0000000000..c5f99bc530
--- /dev/null
+++ b/layout/reftests/ib-split/append-to-empty-trailing-inline-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <style type="text/css">
+
+ body > span { outline: 1px dotted black; }
+ body > span > span { display: block; width: 10em; }
+
+ </style>
+
+<script>
+function boom()
+{
+ var n = document.getElementById("a");
+ n.parentNode.appendChild(n.cloneNode(true));
+}
+</script>
+
+</head>
+<body onload="boom();">
+
+<span><span id="a">A</span></span>
+
+</body>
+</html>
diff --git a/layout/reftests/ib-split/append-to-nested-split-inline-1-noib-ref.html b/layout/reftests/ib-split/append-to-nested-split-inline-1-noib-ref.html
new file mode 100644
index 0000000000..18f6aaa2c6
--- /dev/null
+++ b/layout/reftests/ib-split/append-to-nested-split-inline-1-noib-ref.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ .outermost { border: 2px solid; }
+ .outer { border: 4px solid yellow; }
+ .inner { border: 6px sold green; }
+ </style>
+ </head>
+ <body>
+ <span class="outermost" style="border-right: none">
+ <span class="outer" style="border-right: none">
+ <span class="inner" style="border-right: none">
+ </span>
+ </span>
+ </span>
+ <span style="display: block"></span>
+ <span class="outermost" style="border-right: none; border-left: none">
+ <span class="outer" style="border-right: none; border-left: none">
+ <span class="inner" style="border-right: nonel border-left: none">
+ before span
+ </span>
+ </span>
+ </span>
+ <span style="display: block">span</span>
+ <span class="outermost" style="border-left: none">
+ <span class="outer" style="border-left: none">
+ <span class="inner" style="border-left: none">
+ after span
+ </span>
+ </span>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/append-to-nested-split-inline-1-ref.html b/layout/reftests/ib-split/append-to-nested-split-inline-1-ref.html
new file mode 100644
index 0000000000..fd54f25327
--- /dev/null
+++ b/layout/reftests/ib-split/append-to-nested-split-inline-1-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ #outermost { border: 2px solid; }
+ #outer { border: 4px solid yellow; }
+ #inner { border: 6px sold green; }
+ </style>
+ </head>
+ <body>
+ <span id="outermost">
+ <span id="outer">
+ <span id="inner">
+ <span style="display: block"></span>
+ before span
+ <span style="display: block">span</span>
+ after span
+ </span>
+ </span>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/append-to-nested-split-inline-1.html b/layout/reftests/ib-split/append-to-nested-split-inline-1.html
new file mode 100644
index 0000000000..0e4d2e11c4
--- /dev/null
+++ b/layout/reftests/ib-split/append-to-nested-split-inline-1.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <style>
+ #outermost { border: 2px solid; }
+ #outer { border: 4px solid yellow; }
+ #inner { border: 6px sold green; }
+ </style>
+ <script>
+ function doTest() {
+ var i = document.getElementById("inner");
+ var frag = document.createDocumentFragment();
+ var newSpan = document.createElement("span");
+ newSpan.appendChild(document.createTextNode("span"));
+ newSpan.style.display = "block";
+ frag.appendChild(newSpan);
+ frag.appendChild(document.createTextNode("after span"));
+ i.appendChild(frag);
+ }
+ </script>
+ </head>
+ <body onload="doTest()">
+ <span id="outermost">
+ <span id="outer">
+ <span id="inner">
+ <span style="display: block"></span>
+ before span
+ </span>
+ </span>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/ignored-margins-1-ref.html b/layout/reftests/ib-split/ignored-margins-1-ref.html
new file mode 100644
index 0000000000..dffae6e886
--- /dev/null
+++ b/layout/reftests/ib-split/ignored-margins-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="width: 100px; border: 1px solid green;">
+ <div style="display: block; height: 20px; width: 80px; margin: 10px 0 10px 10px; border: 5px solid black"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/ignored-margins-1a.html b/layout/reftests/ib-split/ignored-margins-1a.html
new file mode 100644
index 0000000000..5b84b9b586
--- /dev/null
+++ b/layout/reftests/ib-split/ignored-margins-1a.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="" />
+ <body>
+ <div style="direction: ltr; width: 100px; border: 1px solid green;">
+ <span>
+ <span style="display: block; height: 20px; width: 80px; margin: 10px; border: 5px solid black">
+ </span>
+ </span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/ignored-margins-1b.html b/layout/reftests/ib-split/ignored-margins-1b.html
new file mode 100644
index 0000000000..7707aac384
--- /dev/null
+++ b/layout/reftests/ib-split/ignored-margins-1b.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="" />
+ <body>
+ <div style="direction: ltr; width: 100px; border: 1px solid green;">
+ <span style="direction: rtl">
+ <span style="display: block; height: 20px; width: 80px; margin: 10px; border: 5px solid black">
+ </span>
+ </span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/ignored-margins-2-ref.html b/layout/reftests/ib-split/ignored-margins-2-ref.html
new file mode 100644
index 0000000000..029351265c
--- /dev/null
+++ b/layout/reftests/ib-split/ignored-margins-2-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="width: 100px; border: 1px solid green;">
+ <div style="display: block; height: 20px; width: 80px; margin: 10px 10px 10px 0; border: 5px solid black"></div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/ignored-margins-2a.html b/layout/reftests/ib-split/ignored-margins-2a.html
new file mode 100644
index 0000000000..ddd8c7c670
--- /dev/null
+++ b/layout/reftests/ib-split/ignored-margins-2a.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="" />
+ <body>
+ <div style="direction: rtl; width: 100px; border: 1px solid green;">
+ <span>
+ <span style="display: block; height: 20px; width: 80px; margin: 10px; border: 5px solid black">
+ </span>
+ </span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/ignored-margins-2b.html b/layout/reftests/ib-split/ignored-margins-2b.html
new file mode 100644
index 0000000000..f1db340706
--- /dev/null
+++ b/layout/reftests/ib-split/ignored-margins-2b.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="" />
+ <body>
+ <div style="direction: rtl; width: 100px; border: 1px solid green;">
+ <span style="direction: ltr">
+ <span style="display: block; height: 20px; width: 80px; margin: 10px; border: 5px solid black">
+ </span>
+ </span>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-1-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-1-noib-ref.html
new file mode 100644
index 0000000000..f1fc4662bf
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-1-noib-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ .notstart { border-left: none; }
+ .notend { border-right: none; }
+ </style>
+ </head>
+ <body>
+ <span class="notend">
+ <span>One</span><span>Two</span><span>Three</span>
+ </span>
+ <div>Four</div>
+ <span class="notstart notend"></span>
+ <div>Five</div>
+ <span class="notstart notend">
+ <span>Six</span>
+ </span>
+ <div>Seven</div>
+ <span class="notstart notend"></span>
+ <div>Eight</div>
+ <span class="notstart">
+ <span>Nine</span><span>Ten</span><span>Eleven</span>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-1-ref.html b/layout/reftests/ib-split/insert-into-split-inline-1-ref.html
new file mode 100644
index 0000000000..d39c1e9c15
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-1-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body>
+ <span
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ><span>Ten</span
+ ><span>Eleven</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-10-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-10-noib-ref.html
new file mode 100644
index 0000000000..314918890d
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-10-noib-ref.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ body > span > span { border: 3px solid cyan }
+ .notstart { border-left: none; }
+ .notend { border-right: none; }
+ </style>
+ </head>
+ <body>
+ <span class="notend">
+ <span class="notend">
+ <span>One</span><span>Two</span><span>Three</span>
+ </span>
+ </span>
+ <div>Four</div>
+ <span class="notstart notend"><span class="notstart notend"></span></span>
+ <div>Five</div>
+ <span class="notstart notend">
+ <span class="notstart notend">
+ <span>Six</span>
+ </span>
+ </span>
+ <div>Seven</div>
+ <span class="notstart notend"><span class="notstart notend"></span></span>
+ <div>Eight</div>
+ <span class="notstart">
+ <span class="notstart">
+ <span>Nine</span><span>Ten</span>
+ </span>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-10-ref.html b/layout/reftests/ib-split/insert-into-split-inline-10-ref.html
new file mode 100644
index 0000000000..edfd76a8ab
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-10-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ body > span > span { border: 3px solid cyan }
+ </style>
+ </head>
+ <body>
+ <span><span
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ><span>Ten</span
+ ></span></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-10.html b/layout/reftests/ib-split/insert-into-split-inline-10.html
new file mode 100644
index 0000000000..4a7f13bb5f
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-10.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Nine"));
+ document.getElementById("target").appendChild(newNode);
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ body > span > span { border: 3px solid cyan }
+ body > span > span::after { content: "Ten" }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span><span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ></span></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-11-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-11-noib-ref.html
new file mode 100644
index 0000000000..33448d82a8
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-11-noib-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ body > span > span { border: 3px solid cyan }
+ .notstart { border-left: none; }
+ .notend { border-right: none; }
+ </style>
+ </head>
+ <body>
+ <span class="notend">
+ <span class="notend">
+ <span>One</span><span>Two</span><span>Three</span>
+ </span>
+ </span>
+ <div>Four</div>
+ <span class="notstart notend"><span class="notstart notend"></span></span>
+ <div>Five</div>
+ <span class="notstart notend">
+ <span class="notstart notend">
+ <span>Six</span>
+ </span>
+ </span>
+ <div>Seven</div>
+ <span class="notstart notend"><span class="notstart notend"></span></span>
+ <div>Eight</div>
+ <span class="notstart notend">
+ <span class="notstart">
+ <span>Nine</span>
+ </span>
+ </span>
+ <div>Ten</div>
+ <span class="notstart"></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-11-ref.html b/layout/reftests/ib-split/insert-into-split-inline-11-ref.html
new file mode 100644
index 0000000000..ac41e37a4d
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-11-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ body > span > span { border: 3px solid cyan }
+ </style>
+ </head>
+ <body>
+ <span
+ ><span
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ></span
+ ><div>Ten</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-11.html b/layout/reftests/ib-split/insert-into-split-inline-11.html
new file mode 100644
index 0000000000..bb407bd828
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-11.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Nine"));
+ document.getElementById("target").appendChild(newNode);
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ body > span > span { border: 3px solid cyan }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span
+ ><span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ></span
+ ><div>Ten</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-12-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-12-noib-ref.html
new file mode 100644
index 0000000000..48bbbe2dc5
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-12-noib-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: inline; border: 2px solid; border-right: none">One</div>
+ <div>Two</div>
+ <div style="display: inline; border: 2px; border-style: solid none"></div>
+ <div>Three</div>
+ <div style="display: inline; border: 2px solid; border-left: none"></div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-12-ref.html b/layout/reftests/ib-split/insert-into-split-inline-12-ref.html
new file mode 100644
index 0000000000..caff28798d
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-12-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: inline; border: 2px solid">One<div>Two</div><div>Three</div></div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-12.html b/layout/reftests/ib-split/insert-into-split-inline-12.html
new file mode 100644
index 0000000000..ef60b86f00
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-12.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <style>
+ #i { display: inline; border: 2px solid; }
+ #i::after { display: block; content: "Three"; }
+ </style>
+ </head>
+ <body>
+ <div id="i"><script>document.body.offsetWidth</script>One<div>Two</div></div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-13-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-13-noib-ref.html
new file mode 100644
index 0000000000..b6c0d51725
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-13-noib-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: inline; border: 2px solid; border-right: none"></div>
+ <div>One</div>
+ <div style="display: inline; border: 2px solid; border-left: none">TwoThree</div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-13-ref.html b/layout/reftests/ib-split/insert-into-split-inline-13-ref.html
new file mode 100644
index 0000000000..3f0c3853b3
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-13-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: inline; border: 2px solid"><div>One</div>TwoThree</div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-13.html b/layout/reftests/ib-split/insert-into-split-inline-13.html
new file mode 100644
index 0000000000..fd62e4cb7f
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-13.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <style>
+ #i { border: 2px solid; }
+ #i::before { display: block; content: "One"; }
+ #i::after { content: "Three"; }
+ </style>
+ <script>
+ function doTest() {
+ var i = document.getElementById("i");
+ i.insertBefore(document.createTextNode("Two"), i.firstChild);
+ }
+ </script>
+ </head>
+ <body onload="doTest()">
+ <span id="i"><span style="display: none"></span></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-14-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-14-noib-ref.html
new file mode 100644
index 0000000000..67b3f7b3ad
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-14-noib-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: inline; border: 2px solid; border-right: none"></div>
+ <div>One</div>
+ <div style="display: inline; border: 2px solid; border-left: none">Two</div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-14-ref.html b/layout/reftests/ib-split/insert-into-split-inline-14-ref.html
new file mode 100644
index 0000000000..4f3817d4ea
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-14-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: inline; border: 2px solid"><div>One</div>Two</div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-14.html b/layout/reftests/ib-split/insert-into-split-inline-14.html
new file mode 100644
index 0000000000..84cbd5e02c
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-14.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <style>
+ #i { border: 2px solid; }
+ #i::before { display: block; content: "One"; }
+ </style>
+ <script>
+ function doTest() {
+ var i = document.getElementById("i");
+ i.insertBefore(document.createTextNode("Two"), i.firstChild);
+ }
+ </script>
+ </head>
+ <body onload="doTest()">
+ <span id="i"><span style="display: none"></span></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-15-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-15-noib-ref.html
new file mode 100644
index 0000000000..855b0fcfb4
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-15-noib-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: inline; border: 2px solid; border-right:none"></div>
+ <div>One</div>
+ <div style="display: inline; border: 2px solid; border-right:none; border-left: none">Two</div>
+ <div>Three</div>
+ <div style="display: inline; border: 2px solid; border-left: none"></div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-15-ref.html b/layout/reftests/ib-split/insert-into-split-inline-15-ref.html
new file mode 100644
index 0000000000..20dfadfad5
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-15-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: inline; border: 2px solid"><div>One</div>Two<div>Three</div></div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-15.html b/layout/reftests/ib-split/insert-into-split-inline-15.html
new file mode 100644
index 0000000000..3623272a49
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-15.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <style>
+ #i { display: inline; border: 2px solid; }
+ #i::after { display: block; content: "Three"; }
+ </style>
+ </head>
+ <body>
+ <div id="i"><script>document.body.offsetWidth</script><div>One</div>Two</div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-16-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-16-noib-ref.html
new file mode 100644
index 0000000000..e2166cae2c
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-16-noib-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: inline; border: 2px solid; border-right: none">One</div>
+ <div>Two</div>
+ <div style="display: inline; border: 2px solid; border-left: none"></div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-16-ref.html b/layout/reftests/ib-split/insert-into-split-inline-16-ref.html
new file mode 100644
index 0000000000..dfba61f0b6
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-16-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="display: inline; border: 2px solid">One<div>Two</div></div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-16a.html b/layout/reftests/ib-split/insert-into-split-inline-16a.html
new file mode 100644
index 0000000000..245dc2f1c6
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-16a.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <style>
+ #i { border: 2px solid; }
+ #i::after { display: block; content: "Two"; }
+ </style>
+ <script>
+ function doTest() {
+ var i = document.getElementById("i");
+ i.insertBefore(document.createTextNode("One"), i.firstChild);
+ }
+ </script>
+ </head>
+ <body onload="doTest()">
+ <span id="i"><span style="display: none"></span></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-16b.html b/layout/reftests/ib-split/insert-into-split-inline-16b.html
new file mode 100644
index 0000000000..f22363abee
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-16b.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <style>
+ #i { border: 2px solid; }
+ #i::after { display: block; content: "Two"; }
+ </style>
+ <script>
+ function doTest() {
+ var i = document.getElementById("i");
+ i.appendChild(document.createTextNode("One"));
+ }
+ </script>
+ </head>
+ <body onload="doTest()">
+ <span id="i"></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-17-ref.html b/layout/reftests/ib-split/insert-into-split-inline-17-ref.html
new file mode 100644
index 0000000000..2a37db0d08
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-17-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<style>
+ span { color: green; }
+</style>
+<span>
+ <div></div>
+ First Second Third
+ <div></div>
+</span>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-17.html b/layout/reftests/ib-split/insert-into-split-inline-17.html
new file mode 100644
index 0000000000..741264e80d
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-17.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<style>
+ #target { color: red; }
+ #target.green { color: green; }
+</style>
+<span id="target">
+ <div></div>
+ First <span id="next"> Third</span>
+ <div></div>
+</span>
+<script>
+ onload = function() {
+ var s = document.querySelector("#target");
+ window.color = getComputedStyle(s).color;
+ s.className = "green";
+ window.newColor = getComputedStyle(s).color;
+ s.insertBefore(document.createTextNode("Second"),
+ s.querySelector("#next"));
+ }
+</script>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-1a.html b/layout/reftests/ib-split/insert-into-split-inline-1a.html
new file mode 100644
index 0000000000..3c06bf170f
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-1a.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("One"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span id="insertion">Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ><span>Ten</span
+ ><span>Eleven</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-1b.html b/layout/reftests/ib-split/insert-into-split-inline-1b.html
new file mode 100644
index 0000000000..2a7ce1f4c0
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-1b.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Two"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span id="insertion">Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ><span>Ten</span
+ ><span>Eleven</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-1c.html b/layout/reftests/ib-split/insert-into-split-inline-1c.html
new file mode 100644
index 0000000000..77c4b649f6
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-1c.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Three"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><div id="insertion">Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ><span>Ten</span
+ ><span>Eleven</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-1d.html b/layout/reftests/ib-split/insert-into-split-inline-1d.html
new file mode 100644
index 0000000000..7adb00cbf6
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-1d.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("div");
+ newNode.appendChild(document.createTextNode("Four"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div id="insertion">Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ><span>Ten</span
+ ><span>Eleven</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-1e.html b/layout/reftests/ib-split/insert-into-split-inline-1e.html
new file mode 100644
index 0000000000..3e77ec03ec
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-1e.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("div");
+ newNode.appendChild(document.createTextNode("Five"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><span id="insertion">Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ><span>Ten</span
+ ><span>Eleven</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-1f.html b/layout/reftests/ib-split/insert-into-split-inline-1f.html
new file mode 100644
index 0000000000..b4e8293d12
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-1f.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Six"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><div id="insertion">Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ><span>Ten</span
+ ><span>Eleven</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-1g.html b/layout/reftests/ib-split/insert-into-split-inline-1g.html
new file mode 100644
index 0000000000..60ef581d56
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-1g.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("div");
+ newNode.appendChild(document.createTextNode("Seven"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div id="insertion">Eight</div
+ ><span>Nine</span
+ ><span>Ten</span
+ ><span>Eleven</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-1h.html b/layout/reftests/ib-split/insert-into-split-inline-1h.html
new file mode 100644
index 0000000000..7e88a8fbaf
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-1h.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("div");
+ newNode.appendChild(document.createTextNode("Eight"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><span id="insertion">Nine</span
+ ><span>Ten</span
+ ><span>Eleven</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-1i.html b/layout/reftests/ib-split/insert-into-split-inline-1i.html
new file mode 100644
index 0000000000..284a093a44
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-1i.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Nine"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span id="insertion">Ten</span
+ ><span>Eleven</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-1j.html b/layout/reftests/ib-split/insert-into-split-inline-1j.html
new file mode 100644
index 0000000000..7156be5239
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-1j.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Ten"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ><span id="insertion">Eleven</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-1k.html b/layout/reftests/ib-split/insert-into-split-inline-1k.html
new file mode 100644
index 0000000000..ac9a562a3f
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-1k.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Eleven"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ><span>Ten</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-1l.html b/layout/reftests/ib-split/insert-into-split-inline-1l.html
new file mode 100644
index 0000000000..810814c199
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-1l.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Eleven"));
+ document.getElementById("target").appendChild(newNode);
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ><span>Ten</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-2-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-2-noib-ref.html
new file mode 100644
index 0000000000..2ce2bb965b
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-2-noib-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ .notstart { border-left: none; }
+ .notend { border-right: none; }
+ </style>
+ </head>
+ <body>
+ <span class="notend">
+ <span>One</span><span>Two</span><span>Three</span>
+ </span>
+ <div>Four</div>
+ <span class="notstart notend"></span>
+ <div>Five</div>
+ <span class="notstart notend">
+ <span>Six</span>
+ </span>
+ <div>Seven</div>
+ <span class="notstart notend"></span>
+ <div>Eight</div>
+ <span class="notstart"></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-2-ref.html b/layout/reftests/ib-split/insert-into-split-inline-2-ref.html
new file mode 100644
index 0000000000..f70579c0e3
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-2-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body>
+ <span
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-2a.html b/layout/reftests/ib-split/insert-into-split-inline-2a.html
new file mode 100644
index 0000000000..08e2356e78
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-2a.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("One"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span id="insertion">Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-2b.html b/layout/reftests/ib-split/insert-into-split-inline-2b.html
new file mode 100644
index 0000000000..e665c05657
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-2b.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Two"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span id="insertion">Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-2c.html b/layout/reftests/ib-split/insert-into-split-inline-2c.html
new file mode 100644
index 0000000000..7d2d3fad2c
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-2c.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Three"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><div id="insertion">Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-2d.html b/layout/reftests/ib-split/insert-into-split-inline-2d.html
new file mode 100644
index 0000000000..b432ab3072
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-2d.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("div");
+ newNode.appendChild(document.createTextNode("Four"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div id="insertion">Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-2e.html b/layout/reftests/ib-split/insert-into-split-inline-2e.html
new file mode 100644
index 0000000000..33ae4ae487
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-2e.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("div");
+ newNode.appendChild(document.createTextNode("Five"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><span id="insertion">Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-2f.html b/layout/reftests/ib-split/insert-into-split-inline-2f.html
new file mode 100644
index 0000000000..9cf57ed5dc
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-2f.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Six"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><div id="insertion">Seven</div
+ ><div>Eight</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-2g.html b/layout/reftests/ib-split/insert-into-split-inline-2g.html
new file mode 100644
index 0000000000..4bea3c12b3
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-2g.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("div");
+ newNode.appendChild(document.createTextNode("Seven"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div id="insertion">Eight</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-2h.html b/layout/reftests/ib-split/insert-into-split-inline-2h.html
new file mode 100644
index 0000000000..365e6c6015
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-2h.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("div");
+ newNode.appendChild(document.createTextNode("Eight"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-2i.html b/layout/reftests/ib-split/insert-into-split-inline-2i.html
new file mode 100644
index 0000000000..f45e802f59
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-2i.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("div");
+ newNode.appendChild(document.createTextNode("Eight"));
+ document.getElementById("target").appendChild(newNode);
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-3-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-3-noib-ref.html
new file mode 100644
index 0000000000..1fc31e04dd
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-3-noib-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ .notstart { border-left: none; }
+ .notend { border-right: none; }
+ </style>
+ </head>
+ <body>
+ <span class="notend">
+ <span>One</span><span>Two</span><span>Three</span>
+ </span>
+ <div>Four</div>
+ <span class="notstart notend"></span>
+ <div>Five</div>
+ <span class="notstart notend">
+ <span>Six</span>
+ </span>
+ <div>Seven</div>
+ <span class="notstart notend"></span>
+ <div>Eight</div>
+ <span class="notstart">
+ <span>Nine</span>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-3-ref.html b/layout/reftests/ib-split/insert-into-split-inline-3-ref.html
new file mode 100644
index 0000000000..0f1f774072
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-3-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body>
+ <span
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-3.html b/layout/reftests/ib-split/insert-into-split-inline-3.html
new file mode 100644
index 0000000000..75d6e45fea
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-3.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Nine"));
+ document.getElementById("target").appendChild(newNode);
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-4-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-4-noib-ref.html
new file mode 100644
index 0000000000..adcb6bc4ff
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-4-noib-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ .notstart { border-left: none; }
+ .notend { border-right: none; }
+ </style>
+ </head>
+ <body>
+ <span class="notend">
+ <span>One</span><span>Two</span><span>Three</span>
+ </span>
+ <div>Four</div>
+ <span class="notstart notend"></span>
+ <div>Five</div>
+ <span class="notstart notend">
+ <span>Six</span>
+ </span>
+ <div>Seven</div>
+ <span class="notstart notend"></span>
+ <div>Eight</div>
+ <span class="notstart">
+ <span>Nine</span><span>Ten</span>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-4-ref.html b/layout/reftests/ib-split/insert-into-split-inline-4-ref.html
new file mode 100644
index 0000000000..40f9b4d9d6
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-4-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body>
+ <span
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ><span>Ten</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-4.html b/layout/reftests/ib-split/insert-into-split-inline-4.html
new file mode 100644
index 0000000000..ab855cb32d
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-4.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Nine"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span id="insertion">Ten</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-5-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-5-noib-ref.html
new file mode 100644
index 0000000000..1fc31e04dd
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-5-noib-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ .notstart { border-left: none; }
+ .notend { border-right: none; }
+ </style>
+ </head>
+ <body>
+ <span class="notend">
+ <span>One</span><span>Two</span><span>Three</span>
+ </span>
+ <div>Four</div>
+ <span class="notstart notend"></span>
+ <div>Five</div>
+ <span class="notstart notend">
+ <span>Six</span>
+ </span>
+ <div>Seven</div>
+ <span class="notstart notend"></span>
+ <div>Eight</div>
+ <span class="notstart">
+ <span>Nine</span>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-5-ref.html b/layout/reftests/ib-split/insert-into-split-inline-5-ref.html
new file mode 100644
index 0000000000..0f1f774072
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-5-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body>
+ <span
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-5-shadow.html b/layout/reftests/ib-split/insert-into-split-inline-5-shadow.html
new file mode 100644
index 0000000000..327840d9d2
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-5-shadow.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ customElements.define("custom-element", class extends HTMLElement {
+ constructor() {
+ super();
+ const template = document.getElementById("template");
+ const shadowRoot = this.attachShadow({mode: "open"})
+ .appendChild(template.content.cloneNode(true));
+ }
+ });
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Nine"));
+ document.getElementById("target").appendChild(newNode);
+ }
+ </script>
+ <style>
+ body > custom-element { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <template id="template">
+ <!-- Multiple insertion points to force appends to be handled via
+ ContentInserted -->
+ <slot name="foo"></slot>
+ <slot name="bar"></slot>
+ <slot></slot>
+ </template>
+ <custom-element id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ></custom-element>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-6-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-6-noib-ref.html
new file mode 100644
index 0000000000..d108d46261
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-6-noib-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ .notstart { border-left: none; }
+ .notend { border-right: none; }
+ </style>
+ </head>
+ <body>
+ <span class="notend"></span>
+ <div>One</div>
+ <span class="notstart notend"></span>
+ <div>Two</div>
+ <span class="notstart"></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-6-ref.html b/layout/reftests/ib-split/insert-into-split-inline-6-ref.html
new file mode 100644
index 0000000000..db4a17e81b
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-6-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body>
+ <span
+ ><div>One</div
+ ><div>Two</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-6.html b/layout/reftests/ib-split/insert-into-split-inline-6.html
new file mode 100644
index 0000000000..5369d45e7c
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-6.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("div");
+ newNode.appendChild(document.createTextNode("One"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><div id="insertion">Two</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-7-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-7-noib-ref.html
new file mode 100644
index 0000000000..970a2000b2
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-7-noib-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ .notstart { border-left: none; }
+ .notend { border-right: none; }
+ </style>
+ </head>
+ <body>
+ <span class="notend"></span>
+ <div>One</div>
+ <span class="notstart">
+ <span>Two</span>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-7-ref.html b/layout/reftests/ib-split/insert-into-split-inline-7-ref.html
new file mode 100644
index 0000000000..b1de27398e
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-7-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body>
+ <span
+ ><div>One</div
+ ><span>Two</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-7.html b/layout/reftests/ib-split/insert-into-split-inline-7.html
new file mode 100644
index 0000000000..72c0fa35d9
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-7.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("div");
+ newNode.appendChild(document.createTextNode("One"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span id="insertion">Two</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-8-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-8-noib-ref.html
new file mode 100644
index 0000000000..676c6d6b06
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-8-noib-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ .notstart { border-left: none; }
+ .notend { border-right: none; }
+ </style>
+ </head>
+ <body>
+ <span class="notend">
+ <span>One</span>
+ </span>
+ <div>Two</div>
+ <span class="notstart notend">
+ <span>Three</span>
+ </span>
+ <div>Four</div>
+ <span class="notstart">
+ <span>Five</span>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-8-ref.html b/layout/reftests/ib-split/insert-into-split-inline-8-ref.html
new file mode 100644
index 0000000000..7da41de3cb
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-8-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body>
+ <span
+ ><span>One</span
+ ><div>Two</div
+ ><span>Three</span
+ ><div>Four</div
+ ><span>Five</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-8a.html b/layout/reftests/ib-split/insert-into-split-inline-8a.html
new file mode 100644
index 0000000000..4cc69e95da
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-8a.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("div");
+ newNode.appendChild(document.createTextNode("Two"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><span id="insertion">Three</span
+ ><div>Four</div
+ ><span>Five</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-8b.html b/layout/reftests/ib-split/insert-into-split-inline-8b.html
new file mode 100644
index 0000000000..0268a5dabe
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-8b.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("div");
+ newNode.appendChild(document.createTextNode("Four"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><span>One</span
+ ><div>Two</div
+ ><span>Three</span
+ ><span id="insertion">Five</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-8c.html b/layout/reftests/ib-split/insert-into-split-inline-8c.html
new file mode 100644
index 0000000000..2af4c34ae8
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-8c.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("One"));
+ document.getElementById("target")
+ .insertBefore(newNode, document.getElementById("insertion"));
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span id="target"
+ ><div id="insertion">Two</div
+ ><span>Three</span
+ ><div>Four</div
+ ><span>Five</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-9-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-9-noib-ref.html
new file mode 100644
index 0000000000..f8d4452c35
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-9-noib-ref.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ body > span > span { border: 3px solid cyan }
+ .notstart { border-left: none; }
+ .notend { border-right: none; }
+ </style>
+ </head>
+ <body>
+ <span class="notend">
+ <span class="notend">
+ <span>One</span><span>Two</span><span>Three</span>
+ </span>
+ </span>
+ <div>Four</div>
+ <span class="notstart notend"><span class="notstart notend"></span></span>
+ <div>Five</div>
+ <span class="notstart notend">
+ <span class="notstart notend">
+ <span>Six</span>
+ </span>
+ </span>
+ <div>Seven</div>
+ <span class="notstart notend"><span class="notstart notend"></span></span>
+ <div>Eight</div>
+ <span class="notstart">
+ <span class="notstart">
+ <span>Nine</span>
+ </span>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-9-ref.html b/layout/reftests/ib-split/insert-into-split-inline-9-ref.html
new file mode 100644
index 0000000000..5b6360f8f0
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-9-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ body > span > span { border: 3px solid cyan }
+ </style>
+ </head>
+ <body>
+ <span><span
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ><span>Nine</span
+ ></span></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/insert-into-split-inline-9.html b/layout/reftests/ib-split/insert-into-split-inline-9.html
new file mode 100644
index 0000000000..863a5ccf56
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-9.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="dom" />
+ <script>
+ function doit() {
+ var newNode = document.createElement("span");
+ newNode.appendChild(document.createTextNode("Nine"));
+ document.getElementById("target").appendChild(newNode);
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ body > span > span { border: 3px solid cyan }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span><span id="target"
+ ><span>One</span
+ ><span>Two</span
+ ><span>Three</span
+ ><div>Four</div
+ ><div>Five</div
+ ><span>Six</span
+ ><div>Seven</div
+ ><div>Eight</div
+ ></span></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/reftest.list b/layout/reftests/ib-split/reftest.list
new file mode 100644
index 0000000000..4fd2d9318d
--- /dev/null
+++ b/layout/reftests/ib-split/reftest.list
@@ -0,0 +1,65 @@
+== insert-into-split-inline-1a.html insert-into-split-inline-1-ref.html
+== insert-into-split-inline-1b.html insert-into-split-inline-1-ref.html
+== insert-into-split-inline-1c.html insert-into-split-inline-1-ref.html
+== insert-into-split-inline-1d.html insert-into-split-inline-1-ref.html
+== insert-into-split-inline-1e.html insert-into-split-inline-1-ref.html
+== insert-into-split-inline-1f.html insert-into-split-inline-1-ref.html
+== insert-into-split-inline-1g.html insert-into-split-inline-1-ref.html
+== insert-into-split-inline-1h.html insert-into-split-inline-1-ref.html
+== insert-into-split-inline-1i.html insert-into-split-inline-1-ref.html
+== insert-into-split-inline-1j.html insert-into-split-inline-1-ref.html
+== insert-into-split-inline-1k.html insert-into-split-inline-1-ref.html
+== insert-into-split-inline-1l.html insert-into-split-inline-1-ref.html
+== insert-into-split-inline-1-ref.html insert-into-split-inline-1-noib-ref.html
+== insert-into-split-inline-2a.html insert-into-split-inline-2-ref.html
+== insert-into-split-inline-2b.html insert-into-split-inline-2-ref.html
+== insert-into-split-inline-2c.html insert-into-split-inline-2-ref.html
+== insert-into-split-inline-2d.html insert-into-split-inline-2-ref.html
+== insert-into-split-inline-2e.html insert-into-split-inline-2-ref.html
+== insert-into-split-inline-2f.html insert-into-split-inline-2-ref.html
+== insert-into-split-inline-2g.html insert-into-split-inline-2-ref.html
+== insert-into-split-inline-2h.html insert-into-split-inline-2-ref.html
+== insert-into-split-inline-2i.html insert-into-split-inline-2-ref.html
+== insert-into-split-inline-2-ref.html insert-into-split-inline-2-noib-ref.html
+== insert-into-split-inline-3.html insert-into-split-inline-3-ref.html
+== insert-into-split-inline-3-ref.html insert-into-split-inline-3-noib-ref.html
+== insert-into-split-inline-4.html insert-into-split-inline-4-ref.html
+== insert-into-split-inline-4-ref.html insert-into-split-inline-4-noib-ref.html
+== insert-into-split-inline-5-shadow.html insert-into-split-inline-5-ref.html
+== insert-into-split-inline-5-ref.html insert-into-split-inline-5-noib-ref.html
+== insert-into-split-inline-6.html insert-into-split-inline-6-ref.html
+== insert-into-split-inline-6-ref.html insert-into-split-inline-6-noib-ref.html
+== insert-into-split-inline-7.html insert-into-split-inline-7-ref.html
+== insert-into-split-inline-7-ref.html insert-into-split-inline-7-noib-ref.html
+== insert-into-split-inline-8a.html insert-into-split-inline-8-ref.html
+== insert-into-split-inline-8b.html insert-into-split-inline-8-ref.html
+== insert-into-split-inline-8c.html insert-into-split-inline-8-ref.html
+== insert-into-split-inline-8-ref.html insert-into-split-inline-8-noib-ref.html
+== insert-into-split-inline-9.html insert-into-split-inline-9-ref.html
+== insert-into-split-inline-9-ref.html insert-into-split-inline-9-noib-ref.html
+== insert-into-split-inline-10.html insert-into-split-inline-10-ref.html
+== insert-into-split-inline-10-ref.html insert-into-split-inline-10-noib-ref.html
+== insert-into-split-inline-11.html insert-into-split-inline-11-ref.html
+== insert-into-split-inline-11-ref.html insert-into-split-inline-11-noib-ref.html
+== insert-into-split-inline-12.html insert-into-split-inline-12-ref.html
+== insert-into-split-inline-12-ref.html insert-into-split-inline-12-noib-ref.html
+== insert-into-split-inline-13.html insert-into-split-inline-13-ref.html
+== insert-into-split-inline-13-ref.html insert-into-split-inline-13-noib-ref.html
+== insert-into-split-inline-14.html insert-into-split-inline-14-ref.html
+== insert-into-split-inline-14-ref.html insert-into-split-inline-14-noib-ref.html
+== insert-into-split-inline-15.html insert-into-split-inline-15-ref.html
+== insert-into-split-inline-15-ref.html insert-into-split-inline-15-noib-ref.html
+== insert-into-split-inline-16a.html insert-into-split-inline-16-ref.html
+== insert-into-split-inline-16b.html insert-into-split-inline-16-ref.html
+== insert-into-split-inline-16-ref.html insert-into-split-inline-16-noib-ref.html
+== insert-into-split-inline-17.html insert-into-split-inline-17-ref.html
+== ignored-margins-1a.html ignored-margins-1-ref.html
+== ignored-margins-1b.html ignored-margins-1-ref.html
+== ignored-margins-2a.html ignored-margins-2-ref.html
+== ignored-margins-2b.html ignored-margins-2-ref.html
+== trailing-inline-with-continuations-1.html trailing-inline-with-continuations-1-ref.html
+== append-to-empty-trailing-inline-1.html append-to-empty-trailing-inline-1-ref.html
+== append-to-nested-split-inline-1.html append-to-nested-split-inline-1-ref.html
+== append-to-nested-split-inline-1-ref.html append-to-nested-split-inline-1-noib-ref.html
+== relpos-inline-1a.html relpos-inline-1-ref.html
+== relpos-inline-1b.html relpos-inline-1-ref.html
diff --git a/layout/reftests/ib-split/relpos-inline-1-ref.html b/layout/reftests/ib-split/relpos-inline-1-ref.html
new file mode 100644
index 0000000000..074c4fc480
--- /dev/null
+++ b/layout/reftests/ib-split/relpos-inline-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ span, div { position: relative; left: 200px }
+ html {
+ overflow: hidden;
+ }
+ </style>
+ </head>
+ <body>
+ <span>All text should be offset 200px.</span>
+ <div>Some more text</div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/relpos-inline-1a.html b/layout/reftests/ib-split/relpos-inline-1a.html
new file mode 100644
index 0000000000..b2059bc67e
--- /dev/null
+++ b/layout/reftests/ib-split/relpos-inline-1a.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="" />
+ <style>
+ span { position: relative; left: 200px }
+ html {
+ overflow: hidden;
+ }
+ </style>
+ </head>
+ <body>
+ <span style="position: relative; left: 200px">
+ All text should be offset 200px.
+ <div>Some more text</div>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/relpos-inline-1b.html b/layout/reftests/ib-split/relpos-inline-1b.html
new file mode 100644
index 0000000000..e9f7bd62cf
--- /dev/null
+++ b/layout/reftests/ib-split/relpos-inline-1b.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="" />
+ <style>
+ span { position: relative }
+ html {
+ overflow: hidden;
+ }
+ </style>
+ </head>
+ <body>
+ <span style="position: relative; left: 100px">
+ All text should be offset 200px.
+ <div>Some more text</div>
+ </span>
+ <script>
+ onload = function() {
+ var s = document.querySelector("span");
+ s.offsetWidth; // flush layout
+ s.style.left = "200px";
+ document.documentElement.className = "";
+ }
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/trailing-inline-with-continuations-1-ref.html b/layout/reftests/ib-split/trailing-inline-with-continuations-1-ref.html
new file mode 100644
index 0000000000..cb880abbb5
--- /dev/null
+++ b/layout/reftests/ib-split/trailing-inline-with-continuations-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <body style="width: 0">
+ <span style="border: 2px solid blue; border-right: none"></span>
+ <span style="display: block"></span>
+ <span style="border: 2px solid blue; border-left: none; border-right: none">
+ a b
+ </span>
+ <span style="display: block"></span>
+ <span style="border: 2px solid blue; border-left: none;">
+ c
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/trailing-inline-with-continuations-1.html b/layout/reftests/ib-split/trailing-inline-with-continuations-1.html
new file mode 100644
index 0000000000..f2ea255e2f
--- /dev/null
+++ b/layout/reftests/ib-split/trailing-inline-with-continuations-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <title>CSS 2.1 Test Suite: handling of blocks inside inlines</title>
+ <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
+ <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"/>
+ <meta name="flags" content="" />
+ <body style="width: 0">
+ <span style="border: 2px solid blue;">
+ <span style="display: block"></span>
+ a b
+ <script>document.body.offsetWidth</script>
+ <span style="display: block"></span>
+ c
+ </span>
+ </body>
+</html>