--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock (anonymous) at (0,0) size 784x28
+ RenderText {TEXT} at (0,0) size 667x28
+ text run at (0,0) width 667: "Test inserting paragraphs: should see an empty blue box below \"bar\""
+ RenderBlock {DIV} at (0,28) size 784x12
+ RenderBlock (anonymous) at (0,40) size 784x28
+ RenderText {TEXT} at (0,0) size 31x28
+ text run at (0,0) width 31: "bar"
+ RenderBlock {P} at (0,68) size 784x28 [border: (2px solid #0000FF)]
+ RenderBlock {DIV} at (0,96) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 34x28
+ text run at (14,14) width 34: "baz"
+selection is CARET:
+start: position 0 of child 4 {P} of root {BODY}
+upstream: position 0 of child 4 {P} of root {BODY}
+downstream: position 1 of child 4 {P} of root {BODY}
--- /dev/null
+<html>
+<head>
+
+<style>
+body {
+ font-size: 24px;
+}
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+}
+p {
+ border: 2px solid blue;
+ padding: 12px;
+}
+
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ moveSelectionBackwardByCharacterCommand();
+ insertParagraphCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body contenteditable id="root">
+
+Test inserting paragraphs: should see an empty blue box below "bar"
+
+<div style="height: 12px"></div>
+
+bar<div class="editing" id="test">baz</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x568
+ RenderBlock (anonymous) at (0,0) size 784x56
+ RenderText {TEXT} at (0,0) size 748x56
+ text run at (0,0) width 748: "Test inserting paragraphs: should see an empty blue box above an empty line"
+ text run at (0,28) width 237: "between \"foo\" and \"bar\""
+ RenderBlock {DIV} at (0,56) size 784x12
+ RenderBlock {P} at (0,92) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 32x28
+ text run at (14,14) width 32: "foo"
+ RenderBlock {P} at (0,172) size 784x28 [border: (2px solid #0000FF)]
+ RenderBlock (anonymous) at (0,200) size 784x28
+ RenderBR {BR} at (0,0) size 0x28
+ RenderBlock {P} at (0,252) size 784x56 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (14,14) size 31x28
+ text run at (14,14) width 31: "bar"
+selection is CARET:
+start: position 0 of child 6 {BR} of root {BODY}
+upstream: position 0 of child 6 {BR} of root {BODY}
+downstream: position 0 of child 6 {BR} of root {BODY}
--- /dev/null
+<html>
+<head>
+
+<style>
+body {
+ font-size: 24px;
+}
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+}
+p {
+ border: 2px solid blue;
+ padding: 12px;
+}
+
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 4; i++)
+ moveSelectionForwardByCharacterCommand();
+ insertParagraphCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body contenteditable id="root">
+
+Test inserting paragraphs: should see an empty blue box above an empty line between "foo" and "bar"
+
+<div style="height: 12px"></div>
+
+<p id="test" class="editing">foo</p><br><p class="editing">bar</p>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock (anonymous) at (0,0) size 784x56
+ RenderText {TEXT} at (0,0) size 766x56
+ text run at (0,0) width 766: "Test inserting paragraphs: should see a blue box with \"bar\" in it, and two blank"
+ text run at (0,28) width 295: "lines between \"foo\" and \"bar\"."
+ RenderBlock {DIV} at (0,56) size 784x12
+ RenderBlock (anonymous) at (0,68) size 784x84
+ RenderInline {SPAN} at (0,0) size 32x28
+ RenderText {TEXT} at (0,0) size 32x28
+ text run at (0,0) width 32: "foo"
+ RenderBR {BR} at (0,0) size 0x0
+ RenderBR {BR} at (0,28) size 0x28
+ RenderBR {BR} at (0,56) size 0x28
+ RenderBlock {P} at (0,152) size 784x56 [border: (2px solid #0000FF)]
+ RenderText {TEXT} at (14,14) size 31x28
+ text run at (14,14) width 31: "bar"
+selection is CARET:
+start: position 0 of child 1 {TEXT} of child 8 {P} of root {BODY}
+upstream: position 0 of child 8 {P} of root {BODY}
+downstream: position 0 of child 1 {TEXT} of child 8 {P} of root {BODY}
--- /dev/null
+<html>
+<head>
+
+<style>
+body {
+ font-size: 24px;
+}
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+}
+p {
+ border: 2px solid blue;
+ padding: 12px;
+}
+br {
+ background-color: green;
+}
+
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 5; i++)
+ moveSelectionForwardByCharacterCommand();
+ insertParagraphCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
+
+Test inserting paragraphs: should see a blue box with "bar" in it, and two blank lines between "foo" and "bar".
+
+<div style="height: 12px"></div>
+
+<span id="test">foo</span><br><br>bar
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock (anonymous) at (0,0) size 784x112
+ RenderText {TEXT} at (0,0) size 776x56
+ text run at (0,0) width 776: "Test inserting paragraphs: should see \"foo\", then an empty blue box, then a blue"
+ text run at (0,28) width 410: "box with with \"bar\" in it. Fix for this bug: "
+ RenderInline {A} at (0,0) size 260x28 [color=#0000EE]
+ RenderText {TEXT} at (410,28) size 260x28
+ text run at (410,28) width 260: "<rdar://problem/3924579>"
+ RenderText {TEXT} at (0,56) size 763x56
+ text run at (0,56) width 763: "REGRESSION (Mail): After deleting, hitting return key does not insert visible"
+ text run at (0,84) width 77: "newline"
+ RenderBlock {DIV} at (0,112) size 784x12
+ RenderBlock (anonymous) at (0,124) size 784x28
+ RenderInline {SPAN} at (0,0) size 32x28
+ RenderText {TEXT} at (0,0) size 32x28
+ text run at (0,0) width 32: "foo"
+ RenderBlock (anonymous) at (0,152) size 784x84
+ RenderBlock {P} at (0,0) size 784x28 [border: (2px solid #0000FF)]
+ RenderBlock {P} at (0,28) size 784x56 [border: (2px solid #0000FF)]
+ RenderInline {SPAN} at (0,0) size 31x28
+ RenderText {TEXT} at (14,14) size 31x28
+ text run at (14,14) width 31: "bar"
+ RenderBlock (anonymous) at (0,236) size 784x0
+ RenderInline {SPAN} at (0,0) size 0x0
+ RenderText {TEXT} at (0,0) size 0x0
+ RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start: position 0 of child 1 {TEXT} of child 1 {SPAN} of child 3 {P} of child 6 {SPAN} of root {BODY}
+upstream: position 0 of child 3 {P} of child 6 {SPAN} of root {BODY}
+downstream: position 0 of child 1 {TEXT} of child 1 {SPAN} of child 3 {P} of child 6 {SPAN} of root {BODY}
--- /dev/null
+<html>
+<head>
+
+<style>
+body {
+ font-size: 24px;
+}
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+}
+p {
+ border: 2px solid blue;
+ padding: 12px;
+}
+br {
+ background-color: green;
+}
+
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 4; i++)
+ moveSelectionForwardByCharacterCommand();
+ deleteCommand();
+ insertParagraphCommand();
+ insertParagraphCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
+
+Test inserting paragraphs: should see "foo", then an empty blue box, then a blue box with with "bar" in it. Fix for this bug:
+<a href="rdar://problem/3924579"><rdar://problem/3924579></a> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline
+
+
+<div style="height: 12px"></div>
+
+<span id="test">foo</span><br>bar
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
+2004-12-17 Ken Kocienda <kocienda@apple.com>
+
+ Reviewed by me
+
+ Added new layout tests covering cases from recent bug fixes.
+
+ * layout-tests/editing/inserting/insert-div-018-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-div-018.html: Added.
+ * layout-tests/editing/inserting/insert-div-019-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-div-019.html: Added.
+ * layout-tests/editing/inserting/insert-div-020-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-div-020.html: Added.
+ * layout-tests/editing/inserting/insert-div-021-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-div-021.html: Added.
+
2004-12-17 Ken Kocienda <kocienda@apple.com>
Reviewed by me