text run at (99,72) width 609: "Only list content should get deleted. Surrounding content that is not selected should"
text run at (0,94) width 201: "(obviously) not be affected."
RenderBlock {DIV} at (0,260) size 784x32 [border: (2px solid #008000)]
- RenderText {TEXT} at (2,2) size 62x28
- text run at (2,2) width 62: "before"
+ RenderText {TEXT} at (2,2) size 107x28
+ text run at (2,2) width 107: "beforeafter"
RenderBlock {DIV} at (0,302) size 784x32
RenderBlock {DIV} at (0,0) size 784x32 [border: (2px solid #FF0000)]
RenderText {TEXT} at (2,2) size 62x28
text run at (2,2) width 62: "before"
- RenderBR {BR} at (0,0) size 0x0
+ RenderText {TEXT} at (64,2) size 45x28
+ text run at (64,2) width 45: "after"
selection is CARET:
start: position 7 of child 1 {TEXT} of child 1 {DIV} of root {DIV}
upstream: position 7 of child 1 {TEXT} of child 1 {DIV} of root {DIV}
-downstream: position 0 of child 2 {BR} of child 1 {DIV} of root {DIV}
+downstream: position 0 of child 2 {TEXT} of child 1 {DIV} of root {DIV}
moveSelectionForwardByLineCommand();
for (i = 0; i < 4; i++)
extendSelectionForwardByLineCommand();
+ for (i = 0; i < 5; i++)
+ extendSelectionBackwardByCharacterCommand();
deleteCommand();
}
</div>
<div class="results">
-before
+beforeafter
</div>
<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
--- /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 {DIV} at (0,0) size 784x250 [border: (4px solid #0000FF)]
+ RenderBlock {DIV} at (20,20) size 744x72
+ RenderText {TEXT} at (0,0) size 67x22
+ text run at (0,0) width 67: "Tests: "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderText {TEXT} at (0,28) size 663x22
+ text run at (0,28) width 663: "Our ability to \"edit around\" content the HTML editing code does not yet handle very well. "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderInline {I} at (0,0) size 99x22
+ RenderText {TEXT} at (0,50) size 99x22
+ text run at (0,50) width 99: "For this test: "
+ RenderText {TEXT} at (99,50) size 181x22
+ text run at (99,50) width 181: "Select and delete a table."
+ RenderBlock (anonymous) at (20,92) size 744x22
+ RenderBR {BR} at (0,0) size 0x22
+ RenderBlock {DIV} at (20,114) size 744x116
+ RenderText {TEXT} at (0,0) size 189x22
+ text run at (0,0) width 189: "Expected Results: "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderText {TEXT} at (0,28) size 709x44
+ text run at (0,28) width 709: "The content in the red box must exactly match the content in the green box (except for the border"
+ text run at (0,50) width 53: "color). "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderInline {I} at (0,0) size 99x22
+ RenderText {TEXT} at (0,72) size 99x22
+ text run at (0,72) width 99: "For this test: "
+ RenderText {TEXT} at (99,72) size 663x44
+ text run at (99,72) width 564: "Only table should get deleted. Surrounding content that is not selected should"
+ text run at (0,94) width 201: "(obviously) not be affected."
+ RenderBlock {DIV} at (0,260) size 784x32 [border: (2px solid #008000)]
+ RenderText {TEXT} at (2,2) size 107x28
+ text run at (2,2) width 107: "beforeafter"
+ RenderBlock {DIV} at (0,302) size 784x32
+ RenderBlock {DIV} at (0,0) size 784x32 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (2,2) size 62x28
+ text run at (2,2) width 62: "before"
+ RenderText {TEXT} at (64,2) size 45x28
+ text run at (64,2) width 45: "after"
+selection is CARET:
+start: position 7 of child 1 {TEXT} of child 1 {DIV} of root {DIV}
+upstream: position 7 of child 1 {TEXT} of child 1 {DIV} of root {DIV}
+downstream: position 0 of child 2 {TEXT} of child 1 {DIV} of root {DIV}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ font-size: 24px;
+}
+.explanation {
+ border: 4px solid blue;
+ padding: 16px;
+ font-size: 18px;
+ margin-bottom: 10px;
+}
+.scenario:first-line { font-weight: bold; font-size: 24px; }
+.expected:first-line { font-weight: bold; font-size: 24px; }
+.results { margin-bottom: 10px; border: 2px solid green; font-size: 24px; }
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ moveSelectionForwardByLineCommand();
+ for (i = 0; i < 17; i++)
+ extendSelectionForwardByCharacterCommand();
+ deleteCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+
+<div class="explanation">
+<div class="scenario">
+Tests:
+<br>
+Our ability to "edit around" content the HTML editing code does not yet handle very well.
+<br><i>For this test: </i>Select and delete a table.
+</div>
+<br>
+<div class="expected">
+Expected Results:
+<br>
+The content in the red box must exactly match the content in the green box (except for the border color).
+<br><i>For this test: </i>Only table should get deleted.
+Surrounding content that is not selected should (obviously) not be affected.
+</div>
+</div>
+
+<div class="results">
+beforeafter
+</div>
+
+<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
+<div id="test" class="editing">
+before<table border="1">
+<tr>
+<td>1</td>
+<td>2</td>
+<td>3</td>
+</tr>
+<tr>
+<td>4</td>
+<td>5</td>
+<td>6</td>
+</tr>
+<tr>
+<td>7</td>
+<td>8</td>
+<td>9</td>
+</tr>
+</table>
+after
+</div>
+</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 784x584
+ RenderBlock {DIV} at (0,0) size 784x250 [border: (4px solid #0000FF)]
+ RenderBlock {DIV} at (20,20) size 744x72
+ RenderText {TEXT} at (0,0) size 67x22
+ text run at (0,0) width 67: "Tests: "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderText {TEXT} at (0,28) size 663x22
+ text run at (0,28) width 663: "Our ability to \"edit around\" content the HTML editing code does not yet handle very well. "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderInline {I} at (0,0) size 99x22
+ RenderText {TEXT} at (0,50) size 99x22
+ text run at (0,50) width 99: "For this test: "
+ RenderText {TEXT} at (99,50) size 405x22
+ text run at (99,50) width 405: "Select and delete a table and some surrounding content."
+ RenderBlock (anonymous) at (20,92) size 744x22
+ RenderBR {BR} at (0,0) size 0x22
+ RenderBlock {DIV} at (20,114) size 744x116
+ RenderText {TEXT} at (0,0) size 189x22
+ text run at (0,0) width 189: "Expected Results: "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderText {TEXT} at (0,28) size 709x44
+ text run at (0,28) width 709: "The content in the red box must exactly match the content in the green box (except for the border"
+ text run at (0,50) width 53: "color). "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderInline {I} at (0,0) size 99x22
+ RenderText {TEXT} at (0,72) size 99x22
+ text run at (0,72) width 99: "For this test: "
+ RenderText {TEXT} at (99,72) size 744x44
+ text run at (99,72) width 304: "Only selected content should get deleted. "
+ text run at (403,72) width 341: "Surrounding content that is not selected should"
+ text run at (0,94) width 201: "(obviously) not be affected."
+ RenderBlock {DIV} at (0,260) size 784x32 [border: (2px solid #008000)]
+ RenderText {TEXT} at (2,2) size 62x28
+ text run at (2,2) width 62: "before"
+ RenderBlock {DIV} at (0,302) size 784x32
+ RenderBlock {DIV} at (0,0) size 784x32 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (2,2) size 62x28
+ text run at (2,2) width 62: "before"
+ RenderInline {FONT} at (0,0) size 0x22
+ RenderInline {SPAN} at (0,0) size 0x18
+ RenderBR {BR} at (0,0) size 0x0
+selection is CARET:
+start: position 7 of child 1 {TEXT} of child 1 {DIV} of root {DIV}
+upstream: position 7 of child 1 {TEXT} of child 1 {DIV} of root {DIV}
+downstream: position 0 of child 1 {BR} of child 1 {SPAN} of child 2 {FONT} of child 1 {DIV} of root {DIV}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ font-size: 24px;
+}
+.explanation {
+ border: 4px solid blue;
+ padding: 16px;
+ font-size: 18px;
+ margin-bottom: 10px;
+}
+.scenario:first-line { font-weight: bold; font-size: 24px; }
+.expected:first-line { font-weight: bold; font-size: 24px; }
+.results { margin-bottom: 10px; border: 2px solid green; font-size: 24px; }
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ moveSelectionForwardByLineCommand();
+ for (i = 0; i < 10; i++)
+ extendSelectionForwardByLineCommand();
+ deleteCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+
+<div class="explanation">
+<div class="scenario">
+Tests:
+<br>
+Our ability to "edit around" content the HTML editing code does not yet handle very well.
+<br><i>For this test: </i>Select and delete a table and some surrounding content.
+</div>
+<br>
+<div class="expected">
+Expected Results:
+<br>
+The content in the red box must exactly match the content in the green box (except for the border color).
+<br><i>For this test: </i>Only selected content should get deleted.
+Surrounding content that is not selected should (obviously) not be affected.
+</div>
+</div>
+
+<div class="results">
+before
+</div>
+
+<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
+<div id="test" class="editing">
+before<table border="1">
+<tr>
+<td>1</td>
+<td>2</td>
+<td>3</td>
+</tr>
+<tr>
+<td>4</td>
+<td>5</td>
+<td>6</td>
+</tr>
+<tr>
+<td>7</td>
+<td>8</td>
+<td>9</td>
+</tr>
+</table>
+after
+</div>
+</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 784x584
+ RenderBlock {DIV} at (0,0) size 784x250 [border: (4px solid #0000FF)]
+ RenderBlock {DIV} at (20,20) size 744x72
+ RenderText {TEXT} at (0,0) size 67x22
+ text run at (0,0) width 67: "Tests: "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderText {TEXT} at (0,28) size 663x22
+ text run at (0,28) width 663: "Our ability to \"edit around\" content the HTML editing code does not yet handle very well. "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderInline {I} at (0,0) size 99x22
+ RenderText {TEXT} at (0,50) size 99x22
+ text run at (0,50) width 99: "For this test: "
+ RenderText {TEXT} at (99,50) size 392x22
+ text run at (99,50) width 392: "Select and delete a list and some surrounding content."
+ RenderBlock (anonymous) at (20,92) size 744x22
+ RenderBR {BR} at (0,0) size 0x22
+ RenderBlock {DIV} at (20,114) size 744x116
+ RenderText {TEXT} at (0,0) size 189x22
+ text run at (0,0) width 189: "Expected Results: "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderText {TEXT} at (0,28) size 709x44
+ text run at (0,28) width 709: "The content in the red box must exactly match the content in the green box (except for the border"
+ text run at (0,50) width 53: "color). "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderInline {I} at (0,0) size 99x22
+ RenderText {TEXT} at (0,72) size 99x22
+ text run at (0,72) width 99: "For this test: "
+ RenderText {TEXT} at (99,72) size 744x44
+ text run at (99,72) width 304: "Only selected content should get deleted. "
+ text run at (403,72) width 341: "Surrounding content that is not selected should"
+ text run at (0,94) width 201: "(obviously) not be affected."
+ RenderBlock {DIV} at (0,260) size 784x32 [border: (2px solid #008000)]
+ RenderText {TEXT} at (2,2) size 45x28
+ text run at (2,2) width 45: "after"
+ RenderBlock {DIV} at (0,302) size 784x32
+ RenderBlock {DIV} at (0,0) size 784x32 [border: (2px solid #FF0000)]
+ RenderText {TEXT} at (2,2) size 45x28
+ text run at (2,2) width 45: "after"
+selection is CARET:
+start: position 0 of child 1 {TEXT} of child 1 {DIV} of root {DIV}
+upstream: position 0 of child 1 {DIV} of root {DIV}
+downstream: position 0 of child 1 {TEXT} of child 1 {DIV} of root {DIV}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ font-size: 24px;
+}
+.explanation {
+ border: 4px solid blue;
+ padding: 16px;
+ font-size: 18px;
+ margin-bottom: 10px;
+}
+.scenario:first-line { font-weight: bold; font-size: 24px; }
+.expected:first-line { font-weight: bold; font-size: 24px; }
+.results { margin-bottom: 10px; border: 2px solid green; font-size: 24px; }
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 9; i++)
+ extendSelectionForwardByLineCommand();
+ extendSelectionForwardByCharacterCommand();
+ deleteCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+
+<div class="explanation">
+<div class="scenario">
+Tests:
+<br>
+Our ability to "edit around" content the HTML editing code does not yet handle very well.
+<br><i>For this test: </i>Select and delete a list and some surrounding content.
+</div>
+<br>
+<div class="expected">
+Expected Results:
+<br>
+The content in the red box must exactly match the content in the green box (except for the border color).
+<br><i>For this test: </i>Only selected content should get deleted.
+Surrounding content that is not selected should (obviously) not be affected.
+</div>
+</div>
+
+<div class="results">
+after
+</div>
+
+<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
+<div id="test" class="editing">
+before
+<table border="1">
+<tr>
+<td>1</td>
+<td>2</td>
+<td>3</td>
+</tr>
+<tr>
+<td>4</td>
+<td>5</td>
+<td>6</td>
+</tr>
+<tr>
+<td>7</td>
+<td>8</td>
+<td>9</td>
+</tr>
+</table>
+after
+</div>
+</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 784x584
+ RenderBlock {DIV} at (0,0) size 784x228 [border: (4px solid #0000FF)]
+ RenderBlock {DIV} at (20,20) size 744x72
+ RenderText {TEXT} at (0,0) size 67x22
+ text run at (0,0) width 67: "Tests: "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderText {TEXT} at (0,28) size 663x22
+ text run at (0,28) width 663: "Our ability to \"edit around\" content the HTML editing code does not yet handle very well. "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderInline {I} at (0,0) size 99x22
+ RenderText {TEXT} at (0,50) size 99x22
+ text run at (0,50) width 99: "For this test: "
+ RenderText {TEXT} at (99,50) size 236x22
+ text run at (99,50) width 236: "Test typing at the end of a table."
+ RenderBlock (anonymous) at (20,92) size 744x22
+ RenderBR {BR} at (0,0) size 0x22
+ RenderBlock {DIV} at (20,114) size 744x94
+ RenderText {TEXT} at (0,0) size 189x22
+ text run at (0,0) width 189: "Expected Results: "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderText {TEXT} at (0,28) size 709x44
+ text run at (0,28) width 709: "The content in the red box must exactly match the content in the green box (except for the border"
+ text run at (0,50) width 53: "color). "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderInline {I} at (0,0) size 99x22
+ RenderText {TEXT} at (0,72) size 99x22
+ text run at (0,72) width 99: "For this test: "
+ RenderText {TEXT} at (99,72) size 437x22
+ text run at (99,72) width 437: "Typed text should appear after (on the line below) the table."
+ RenderBlock {DIV} at (0,238) size 784x108 [border: (2px solid #008000)]
+ RenderTable {TABLE} at (2,2) size 46x76 [border: (1px outset #808080)]
+ RenderTableSection {TBODY} at (1,1) size 0x74
+ RenderTableRow {TR} at (0,0) size 0x0
+ RenderTableCell {TD} at (2,2) size 12x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "1"
+ RenderTableCell {TD} at (16,2) size 12x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "2"
+ RenderTableCell {TD} at (30,2) size 12x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "3"
+ RenderTableRow {TR} at (0,0) size 0x0
+ RenderTableCell {TD} at (2,26) size 12x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "4"
+ RenderTableCell {TD} at (16,26) size 12x22 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "5"
+ RenderTableCell {TD} at (30,26) size 12x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "6"
+ RenderTableRow {TR} at (0,0) size 0x0
+ RenderTableCell {TD} at (2,50) size 12x22 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "7"
+ RenderTableCell {TD} at (16,50) size 12x22 [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "8"
+ RenderTableCell {TD} at (30,50) size 12x22 [border: (1px inset #808080)] [r=2 c=2 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "9"
+ RenderBlock (anonymous) at (2,78) size 780x28
+ RenderText {TEXT} at (0,0) size 36x28
+ text run at (0,0) width 36: "xxx"
+ RenderBlock {DIV} at (0,356) size 784x108
+ RenderBlock {DIV} at (0,0) size 784x108 [border: (2px solid #FF0000)]
+ RenderTable {TABLE} at (2,2) size 46x76 [border: (1px outset #808080)]
+ RenderTableSection {TBODY} at (1,1) size 0x74
+ RenderTableRow {TR} at (0,0) size 0x0
+ RenderTableCell {TD} at (2,2) size 12x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "1"
+ RenderTableCell {TD} at (16,2) size 12x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "2"
+ RenderTableCell {TD} at (30,2) size 12x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "3"
+ RenderTableRow {TR} at (0,0) size 0x0
+ RenderTableCell {TD} at (2,26) size 12x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "4"
+ RenderTableCell {TD} at (16,26) size 12x22 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "5"
+ RenderTableCell {TD} at (30,26) size 12x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "6"
+ RenderTableRow {TR} at (0,0) size 0x0
+ RenderTableCell {TD} at (2,50) size 12x22 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "7"
+ RenderTableCell {TD} at (16,50) size 12x22 [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "8"
+ RenderTableCell {TD} at (30,50) size 12x22 [border: (1px inset #808080)] [r=2 c=2 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "9"
+ RenderBlock (anonymous) at (2,78) size 780x28
+ RenderText {TEXT} at (0,0) size 36x28
+ text run at (0,0) width 36: "xxx"
+selection is CARET:
+start: position 3 of child 3 {TEXT} of child 1 {DIV} of root {DIV}
+upstream: position 3 of child 3 {TEXT} of child 1 {DIV} of root {DIV}
+downstream: position 1 of child 4 {TEXT} of child 1 {DIV} of root {DIV}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ font-size: 24px;
+}
+.explanation {
+ border: 4px solid blue;
+ padding: 16px;
+ font-size: 18px;
+ margin-bottom: 10px;
+}
+.scenario:first-line { font-weight: bold; font-size: 24px; }
+.expected:first-line { font-weight: bold; font-size: 24px; }
+.results { margin-bottom: 10px; border: 2px solid green; font-size: 24px; }
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 8; i++)
+ moveSelectionForwardByLineCommand();
+ moveSelectionForwardByCharacterCommand();
+ for (i = 0; i < 3; i++)
+ typeCharacterCommand("x");
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+
+<div class="explanation">
+<div class="scenario">
+Tests:
+<br>
+Our ability to "edit around" content the HTML editing code does not yet handle very well.
+<br><i>For this test: </i>Test typing at the end of a table.
+</div>
+<br>
+<div class="expected">
+Expected Results:
+<br>
+The content in the red box must exactly match the content in the green box (except for the border color).
+<br><i>For this test: </i>Typed text should appear after (on the line below) the table.
+</div>
+</div>
+
+<div class="results">
+<table border="1">
+<tr>
+<td>1</td>
+<td>2</td>
+<td>3</td>
+</tr>
+<tr>
+<td>4</td>
+<td>5</td>
+<td>6</td>
+</tr>
+<tr>
+<td>7</td>
+<td>8</td>
+<td>9</td>
+</tr>
+</table>
+xxx
+</div>
+
+<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
+<div id="test" class="editing">
+<table border="1">
+<tr>
+<td>1</td>
+<td>2</td>
+<td>3</td>
+</tr>
+<tr>
+<td>4</td>
+<td>5</td>
+<td>6</td>
+</tr>
+<tr>
+<td>7</td>
+<td>8</td>
+<td>9</td>
+</tr>
+</table>
+</div>
+</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 784x584
+ RenderBlock {DIV} at (0,0) size 784x228 [border: (4px solid #0000FF)]
+ RenderBlock {DIV} at (20,20) size 744x72
+ RenderText {TEXT} at (0,0) size 67x22
+ text run at (0,0) width 67: "Tests: "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderText {TEXT} at (0,28) size 663x22
+ text run at (0,28) width 663: "Our ability to \"edit around\" content the HTML editing code does not yet handle very well. "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderInline {I} at (0,0) size 99x22
+ RenderText {TEXT} at (0,50) size 99x22
+ text run at (0,50) width 99: "For this test: "
+ RenderText {TEXT} at (99,50) size 241x22
+ text run at (99,50) width 241: "Test typing at the start of a table."
+ RenderBlock (anonymous) at (20,92) size 744x22
+ RenderBR {BR} at (0,0) size 0x22
+ RenderBlock {DIV} at (20,114) size 744x94
+ RenderText {TEXT} at (0,0) size 189x22
+ text run at (0,0) width 189: "Expected Results: "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderText {TEXT} at (0,28) size 709x44
+ text run at (0,28) width 709: "The content in the red box must exactly match the content in the green box (except for the border"
+ text run at (0,50) width 53: "color). "
+ RenderBR {BR} at (0,0) size 0x0
+ RenderInline {I} at (0,0) size 99x22
+ RenderText {TEXT} at (0,72) size 99x22
+ text run at (0,72) width 99: "For this test: "
+ RenderText {TEXT} at (99,72) size 449x22
+ text run at (99,72) width 449: "Typed text should appear before (on the line above) the table."
+ RenderBlock {DIV} at (0,238) size 784x108 [border: (2px solid #008000)]
+ RenderBlock (anonymous) at (2,2) size 780x28
+ RenderText {TEXT} at (0,0) size 36x28
+ text run at (0,0) width 36: "xxx"
+ RenderTable {TABLE} at (2,30) size 46x76 [border: (1px outset #808080)]
+ RenderTableSection {TBODY} at (1,1) size 0x74
+ RenderTableRow {TR} at (0,0) size 0x0
+ RenderTableCell {TD} at (2,2) size 12x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "1"
+ RenderTableCell {TD} at (16,2) size 12x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "2"
+ RenderTableCell {TD} at (30,2) size 12x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "3"
+ RenderTableRow {TR} at (0,0) size 0x0
+ RenderTableCell {TD} at (2,26) size 12x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "4"
+ RenderTableCell {TD} at (16,26) size 12x22 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "5"
+ RenderTableCell {TD} at (30,26) size 12x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "6"
+ RenderTableRow {TR} at (0,0) size 0x0
+ RenderTableCell {TD} at (2,50) size 12x22 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "7"
+ RenderTableCell {TD} at (16,50) size 12x22 [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "8"
+ RenderTableCell {TD} at (30,50) size 12x22 [border: (1px inset #808080)] [r=2 c=2 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "9"
+ RenderBlock {DIV} at (0,356) size 784x108
+ RenderBlock {DIV} at (0,0) size 784x108 [border: (2px solid #FF0000)]
+ RenderBlock (anonymous) at (2,2) size 780x28
+ RenderText {TEXT} at (0,0) size 36x28
+ text run at (0,0) width 36: "xxx"
+ RenderTable {TABLE} at (2,30) size 46x76 [border: (1px outset #808080)]
+ RenderTableSection {TBODY} at (1,1) size 0x74
+ RenderTableRow {TR} at (0,0) size 0x0
+ RenderTableCell {TD} at (2,2) size 12x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "1"
+ RenderTableCell {TD} at (16,2) size 12x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "2"
+ RenderTableCell {TD} at (30,2) size 12x22 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "3"
+ RenderTableRow {TR} at (0,0) size 0x0
+ RenderTableCell {TD} at (2,26) size 12x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "4"
+ RenderTableCell {TD} at (16,26) size 12x22 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "5"
+ RenderTableCell {TD} at (30,26) size 12x22 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "6"
+ RenderTableRow {TR} at (0,0) size 0x0
+ RenderTableCell {TD} at (2,50) size 12x22 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "7"
+ RenderTableCell {TD} at (16,50) size 12x22 [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "8"
+ RenderTableCell {TD} at (30,50) size 12x22 [border: (1px inset #808080)] [r=2 c=2 rs=1 cs=1]
+ RenderText {TEXT} at (2,2) size 8x18
+ text run at (2,2) width 8: "9"
+selection is CARET:
+start: position 3 of child 2 {TEXT} of child 1 {DIV} of root {DIV}
+upstream: position 3 of child 2 {TEXT} of child 1 {DIV} of root {DIV}
+downstream: position 3 of child 2 {TEXT} of child 1 {DIV} of root {DIV}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ font-size: 24px;
+}
+.explanation {
+ border: 4px solid blue;
+ padding: 16px;
+ font-size: 18px;
+ margin-bottom: 10px;
+}
+.scenario:first-line { font-weight: bold; font-size: 24px; }
+.expected:first-line { font-weight: bold; font-size: 24px; }
+.results { margin-bottom: 10px; border: 2px solid green; font-size: 24px; }
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 3; i++)
+ typeCharacterCommand("x");
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+
+<div class="explanation">
+<div class="scenario">
+Tests:
+<br>
+Our ability to "edit around" content the HTML editing code does not yet handle very well.
+<br><i>For this test: </i>Test typing at the start of a table.
+</div>
+<br>
+<div class="expected">
+Expected Results:
+<br>
+The content in the red box must exactly match the content in the green box (except for the border color).
+<br><i>For this test: </i>Typed text should appear before (on the line above) the table.
+</div>
+</div>
+
+<div class="results">
+xxx
+<table border="1">
+<tr>
+<td>1</td>
+<td>2</td>
+<td>3</td>
+</tr>
+<tr>
+<td>4</td>
+<td>5</td>
+<td>6</td>
+</tr>
+<tr>
+<td>7</td>
+<td>8</td>
+<td>9</td>
+</tr>
+</table>
+</div>
+
+<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
+<div id="test" class="editing">
+<table border="1">
+<tr>
+<td>1</td>
+<td>2</td>
+<td>3</td>
+</tr>
+<tr>
+<td>4</td>
+<td>5</td>
+<td>6</td>
+</tr>
+<tr>
+<td>7</td>
+<td>8</td>
+<td>9</td>
+</tr>
+</table>
+</div>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
+2005-03-20 Ken Kocienda <kocienda@apple.com>
+
+ Reviewed by me
+
+ I made an error in this test earlier. It was not testing what I intended. Fixed.
+
+ * layout-tests/editing/unsupported-content/list-delete-001-expected.txt
+ * layout-tests/editing/unsupported-content/list-delete-001.html
+
+ New tests:
+
+ * layout-tests/editing/unsupported-content/table-delete-001-expected.txt: Added.
+ * layout-tests/editing/unsupported-content/table-delete-001.html: Added.
+ * layout-tests/editing/unsupported-content/table-delete-002-expected.txt: Added.
+ * layout-tests/editing/unsupported-content/table-delete-002.html: Added.
+ * layout-tests/editing/unsupported-content/table-delete-003-expected.txt: Added.
+ * layout-tests/editing/unsupported-content/table-delete-003.html: Added.
+ * layout-tests/editing/unsupported-content/table-type-after-expected.txt: Added.
+ * layout-tests/editing/unsupported-content/table-type-after.html: Added.
+ * layout-tests/editing/unsupported-content/table-type-before-expected.txt: Added.
+ * layout-tests/editing/unsupported-content/table-type-before.html: Added.
+
2005-03-20 Darin Adler <darin@apple.com>
Reviewed by Maciej.