summaryrefslogtreecommitdiffstats
path: root/layout/reftests/ib-split
diff options
context:
space:
mode:
Diffstat (limited to 'layout/reftests/ib-split')
-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/emptyspan-1-ref.html6
-rw-r--r--layout/reftests/ib-split/emptyspan-1.html12
-rw-r--r--layout/reftests/ib-split/emptyspan-2-ref.html6
-rw-r--r--layout/reftests/ib-split/emptyspan-2.html12
-rw-r--r--layout/reftests/ib-split/emptyspan-3-ref.html6
-rw-r--r--layout/reftests/ib-split/emptyspan-3.html12
-rw-r--r--layout/reftests/ib-split/emptyspan-4-ref.html6
-rw-r--r--layout/reftests/ib-split/emptyspan-4.html12
-rw-r--r--layout/reftests/ib-split/float-inside-inline-between-blocks-1-ref.html14
-rw-r--r--layout/reftests/ib-split/float-inside-inline-between-blocks-1.html19
-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-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.html28
-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/insert-into-split-inline-force-ContentInserted.xml11
-rw-r--r--layout/reftests/ib-split/percent-height-1-ref.html6
-rw-r--r--layout/reftests/ib-split/percent-height-1.html14
-rw-r--r--layout/reftests/ib-split/reftest-stylo.list86
-rw-r--r--layout/reftests/ib-split/reftest.list85
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-1-noib-ref.html17
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-1-ref.html14
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-1.html26
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-2-ref.html14
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-2.html26
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-3-noib-ref.html17
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-3-ref.html14
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-3.html27
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-4-noib-ref.html20
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-4-ref.html16
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-4.html28
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-5-noib-ref.html20
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-5-ref.html16
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-5.html28
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-6-noib-ref.html20
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-6-ref.html16
-rw-r--r--layout/reftests/ib-split/remove-from-split-inline-6.html28
-rw-r--r--layout/reftests/ib-split/remove-split-inline-1-ref.html7
-rw-r--r--layout/reftests/ib-split/remove-split-inline-1.html25
-rw-r--r--layout/reftests/ib-split/split-inner-inline-1-ref.html8
-rw-r--r--layout/reftests/ib-split/split-inner-inline-1.html21
-rw-r--r--layout/reftests/ib-split/split-inner-inline-2-ref.html13
-rw-r--r--layout/reftests/ib-split/split-inner-inline-2.html19
-rw-r--r--layout/reftests/ib-split/table-pseudo-in-part3-1-ref.html11
-rw-r--r--layout/reftests/ib-split/table-pseudo-in-part3-1.html19
-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
-rw-r--r--layout/reftests/ib-split/whitespace-present-1-ref.html17
-rw-r--r--layout/reftests/ib-split/whitespace-present-1a.html19
-rw-r--r--layout/reftests/ib-split/whitespace-present-1b.html25
126 files changed, 2852 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 000000000..91dbb4659
--- /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 000000000..c5f99bc53
--- /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 000000000..18f6aaa2c
--- /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 000000000..fd54f2532
--- /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 000000000..0e4d2e11c
--- /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/emptyspan-1-ref.html b/layout/reftests/ib-split/emptyspan-1-ref.html
new file mode 100644
index 000000000..00064d7ad
--- /dev/null
+++ b/layout/reftests/ib-split/emptyspan-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<body style="direction: ltr">
+ <span style="display: block">x</span>
+ <span style="border: 5px solid blue; border-left: none; border-right: none;
+ padding-right: 10px"></span>
+</body>
diff --git a/layout/reftests/ib-split/emptyspan-1.html b/layout/reftests/ib-split/emptyspan-1.html
new file mode 100644
index 000000000..3507344f5
--- /dev/null
+++ b/layout/reftests/ib-split/emptyspan-1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE 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="direction: ltr">
+ <span style="border: 5px solid blue; border-left: none; border-right: none;
+ padding-right: 10px">
+ <span style="display: block">x</span>
+ </span>
+</body>
diff --git a/layout/reftests/ib-split/emptyspan-2-ref.html b/layout/reftests/ib-split/emptyspan-2-ref.html
new file mode 100644
index 000000000..a1b36c44a
--- /dev/null
+++ b/layout/reftests/ib-split/emptyspan-2-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<body style="direction: rtl">
+ <span style="border: 5px solid blue; border-left: none; border-right: none;
+ padding-right: 10px"></span>
+ <span style="display: block">x</span>
+</body>
diff --git a/layout/reftests/ib-split/emptyspan-2.html b/layout/reftests/ib-split/emptyspan-2.html
new file mode 100644
index 000000000..a383b3fd7
--- /dev/null
+++ b/layout/reftests/ib-split/emptyspan-2.html
@@ -0,0 +1,12 @@
+<!DOCTYPE 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="direction: rtl">
+ <span style="border: 5px solid blue; border-left: none; border-right: none;
+ padding-right: 10px">
+ <span style="display: block">x</span>
+ </span>
+</body>
diff --git a/layout/reftests/ib-split/emptyspan-3-ref.html b/layout/reftests/ib-split/emptyspan-3-ref.html
new file mode 100644
index 000000000..df55fda18
--- /dev/null
+++ b/layout/reftests/ib-split/emptyspan-3-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<body style="direction: ltr">
+ <span style="border: 5px solid blue; border-left: none; border-right: none;
+ padding-left: 10px"></span>
+ <span style="display: block">x</span>
+</body>
diff --git a/layout/reftests/ib-split/emptyspan-3.html b/layout/reftests/ib-split/emptyspan-3.html
new file mode 100644
index 000000000..c0a9b376a
--- /dev/null
+++ b/layout/reftests/ib-split/emptyspan-3.html
@@ -0,0 +1,12 @@
+<!DOCTYPE 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="direction: ltr">
+ <span style="border: 5px solid blue; border-left: none; border-right: none;
+ padding-left: 10px">
+ <span style="display: block">x</span>
+ </span>
+</body>
diff --git a/layout/reftests/ib-split/emptyspan-4-ref.html b/layout/reftests/ib-split/emptyspan-4-ref.html
new file mode 100644
index 000000000..314c29041
--- /dev/null
+++ b/layout/reftests/ib-split/emptyspan-4-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<body style="direction: rtl">
+ <span style="display: block">x</span>
+ <span style="border: 5px solid blue; border-left: none; border-right: none;
+ padding-left: 10px"></span>
+</body>
diff --git a/layout/reftests/ib-split/emptyspan-4.html b/layout/reftests/ib-split/emptyspan-4.html
new file mode 100644
index 000000000..7dd2e3492
--- /dev/null
+++ b/layout/reftests/ib-split/emptyspan-4.html
@@ -0,0 +1,12 @@
+<!DOCTYPE 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="direction: rtl">
+ <span style="border: 5px solid blue; border-left: none; border-right: none;
+ padding-left: 10px">
+ <span style="display: block">x</span>
+ </span>
+</body>
diff --git a/layout/reftests/ib-split/float-inside-inline-between-blocks-1-ref.html b/layout/reftests/ib-split/float-inside-inline-between-blocks-1-ref.html
new file mode 100644
index 000000000..c23403f6e
--- /dev/null
+++ b/layout/reftests/ib-split/float-inside-inline-between-blocks-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="position: relative; left: 100px">
+ aaa
+ </div>
+ <span style="position: relative; left: 100px">
+ <span style="float: left">bbb</span>
+ </span>
+ <div style="position: relative; left: 100px">
+ aaa
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/float-inside-inline-between-blocks-1.html b/layout/reftests/ib-split/float-inside-inline-between-blocks-1.html
new file mode 100644
index 000000000..0c07816b5
--- /dev/null
+++ b/layout/reftests/ib-split/float-inside-inline-between-blocks-1.html
@@ -0,0 +1,19 @@
+<!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>
+ <span style="position: relative; left: 100px">
+ <span style="display: block">
+ aaa
+ </span>
+ <span style="float: left">bbb</span>
+ <span style="display: block">
+ aaa
+ </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 000000000..dffae6e88
--- /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 000000000..5b84b9b58
--- /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 000000000..7707aac38
--- /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 000000000..029351265
--- /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 000000000..ddd8c7c67
--- /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 000000000..f1db34070
--- /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 000000000..f1fc4662b
--- /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 000000000..d39c1e9c1
--- /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 000000000..314918890
--- /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 000000000..edfd76a8a
--- /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 000000000..4a7f13bb5
--- /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 000000000..33448d82a
--- /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 000000000..ac41e37a4
--- /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 000000000..bb407bd82
--- /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 000000000..48bbbe2dc
--- /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 000000000..caff28798
--- /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 000000000..ef60b86f0
--- /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 000000000..b6c0d5172
--- /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 000000000..3f0c3853b
--- /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 000000000..fd62e4cb7
--- /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 000000000..67b3f7b3a
--- /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 000000000..4f3817d4e
--- /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 000000000..84cbd5e02
--- /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 000000000..855b0fcfb
--- /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 000000000..20dfadfad
--- /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 000000000..3623272a4
--- /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 000000000..e2166cae2
--- /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 000000000..dfba61f0b
--- /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 000000000..245dc2f1c
--- /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 000000000..f22363abe
--- /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-1a.html b/layout/reftests/ib-split/insert-into-split-inline-1a.html
new file mode 100644
index 000000000..3c06bf170
--- /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 000000000..2a7ce1f4c
--- /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 000000000..77c4b649f
--- /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 000000000..7adb00cbf
--- /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 000000000..3e77ec03e
--- /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 000000000..b4e8293d1
--- /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 000000000..60ef581d5
--- /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 000000000..7e88a8fba
--- /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 000000000..284a093a4
--- /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 000000000..7156be523
--- /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 000000000..ac9a562a3
--- /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 000000000..810814c19
--- /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 000000000..2ce2bb965
--- /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 000000000..f70579c0e
--- /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 000000000..08e2356e7
--- /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 000000000..e665c0565
--- /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 000000000..7d2d3fad2
--- /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 000000000..b432ab307
--- /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 000000000..33ae4ae48
--- /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 000000000..9cf57ed5d
--- /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 000000000..4bea3c12b
--- /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 000000000..365e6c601
--- /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 000000000..f45e802f5
--- /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 000000000..1fc31e04d
--- /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 000000000..0f1f77407
--- /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 000000000..75d6e45fe
--- /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 000000000..adcb6bc4f
--- /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 000000000..40f9b4d9d
--- /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 000000000..ab855cb32
--- /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 000000000..1fc31e04d
--- /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 000000000..0f1f77407
--- /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.html b/layout/reftests/ib-split/insert-into-split-inline-5.html
new file mode 100644
index 000000000..f6536acd3
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-5.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <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"
+ style="-moz-binding: url(insert-into-split-inline-force-ContentInserted.xml#test);"
+ ><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-6-noib-ref.html b/layout/reftests/ib-split/insert-into-split-inline-6-noib-ref.html
new file mode 100644
index 000000000..d108d4626
--- /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 000000000..db4a17e81
--- /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 000000000..5369d45e7
--- /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 000000000..970a2000b
--- /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 000000000..b1de27398
--- /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 000000000..72c0fa35d
--- /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 000000000..676c6d6b0
--- /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 000000000..7da41de3c
--- /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 000000000..4cc69e95d
--- /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 000000000..0268a5dab
--- /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 000000000..2af4c34ae
--- /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 000000000..f8d4452c3
--- /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 000000000..5b6360f8f
--- /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 000000000..863a5ccf5
--- /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/insert-into-split-inline-force-ContentInserted.xml b/layout/reftests/ib-split/insert-into-split-inline-force-ContentInserted.xml
new file mode 100644
index 000000000..5a9d654de
--- /dev/null
+++ b/layout/reftests/ib-split/insert-into-split-inline-force-ContentInserted.xml
@@ -0,0 +1,11 @@
+<bindings xmlns="http://www.mozilla.org/xbl">
+ <binding id="test">
+ <content>
+ <!-- Multiple insertion points to force appends to be handled via
+ ContentInserted -->
+ <children includes="foo"/>
+ <children includes="bar"/>
+ <children/>
+ </content>
+ </binding>
+</bindings>
diff --git a/layout/reftests/ib-split/percent-height-1-ref.html b/layout/reftests/ib-split/percent-height-1-ref.html
new file mode 100644
index 000000000..3714a9c98
--- /dev/null
+++ b/layout/reftests/ib-split/percent-height-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <div style="height: 100px; border: 10px solid black"></div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/percent-height-1.html b/layout/reftests/ib-split/percent-height-1.html
new file mode 100644
index 000000000..defa60512
--- /dev/null
+++ b/layout/reftests/ib-split/percent-height-1.html
@@ -0,0 +1,14 @@
+<!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="height: 200px">
+ <span>
+ <span style="display: block; height: 50%; border: 10px solid black">
+ </span>
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/reftest-stylo.list b/layout/reftests/ib-split/reftest-stylo.list
new file mode 100644
index 000000000..2c5b4b204
--- /dev/null
+++ b/layout/reftests/ib-split/reftest-stylo.list
@@ -0,0 +1,86 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== remove-split-inline-1.html remove-split-inline-1.html
+== remove-from-split-inline-1.html remove-from-split-inline-1.html
+== remove-from-split-inline-1-ref.html remove-from-split-inline-1-ref.html
+== remove-from-split-inline-2.html remove-from-split-inline-2.html
+== remove-from-split-inline-3.html remove-from-split-inline-3.html
+== remove-from-split-inline-3-ref.html remove-from-split-inline-3-ref.html
+== remove-from-split-inline-4.html remove-from-split-inline-4.html
+== remove-from-split-inline-4-ref.html remove-from-split-inline-4-ref.html
+== remove-from-split-inline-5.html remove-from-split-inline-5.html
+== remove-from-split-inline-5-ref.html remove-from-split-inline-5-ref.html
+== remove-from-split-inline-6.html remove-from-split-inline-6.html
+== remove-from-split-inline-6-ref.html remove-from-split-inline-6-ref.html
+== insert-into-split-inline-1a.html insert-into-split-inline-1a.html
+== insert-into-split-inline-1b.html insert-into-split-inline-1b.html
+== insert-into-split-inline-1c.html insert-into-split-inline-1c.html
+== insert-into-split-inline-1d.html insert-into-split-inline-1d.html
+== insert-into-split-inline-1e.html insert-into-split-inline-1e.html
+== insert-into-split-inline-1f.html insert-into-split-inline-1f.html
+== insert-into-split-inline-1g.html insert-into-split-inline-1g.html
+== insert-into-split-inline-1h.html insert-into-split-inline-1h.html
+== insert-into-split-inline-1i.html insert-into-split-inline-1i.html
+== insert-into-split-inline-1j.html insert-into-split-inline-1j.html
+== insert-into-split-inline-1k.html insert-into-split-inline-1k.html
+== insert-into-split-inline-1l.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-2a.html insert-into-split-inline-2a.html
+== insert-into-split-inline-2b.html insert-into-split-inline-2b.html
+== insert-into-split-inline-2c.html insert-into-split-inline-2c.html
+== insert-into-split-inline-2d.html insert-into-split-inline-2d.html
+== insert-into-split-inline-2e.html insert-into-split-inline-2e.html
+== insert-into-split-inline-2f.html insert-into-split-inline-2f.html
+== insert-into-split-inline-2g.html insert-into-split-inline-2g.html
+== insert-into-split-inline-2h.html insert-into-split-inline-2h.html
+== insert-into-split-inline-2i.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-3.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-4.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-5.html insert-into-split-inline-5.html
+== insert-into-split-inline-5-ref.html insert-into-split-inline-5-ref.html
+== insert-into-split-inline-6.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-7.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-8a.html insert-into-split-inline-8a.html
+== insert-into-split-inline-8b.html insert-into-split-inline-8b.html
+== insert-into-split-inline-8c.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-9.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-10.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-11.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-12.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-13.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-14.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-15.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-16a.html insert-into-split-inline-16a.html
+== insert-into-split-inline-16b.html insert-into-split-inline-16b.html
+== insert-into-split-inline-16-ref.html insert-into-split-inline-16-ref.html
+== float-inside-inline-between-blocks-1.html float-inside-inline-between-blocks-1.html
+== table-pseudo-in-part3-1.html table-pseudo-in-part3-1.html
+== emptyspan-1.html emptyspan-1.html
+skip == emptyspan-2.html emptyspan-2.html
+== emptyspan-3.html emptyspan-3.html
+== emptyspan-4.html emptyspan-4.html
+== split-inner-inline-1.html split-inner-inline-1.html
+== split-inner-inline-2.html split-inner-inline-2.html
+== whitespace-present-1a.html whitespace-present-1a.html
+== whitespace-present-1b.html whitespace-present-1b.html
+== percent-height-1.html percent-height-1.html
+== ignored-margins-1a.html ignored-margins-1a.html
+== ignored-margins-1b.html ignored-margins-1b.html
+== ignored-margins-2a.html ignored-margins-2a.html
+== ignored-margins-2b.html ignored-margins-2b.html
+== trailing-inline-with-continuations-1.html trailing-inline-with-continuations-1.html
+skip == append-to-empty-trailing-inline-1.html append-to-empty-trailing-inline-1.html
+skip == append-to-nested-split-inline-1.html append-to-nested-split-inline-1.html
+skip == append-to-nested-split-inline-1-ref.html append-to-nested-split-inline-1-ref.html
diff --git a/layout/reftests/ib-split/reftest.list b/layout/reftests/ib-split/reftest.list
new file mode 100644
index 000000000..779921d21
--- /dev/null
+++ b/layout/reftests/ib-split/reftest.list
@@ -0,0 +1,85 @@
+== remove-split-inline-1.html remove-split-inline-1-ref.html
+== remove-from-split-inline-1.html remove-from-split-inline-1-ref.html
+== remove-from-split-inline-1-ref.html remove-from-split-inline-1-noib-ref.html
+== remove-from-split-inline-2.html remove-from-split-inline-2-ref.html
+== remove-from-split-inline-3.html remove-from-split-inline-3-ref.html
+== remove-from-split-inline-3-ref.html remove-from-split-inline-3-noib-ref.html
+== remove-from-split-inline-4.html remove-from-split-inline-4-ref.html
+== remove-from-split-inline-4-ref.html remove-from-split-inline-4-noib-ref.html
+== remove-from-split-inline-5.html remove-from-split-inline-5-ref.html
+== remove-from-split-inline-5-ref.html remove-from-split-inline-5-noib-ref.html
+== remove-from-split-inline-6.html remove-from-split-inline-6-ref.html
+== remove-from-split-inline-6-ref.html remove-from-split-inline-6-noib-ref.html
+== 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.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
+== float-inside-inline-between-blocks-1.html float-inside-inline-between-blocks-1-ref.html
+== table-pseudo-in-part3-1.html table-pseudo-in-part3-1-ref.html
+== emptyspan-1.html emptyspan-1-ref.html
+== emptyspan-2.html emptyspan-2-ref.html
+== emptyspan-3.html emptyspan-3-ref.html
+== emptyspan-4.html emptyspan-4-ref.html
+== split-inner-inline-1.html split-inner-inline-1-ref.html
+== split-inner-inline-2.html split-inner-inline-2-ref.html
+== whitespace-present-1a.html whitespace-present-1-ref.html
+== whitespace-present-1b.html whitespace-present-1-ref.html
+== percent-height-1.html percent-height-1-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
diff --git a/layout/reftests/ib-split/remove-from-split-inline-1-noib-ref.html b/layout/reftests/ib-split/remove-from-split-inline-1-noib-ref.html
new file mode 100644
index 000000000..6c3f64e80
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-1-noib-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ #start { border-right: none; }
+ #two { border-left: none; }
+ </style>
+ </head>
+ <body>
+ <span id="start"></span>
+ <div>One</div>
+ <span id="two">
+ Two
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-1-ref.html b/layout/reftests/ib-split/remove-from-split-inline-1-ref.html
new file mode 100644
index 000000000..91810cc29
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-1-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body>
+ <span
+ ><div>One</div>
+ Two
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-1.html b/layout/reftests/ib-split/remove-from-split-inline-1.html
new file mode 100644
index 000000000..55cd93bb1
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-1.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 target = document.getElementById("target");
+ target.parentNode.removeChild(target);
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span
+ ><span id="target">Four</span
+ ><div>One</div>
+ Two
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-2-ref.html b/layout/reftests/ib-split/remove-from-split-inline-2-ref.html
new file mode 100644
index 000000000..78b0baa75
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-2-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body>
+ <span>
+ One
+ Two
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-2.html b/layout/reftests/ib-split/remove-from-split-inline-2.html
new file mode 100644
index 000000000..110063906
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-2.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 target = document.getElementById("target");
+ target.parentNode.removeChild(target);
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span>
+ One
+ <div id="target">Three</div>
+ Two
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-3-noib-ref.html b/layout/reftests/ib-split/remove-from-split-inline-3-noib-ref.html
new file mode 100644
index 000000000..52c73461b
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-3-noib-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ #one { border-right: none; }
+ #tail { border-left: none; }
+ </style>
+ </head>
+ <body>
+ <span id="one">
+ One
+ </span>
+ <div>Two</div>
+ <span id="tail"></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-3-ref.html b/layout/reftests/ib-split/remove-from-split-inline-3-ref.html
new file mode 100644
index 000000000..78987a056
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-3-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body>
+ <span>
+ One
+ <div>Two</div
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-3.html b/layout/reftests/ib-split/remove-from-split-inline-3.html
new file mode 100644
index 000000000..2c26c7027
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-3.html
@@ -0,0 +1,27 @@
+<!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 target = document.getElementById("target");
+ target.parentNode.removeChild(target);
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ </head>
+ <body onload='doit()'>
+ <span>
+ One
+ <div>Two</div
+ ><span id="target">Three</span
+ ></span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-4-noib-ref.html b/layout/reftests/ib-split/remove-from-split-inline-4-noib-ref.html
new file mode 100644
index 000000000..9d357cbf7
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-4-noib-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ #one { border-right: none; }
+ #four { border-left: none; }
+ </style>
+ </head>
+ <body>
+ <span id="one">
+ One
+ Two
+ </span>
+ <div>Three</div>
+ <span id="four">
+ Four
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-4-ref.html b/layout/reftests/ib-split/remove-from-split-inline-4-ref.html
new file mode 100644
index 000000000..8cc14be93
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-4-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body>
+ <span>
+ One
+ Two
+ <div>Three</div>
+ Four
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-4.html b/layout/reftests/ib-split/remove-from-split-inline-4.html
new file mode 100644
index 000000000..c5296a326
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-4.html
@@ -0,0 +1,28 @@
+<!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 target = document.getElementById("target");
+ target.parentNode.removeChild(target);
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span>
+ One
+ <div id="target">Five</div>
+ Two
+ <div>Three</div>
+ Four
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-5-noib-ref.html b/layout/reftests/ib-split/remove-from-split-inline-5-noib-ref.html
new file mode 100644
index 000000000..4b3ad937b
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-5-noib-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ #one { border-right: none; }
+ #three { border-left: none; }
+ </style>
+ </head>
+ <body>
+ <span id="one">
+ One
+ </span>
+ <div>Two</div>
+ <span id="three">
+ Three
+ Four
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-5-ref.html b/layout/reftests/ib-split/remove-from-split-inline-5-ref.html
new file mode 100644
index 000000000..46e5f3bee
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-5-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body>
+ <span>
+ One
+ <div>Two</div>
+ Three
+ Four
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-5.html b/layout/reftests/ib-split/remove-from-split-inline-5.html
new file mode 100644
index 000000000..1ca2a12a4
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-5.html
@@ -0,0 +1,28 @@
+<!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 target = document.getElementById("target");
+ target.parentNode.removeChild(target);
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span>
+ One
+ <div>Two</div>
+ Three
+ <div id="target">Five</div>
+ Four
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-6-noib-ref.html b/layout/reftests/ib-split/remove-from-split-inline-6-noib-ref.html
new file mode 100644
index 000000000..756cb46ec
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-6-noib-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ #one { border-right: none; }
+ #four { border-left: none; }
+ </style>
+ </head>
+ <body>
+ <span id="one">
+ One
+ </span>
+ <div>Two</div>
+ <div>Three</div>
+ <span id="four">
+ Four
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-6-ref.html b/layout/reftests/ib-split/remove-from-split-inline-6-ref.html
new file mode 100644
index 000000000..c37274925
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-6-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body>
+ <span>
+ One
+ <div>Two</div>
+ <div>Three</div>
+ Four
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-from-split-inline-6.html b/layout/reftests/ib-split/remove-from-split-inline-6.html
new file mode 100644
index 000000000..2be259119
--- /dev/null
+++ b/layout/reftests/ib-split/remove-from-split-inline-6.html
@@ -0,0 +1,28 @@
+<!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 target = document.getElementById("target");
+ target.parentNode.removeChild(target);
+ }
+ </script>
+ <style>
+ body > span { border: 3px solid blue }
+ </style>
+ </head>
+ <body onload='doit()'>
+ <span>
+ One
+ <div>Two</div>
+ <span id="target">Five</span>
+ <div>Three</div>
+ Four
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-split-inline-1-ref.html b/layout/reftests/ib-split/remove-split-inline-1-ref.html
new file mode 100644
index 000000000..a930c3166
--- /dev/null
+++ b/layout/reftests/ib-split/remove-split-inline-1-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ One
+ Two
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/remove-split-inline-1.html b/layout/reftests/ib-split/remove-split-inline-1.html
new file mode 100644
index 000000000..db8b398d4
--- /dev/null
+++ b/layout/reftests/ib-split/remove-split-inline-1.html
@@ -0,0 +1,25 @@
+<!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 target = document.getElementById("target");
+ target.parentNode.removeChild(target);
+ }
+ </script>
+ </head>
+ <body onload='doit()'>
+ One
+ <span id="target">
+ Three
+ <div>Four</div>
+ Five
+ </span>
+ Two
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/split-inner-inline-1-ref.html b/layout/reftests/ib-split/split-inner-inline-1-ref.html
new file mode 100644
index 000000000..e1f56ac90
--- /dev/null
+++ b/layout/reftests/ib-split/split-inner-inline-1-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <span>First line</span>
+ <div>Second line</div>
+ <span>Third line, yes</span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/split-inner-inline-1.html b/layout/reftests/ib-split/split-inner-inline-1.html
new file mode 100644
index 000000000..d1893c3a4
--- /dev/null
+++ b/layout/reftests/ib-split/split-inner-inline-1.html
@@ -0,0 +1,21 @@
+<!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>
+ <span>
+ First
+ <span>
+ line
+ <span style="display: block">
+ Second line
+ </span>
+ Third
+ </span>
+ line, yes
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/split-inner-inline-2-ref.html b/layout/reftests/ib-split/split-inner-inline-2-ref.html
new file mode 100644
index 000000000..914246ee1
--- /dev/null
+++ b/layout/reftests/ib-split/split-inner-inline-2-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <span>First line
+ <span style="border: 5px solid blue; border-right: none"></span>
+ </span>
+ <div>Second line</div>
+ <span>
+ <span style="border: 5px solid blue; border-left: none"></span>
+ Third line, yes
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/split-inner-inline-2.html b/layout/reftests/ib-split/split-inner-inline-2.html
new file mode 100644
index 000000000..9086e4bde
--- /dev/null
+++ b/layout/reftests/ib-split/split-inner-inline-2.html
@@ -0,0 +1,19 @@
+<!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>
+ <span>
+ First line
+ <span style="border: 5px solid blue">
+ <span style="display: block">
+ Second line
+ </span>
+ </span>
+ Third line, yes
+ </span>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/table-pseudo-in-part3-1-ref.html b/layout/reftests/ib-split/table-pseudo-in-part3-1-ref.html
new file mode 100644
index 000000000..38c9b90a8
--- /dev/null
+++ b/layout/reftests/ib-split/table-pseudo-in-part3-1-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ </head>
+ <body>
+ <div>
+ aaa
+ <div>bbb</div>
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/ib-split/table-pseudo-in-part3-1.html b/layout/reftests/ib-split/table-pseudo-in-part3-1.html
new file mode 100644
index 000000000..ffc33e286
--- /dev/null
+++ b/layout/reftests/ib-split/table-pseudo-in-part3-1.html
@@ -0,0 +1,19 @@
+<!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="" />
+ </head>
+ <body>
+ <span style="display: table-row">
+ <span>
+ aaa
+ <span style="display: block"></span>
+ <span style="display: table-cell">bbb</span>
+ </span>
+ </span>
+ </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 000000000..cb880abbb
--- /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 000000000..f2ea255e2
--- /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>
diff --git a/layout/reftests/ib-split/whitespace-present-1-ref.html b/layout/reftests/ib-split/whitespace-present-1-ref.html
new file mode 100644
index 000000000..d63bf6b07
--- /dev/null
+++ b/layout/reftests/ib-split/whitespace-present-1-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/whitespace-present-1a.html b/layout/reftests/ib-split/whitespace-present-1a.html
new file mode 100644
index 000000000..a4880a45d
--- /dev/null
+++ b/layout/reftests/ib-split/whitespace-present-1a.html
@@ -0,0 +1,19 @@
+<!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>
+ 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/whitespace-present-1b.html b/layout/reftests/ib-split/whitespace-present-1b.html
new file mode 100644
index 000000000..01e85a8ee
--- /dev/null
+++ b/layout/reftests/ib-split/whitespace-present-1b.html
@@ -0,0 +1,25 @@
+<!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>
+ body > span { border: 3px solid blue }
+ </style>
+ <script>
+ function doIt() {
+ var t = document.createTextNode(" ");
+ var d = document.getElementById("d");
+ d.parentNode.insertBefore(t, d);
+ }
+ </script>
+ </head>
+ <body onload="doIt()">
+ <span>
+ <div>One</div><div id="d">Two</div>
+ </span>
+ </body>
+</html>