Reviewed by me
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jul 2004 21:57:34 +0000 (21:57 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jul 2004 21:57:34 +0000 (21:57 +0000)
        Added new editing-related layout tests

        * layout-tests/editing/deleting/delete-after-span-ws-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-001.html: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-002.html: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-003.html: Added.
        * layout-tests/editing/selection/unrendered-001-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-001.html: Added.
        * layout-tests/editing/selection/unrendered-002-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-002.html: Added.
        * layout-tests/editing/selection/unrendered-003-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-003.html: Added.
        * layout-tests/editing/selection/unrendered-004-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-004.html: Added.
        * layout-tests/editing/selection/unrendered-005-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-005.html: Added.
        * layout-tests/traversal/node-iterator-008-expected.txt: Added.
        * layout-tests/traversal/node-iterator-008.html: Added.
        * layout-tests/traversal/tree-walker-005-expected.txt: Added.
        * layout-tests/traversal/tree-walker-005.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7004 268f45cc-cd09-0410-ab3c-d52691b4dbfc

21 files changed:
LayoutTests/editing/deleting/delete-after-span-ws-001-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-after-span-ws-001.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-after-span-ws-002-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-after-span-ws-002.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-after-span-ws-003-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-after-span-ws-003.html [new file with mode: 0644]
LayoutTests/editing/selection/unrendered-001-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/unrendered-001.html [new file with mode: 0644]
LayoutTests/editing/selection/unrendered-002-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/unrendered-002.html [new file with mode: 0644]
LayoutTests/editing/selection/unrendered-003-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/unrendered-003.html [new file with mode: 0644]
LayoutTests/editing/selection/unrendered-004-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/unrendered-004.html [new file with mode: 0644]
LayoutTests/editing/selection/unrendered-005-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/unrendered-005.html [new file with mode: 0644]
LayoutTests/traversal/node-iterator-008-expected.txt [new file with mode: 0644]
LayoutTests/traversal/node-iterator-008.html [new file with mode: 0644]
LayoutTests/traversal/tree-walker-005-expected.txt [new file with mode: 0644]
LayoutTests/traversal/tree-walker-005.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23

diff --git a/LayoutTests/editing/deleting/delete-after-span-ws-001-expected.txt b/LayoutTests/editing/deleting/delete-after-span-ws-001-expected.txt
new file mode 100644 (file)
index 0000000..db28d0e
--- /dev/null
@@ -0,0 +1,15 @@
+layer at (0,0) size 820x585
+  RenderCanvas at (0,0) size 800x585
+layer at (0,0) size 820x585
+  RenderBlock {HTML} at (0,0) size 800x585
+    RenderBody {BODY} at (8,64) size 784x457
+      RenderBlock {DIV} at (64,0) size 748x196 [border: (50px solid #FF0000)]
+        RenderInline {SPAN} at (0,0) size 32x28
+          RenderText {TEXT} at (74,84) size 32x48
+            text run at (74,84) width 32: "foo"
+        RenderText {TEXT} at (106,84) size 34x48
+          text run at (106,84) width 34: "baz"
+selection is CARET:
+start:      position 3 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream:   position 3 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 0 of child 3 {TEXT} of root {DIV}
diff --git a/LayoutTests/editing/deleting/delete-after-span-ws-001.html b/LayoutTests/editing/deleting/delete-after-span-ws-001.html
new file mode 100644 (file)
index 0000000..b34004e
--- /dev/null
@@ -0,0 +1,41 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: solid red 50px;
+    font-size: 24px; 
+    line-height: 48px; 
+    padding: 24px; 
+    margin: 64px;
+    width: 600px; 
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    var elem = document.getElementById("test-1");
+    var selection = window.getSelection();
+    selection.setPosition(elem.firstChild, 0);
+    for (var i = 0; i < 4; i++)
+        moveSelectionForwardByCharacterCommand();
+    deleteCommand();    
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test-1">foo</span> baz
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/deleting/delete-after-span-ws-002-expected.txt b/LayoutTests/editing/deleting/delete-after-span-ws-002-expected.txt
new file mode 100644 (file)
index 0000000..db28d0e
--- /dev/null
@@ -0,0 +1,15 @@
+layer at (0,0) size 820x585
+  RenderCanvas at (0,0) size 800x585
+layer at (0,0) size 820x585
+  RenderBlock {HTML} at (0,0) size 800x585
+    RenderBody {BODY} at (8,64) size 784x457
+      RenderBlock {DIV} at (64,0) size 748x196 [border: (50px solid #FF0000)]
+        RenderInline {SPAN} at (0,0) size 32x28
+          RenderText {TEXT} at (74,84) size 32x48
+            text run at (74,84) width 32: "foo"
+        RenderText {TEXT} at (106,84) size 34x48
+          text run at (106,84) width 34: "baz"
+selection is CARET:
+start:      position 3 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream:   position 3 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 0 of child 3 {TEXT} of root {DIV}
diff --git a/LayoutTests/editing/deleting/delete-after-span-ws-002.html b/LayoutTests/editing/deleting/delete-after-span-ws-002.html
new file mode 100644 (file)
index 0000000..6e51a9a
--- /dev/null
@@ -0,0 +1,41 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: solid red 50px;
+    font-size: 24px; 
+    line-height: 48px; 
+    padding: 24px; 
+    margin: 64px;
+    width: 600px; 
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    var elem = document.getElementById("test-1");
+    var selection = window.getSelection();
+    selection.setPosition(elem.firstChild, 0);
+    for (var i = 0; i < 4; i++)
+        moveSelectionForwardByCharacterCommand();
+    deleteCommand();    
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test-1">foo</span>    baz
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/deleting/delete-after-span-ws-003-expected.txt b/LayoutTests/editing/deleting/delete-after-span-ws-003-expected.txt
new file mode 100644 (file)
index 0000000..db28d0e
--- /dev/null
@@ -0,0 +1,15 @@
+layer at (0,0) size 820x585
+  RenderCanvas at (0,0) size 800x585
+layer at (0,0) size 820x585
+  RenderBlock {HTML} at (0,0) size 800x585
+    RenderBody {BODY} at (8,64) size 784x457
+      RenderBlock {DIV} at (64,0) size 748x196 [border: (50px solid #FF0000)]
+        RenderInline {SPAN} at (0,0) size 32x28
+          RenderText {TEXT} at (74,84) size 32x48
+            text run at (74,84) width 32: "foo"
+        RenderText {TEXT} at (106,84) size 34x48
+          text run at (106,84) width 34: "baz"
+selection is CARET:
+start:      position 3 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream:   position 3 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 0 of child 3 {TEXT} of root {DIV}
diff --git a/LayoutTests/editing/deleting/delete-after-span-ws-003.html b/LayoutTests/editing/deleting/delete-after-span-ws-003.html
new file mode 100644 (file)
index 0000000..1c45026
--- /dev/null
@@ -0,0 +1,45 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: solid red 50px;
+    font-size: 24px; 
+    line-height: 48px; 
+    padding: 24px; 
+    margin: 64px;
+    width: 600px; 
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    var elem = document.getElementById("test-1");
+    var selection = window.getSelection();
+    selection.setPosition(elem.firstChild, 0);
+    for (var i = 0; i < 4; i++)
+        moveSelectionForwardByCharacterCommand();
+    deleteCommand();    
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test-1">foo</span>    
+
+
+
+   baz
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/selection/unrendered-001-expected.txt b/LayoutTests/editing/selection/unrendered-001-expected.txt
new file mode 100644 (file)
index 0000000..42c1a42
--- /dev/null
@@ -0,0 +1,15 @@
+layer at (0,0) size 820x585
+  RenderCanvas at (0,0) size 800x585
+layer at (0,0) size 820x585
+  RenderBlock {HTML} at (0,0) size 800x585
+    RenderBody {BODY} at (8,64) size 784x457
+      RenderBlock {DIV} at (64,0) size 748x196 [border: (50px solid #FF0000)]
+        RenderInline {SPAN} at (0,0) size 32x28
+          RenderText {TEXT} at (74,84) size 32x48
+            text run at (74,84) width 32: "foo"
+        RenderText {TEXT} at (106,84) size 40x48
+          text run at (106,84) width 40: " baz"
+selection is CARET:
+start:      position 2 of child 1 {TEXT} of child 3 {SPAN} of root {DIV}
+upstream:   position 3 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 0 of child 4 {TEXT} of root {DIV}
diff --git a/LayoutTests/editing/selection/unrendered-001.html b/LayoutTests/editing/selection/unrendered-001.html
new file mode 100644 (file)
index 0000000..cbf78b1
--- /dev/null
@@ -0,0 +1,38 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: solid red 50px;
+    font-size: 24px; 
+    line-height: 48px; 
+    padding: 24px; 
+    margin: 64px;
+    width: 600px; 
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    var elem = document.getElementById("test-2");
+    var selection = window.getSelection();
+    selection.setPosition(elem.firstChild, 2);
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test-1">foo</span><span id="test-2" style='display: none;'>bar</span> baz
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/selection/unrendered-002-expected.txt b/LayoutTests/editing/selection/unrendered-002-expected.txt
new file mode 100644 (file)
index 0000000..0dc69f1
--- /dev/null
@@ -0,0 +1,15 @@
+layer at (0,0) size 820x585
+  RenderCanvas at (0,0) size 800x585
+layer at (0,0) size 820x585
+  RenderBlock {HTML} at (0,0) size 800x585
+    RenderBody {BODY} at (8,64) size 784x457
+      RenderBlock {DIV} at (64,0) size 748x196 [border: (50px solid #FF0000)]
+        RenderInline {SPAN} at (0,0) size 32x28
+          RenderText {TEXT} at (74,84) size 32x48
+            text run at (74,84) width 32: "foo"
+        RenderText {TEXT} at (106,84) size 40x48
+          text run at (106,84) width 40: " baz"
+selection is CARET:
+start:      position 1 of child 4 {TEXT} of root {DIV}
+upstream:   position 1 of child 4 {TEXT} of root {DIV}
+downstream: position 1 of child 4 {TEXT} of root {DIV}
diff --git a/LayoutTests/editing/selection/unrendered-002.html b/LayoutTests/editing/selection/unrendered-002.html
new file mode 100644 (file)
index 0000000..c92ce99
--- /dev/null
@@ -0,0 +1,39 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: solid red 50px;
+    font-size: 24px; 
+    line-height: 48px; 
+    padding: 24px; 
+    margin: 64px;
+    width: 600px; 
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    var elem = document.getElementById("test-2");
+    var selection = window.getSelection();
+    selection.setPosition(elem.firstChild, 2);
+    moveSelectionForwardByCharacterCommand();    
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test-1">foo</span><span id="test-2" style='display: none;'>bar</span> baz
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/selection/unrendered-003-expected.txt b/LayoutTests/editing/selection/unrendered-003-expected.txt
new file mode 100644 (file)
index 0000000..b6defb6
--- /dev/null
@@ -0,0 +1,18 @@
+layer at (0,0) size 820x585
+  RenderCanvas at (0,0) size 800x585
+layer at (0,0) size 820x585
+  RenderBlock {HTML} at (0,0) size 800x585
+    RenderBody {BODY} at (8,64) size 784x457
+      RenderBlock {DIV} at (64,0) size 748x196 [border: (50px solid #FF0000)]
+        RenderInline {SPAN} at (0,0) size 32x28
+          RenderText {TEXT} at (74,84) size 32x48
+            text run at (74,84) width 32: "foo"
+        RenderText {TEXT} at (106,84) size 40x48
+          text run at (106,84) width 40: " baz"
+selection is RANGE:
+start:      position 2 of child 1 {TEXT} of child 3 {SPAN} of root {DIV}
+upstream:   position 3 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 0 of child 4 {TEXT} of root {DIV}
+end:        position 1 of child 4 {TEXT} of root {DIV}
+upstream:   position 1 of child 4 {TEXT} of root {DIV}
+downstream: position 1 of child 4 {TEXT} of root {DIV}
diff --git a/LayoutTests/editing/selection/unrendered-003.html b/LayoutTests/editing/selection/unrendered-003.html
new file mode 100644 (file)
index 0000000..a366c99
--- /dev/null
@@ -0,0 +1,39 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: solid red 50px;
+    font-size: 24px; 
+    line-height: 48px; 
+    padding: 24px; 
+    margin: 64px;
+    width: 600px; 
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    var elem = document.getElementById("test-2");
+    var selection = window.getSelection();
+    selection.setPosition(elem.firstChild, 2);
+    extendSelectionForwardByCharacterCommand();    
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test-1">foo</span><span id="test-2" style='display: none;'>bar</span> baz
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/selection/unrendered-004-expected.txt b/LayoutTests/editing/selection/unrendered-004-expected.txt
new file mode 100644 (file)
index 0000000..baf66b3
--- /dev/null
@@ -0,0 +1,15 @@
+layer at (0,0) size 820x585
+  RenderCanvas at (0,0) size 800x585
+layer at (0,0) size 820x585
+  RenderBlock {HTML} at (0,0) size 800x585
+    RenderBody {BODY} at (8,64) size 784x457
+      RenderBlock {DIV} at (64,0) size 748x196 [border: (50px solid #FF0000)]
+        RenderInline {SPAN} at (0,0) size 32x28
+          RenderText {TEXT} at (74,84) size 32x48
+            text run at (74,84) width 32: "foo"
+        RenderText {TEXT} at (106,84) size 40x48
+          text run at (106,84) width 40: " baz"
+selection is CARET:
+start:      position 0 of child 4 {TEXT} of root {DIV}
+upstream:   position 3 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 0 of child 4 {TEXT} of root {DIV}
diff --git a/LayoutTests/editing/selection/unrendered-004.html b/LayoutTests/editing/selection/unrendered-004.html
new file mode 100644 (file)
index 0000000..7f34df5
--- /dev/null
@@ -0,0 +1,40 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: solid red 50px;
+    font-size: 24px; 
+    line-height: 48px; 
+    padding: 24px; 
+    margin: 64px;
+    width: 600px; 
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    var elem = document.getElementById("test-2");
+    var selection = window.getSelection();
+    selection.setPosition(elem.firstChild, 2);
+    extendSelectionForwardByCharacterCommand();    
+    moveSelectionBackwardByCharacterCommand();    
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test-1">foo</span><span id="test-2" style='display: none;'>bar</span> baz
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/selection/unrendered-005-expected.txt b/LayoutTests/editing/selection/unrendered-005-expected.txt
new file mode 100644 (file)
index 0000000..baf66b3
--- /dev/null
@@ -0,0 +1,15 @@
+layer at (0,0) size 820x585
+  RenderCanvas at (0,0) size 800x585
+layer at (0,0) size 820x585
+  RenderBlock {HTML} at (0,0) size 800x585
+    RenderBody {BODY} at (8,64) size 784x457
+      RenderBlock {DIV} at (64,0) size 748x196 [border: (50px solid #FF0000)]
+        RenderInline {SPAN} at (0,0) size 32x28
+          RenderText {TEXT} at (74,84) size 32x48
+            text run at (74,84) width 32: "foo"
+        RenderText {TEXT} at (106,84) size 40x48
+          text run at (106,84) width 40: " baz"
+selection is CARET:
+start:      position 0 of child 4 {TEXT} of root {DIV}
+upstream:   position 3 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 0 of child 4 {TEXT} of root {DIV}
diff --git a/LayoutTests/editing/selection/unrendered-005.html b/LayoutTests/editing/selection/unrendered-005.html
new file mode 100644 (file)
index 0000000..dc7d0b8
--- /dev/null
@@ -0,0 +1,40 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: solid red 50px;
+    font-size: 24px; 
+    line-height: 48px; 
+    padding: 24px; 
+    margin: 64px;
+    width: 600px; 
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    var elem = document.getElementById("test-2");
+    var selection = window.getSelection();
+    selection.setPosition(elem.firstChild, 2);
+    extendSelectionBackwardByCharacterCommand();    
+    moveSelectionForwardByCharacterCommand();    
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test-1">foo</span><span id="test-2" style='display: none;'>bar</span> baz
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/traversal/node-iterator-008-expected.txt b/LayoutTests/traversal/node-iterator-008-expected.txt
new file mode 100644 (file)
index 0000000..faadb16
--- /dev/null
@@ -0,0 +1,20 @@
+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 784x0
+        RenderInline {SPAN} at (0,0) size 0x0
+        RenderInline {SPAN} at (0,0) size 0x0
+        RenderInline {SPAN} at (0,0) size 0x0
+          RenderInline {SPAN} at (0,0) size 0x0
+          RenderInline {SPAN} at (0,0) size 0x0
+          RenderInline {SPAN} at (0,0) size 0x0
+        RenderInline {SPAN} at (0,0) size 0x0
+        RenderInline {SPAN} at (0,0) size 0x0
+        RenderInline {SPAN} at (0,0) size 0x0
+        RenderText {TEXT} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,0) size 784x32
+        RenderBR {BR} at (0,0) size 0x16
+        RenderText {TEXT} at (0,16) size 56x16
+          text run at (0,16) width 56: "SPAN: D"
diff --git a/LayoutTests/traversal/node-iterator-008.html b/LayoutTests/traversal/node-iterator-008.html
new file mode 100644 (file)
index 0000000..05c4c42
--- /dev/null
@@ -0,0 +1,32 @@
+<html> 
+<head>
+<script src=traversal.js language="JavaScript" type="text/JavaScript" ></script>
+<title>Traversal Test</title> 
+</head> 
+<body>
+<div id="test">
+<span id="A"></span><span id="B"></span><span id="C"><span id="D"  marked="YES"></span><span id="E"></span><span id="F"></span></span><span id="G"></span><span id="H"></span><span id="I"></span>
+</div>
+<div style="font-family: Courier; font-size: 14;">
+<script>
+var parent = document.getElementById('test');
+//var root = document.getElementById('A');
+var root = document;
+
+function testNodeFiter(n)
+{
+    if (n.getAttribute('marked') == 'YES') return NodeFilter.FILTER_ACCEPT;
+    return NodeFilter.FILTER_SKIP;
+}
+
+var it = document.createNodeIterator(root, NodeFilter.SHOW_ELEMENT, testNodeFiter, false);
+var out = '';
+while ((n = it.nextNode())) {
+    out += "<br>" + n.tagName + ": " + n.id;
+}
+document.write(out);
+
+</script>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/traversal/tree-walker-005-expected.txt b/LayoutTests/traversal/tree-walker-005-expected.txt
new file mode 100644 (file)
index 0000000..aec2979
--- /dev/null
@@ -0,0 +1,105 @@
+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 784x578
+      RenderBlock {DIV} at (0,0) size 784x0
+        RenderInline {SPAN} at (0,0) size 0x0
+          RenderText {TEXT} at (0,0) size 0x0
+          RenderInline {SPAN} at (0,0) size 0x0
+            RenderText {TEXT} at (0,0) size 0x0
+          RenderText {TEXT} at (0,0) size 0x0
+          RenderInline {SPAN} at (0,0) size 0x0
+            RenderText {TEXT} at (0,0) size 0x0
+          RenderText {TEXT} at (0,0) size 0x0
+          RenderInline {SPAN} at (0,0) size 0x0
+            RenderText {TEXT} at (0,0) size 0x0
+          RenderText {TEXT} at (0,0) size 0x0
+        RenderText {TEXT} at (0,0) size 0x0
+        RenderInline {SPAN} at (0,0) size 0x0
+          RenderText {TEXT} at (0,0) size 0x0
+          RenderInline {SPAN} at (0,0) size 0x0
+            RenderText {TEXT} at (0,0) size 0x0
+            RenderInline {SPAN} at (0,0) size 0x0
+              RenderText {TEXT} at (0,0) size 0x0
+            RenderText {TEXT} at (0,0) size 0x0
+            RenderInline {SPAN} at (0,0) size 0x0
+              RenderText {TEXT} at (0,0) size 0x0
+            RenderText {TEXT} at (0,0) size 0x0
+          RenderText {TEXT} at (0,0) size 0x0
+          RenderInline {SPAN} at (0,0) size 0x0
+            RenderText {TEXT} at (0,0) size 0x0
+            RenderInline {SPAN} at (0,0) size 0x0
+              RenderText {TEXT} at (0,0) size 0x0
+            RenderText {TEXT} at (0,0) size 0x0
+          RenderText {TEXT} at (0,0) size 0x0
+        RenderText {TEXT} at (0,0) size 0x0
+        RenderInline {SPAN} at (0,0) size 0x0
+          RenderText {TEXT} at (0,0) size 0x0
+          RenderInline {SPAN} at (0,0) size 0x0
+            RenderText {TEXT} at (0,0) size 0x0
+            RenderInline {SPAN} at (0,0) size 0x0
+              RenderText {TEXT} at (0,0) size 0x0
+              RenderInline {SPAN} at (0,0) size 0x0
+                RenderText {TEXT} at (0,0) size 0x0
+              RenderText {TEXT} at (0,0) size 0x0
+              RenderInline {SPAN} at (0,0) size 0x0
+                RenderText {TEXT} at (0,0) size 0x0
+              RenderText {TEXT} at (0,0) size 0x0
+              RenderInline {SPAN} at (0,0) size 0x0
+                RenderText {TEXT} at (0,0) size 0x0
+              RenderText {TEXT} at (0,0) size 0x0
+            RenderText {TEXT} at (0,0) size 0x0
+            RenderInline {SPAN} at (0,0) size 0x0
+              RenderText {TEXT} at (0,0) size 0x0
+              RenderInline {SPAN} at (0,0) size 0x0
+                RenderText {TEXT} at (0,0) size 0x0
+              RenderText {TEXT} at (0,0) size 0x0
+            RenderText {TEXT} at (0,0) size 0x0
+          RenderText {TEXT} at (0,0) size 0x0
+        RenderText {TEXT} at (0,0) size 0x0
+        RenderInline {SPAN} at (0,0) size 0x0
+        RenderText {TEXT} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,0) size 784x224
+        RenderBlock {P} at (0,0) size 784x224
+          RenderInline {B} at (0,0) size 104x16
+            RenderText {TEXT} at (0,0) size 104x16
+              text run at (0,0) width 104: "Tree Walker: "
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,16) size 8x16
+            text run at (0,16) width 8: "B"
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,32) size 40x16
+            text run at (0,32) width 40: "  B.2"
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,48) size 72x16
+            text run at (0,48) width 72: "    B.2.1"
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,64) size 8x16
+            text run at (0,64) width 8: "C"
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,80) size 40x16
+            text run at (0,80) width 40: "  C.1"
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,96) size 72x16
+            text run at (0,96) width 72: "    C.1.1"
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,112) size 104x16
+            text run at (0,112) width 104: "      C.1.1.1"
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,128) size 104x16
+            text run at (0,128) width 104: "      C.1.1.2"
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,144) size 104x16
+            text run at (0,144) width 104: "      C.1.1.3"
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,160) size 72x16
+            text run at (0,160) width 72: "    C.1.2"
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,176) size 88x16
+            text run at (0,176) width 88: "      C.2.1"
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,192) size 8x16
+            text run at (0,192) width 8: "D"
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {TEXT} at (0,0) size 0x0
diff --git a/LayoutTests/traversal/tree-walker-005.html b/LayoutTests/traversal/tree-walker-005.html
new file mode 100644 (file)
index 0000000..53c4662
--- /dev/null
@@ -0,0 +1,66 @@
+<html> 
+<head>
+<script src=traversal.js language="JavaScript" type="text/JavaScript" ></script>
+<title>Traversal Test</title> 
+</head> 
+<body>
+<div id="test">
+<span id="A">
+    <span id="A.1">
+    </span>
+    <span id="A.2">
+    </span>
+    <span id="A.3">
+       </span>
+</span>
+<span id="B">
+       <span id="B.1">
+               <span id="B.1.1">
+               </span>
+               <span id="B.1.2">
+               </span>
+       </span>
+       <span id="B.2">
+               <span id="B.2.1">
+               </span>
+       </span>
+</span>
+<span id="C">
+       <span id="C.1">
+               <span id="C.1.1">
+                       <span id="C.1.1.1">
+                       </span>
+                       <span id="C.1.1.2">
+                       </span>
+                       <span id="C.1.1.3">
+                       </span>
+               </span>
+        <span id="C.1.2">
+                       <span id="C.2.1">
+                       </span>
+        </span>
+       </span>
+</span>
+<span id="D">
+</span>
+</div>
+<div style="font-family: Courier; font-size: 14; white-space: pre">
+<script>
+var root = document.getElementById('B');
+
+function testNodeFiter(n)
+{
+    if (n.id == 'B.1')
+        return NodeFilter.FILTER_REJECT;
+    if (n.tagName == 'SPAN')
+        return NodeFilter.FILTER_ACCEPT;
+    return NodeFilter.FILTER_SKIP;
+}
+
+var tw1 = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, testNodeFiter, false);
+document.write(dumpTreeWalker(tw1, root));
+
+</script>
+</div>
+</body>
+</html>
index 18d3d8505bd7e00a73b8c9236db32e9dc1df4a03..37d0aa6d21f1b792e5702ecf23c69761a02b0ba1 100644 (file)
@@ -1,3 +1,30 @@
+2004-07-12  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by me
+        
+        Added new editing-related layout tests
+
+        * layout-tests/editing/deleting/delete-after-span-ws-001-expected.txt: Added.
+        * layout-tests/editing/deleting/delete-after-span-ws-001.html: Added.
+        * layout-tests/editing/deleting/delete-after-span-ws-002-expected.txt: Added.
+        * layout-tests/editing/deleting/delete-after-span-ws-002.html: Added.
+        * layout-tests/editing/deleting/delete-after-span-ws-003-expected.txt: Added.
+        * layout-tests/editing/deleting/delete-after-span-ws-003.html: Added.
+        * layout-tests/editing/selection/unrendered-001-expected.txt: Added.
+        * layout-tests/editing/selection/unrendered-001.html: Added.
+        * layout-tests/editing/selection/unrendered-002-expected.txt: Added.
+        * layout-tests/editing/selection/unrendered-002.html: Added.
+        * layout-tests/editing/selection/unrendered-003-expected.txt: Added.
+        * layout-tests/editing/selection/unrendered-003.html: Added.
+        * layout-tests/editing/selection/unrendered-004-expected.txt: Added.
+        * layout-tests/editing/selection/unrendered-004.html: Added.
+        * layout-tests/editing/selection/unrendered-005-expected.txt: Added.
+        * layout-tests/editing/selection/unrendered-005.html: Added.
+        * layout-tests/traversal/node-iterator-008-expected.txt: Added.
+        * layout-tests/traversal/node-iterator-008.html: Added.
+        * layout-tests/traversal/tree-walker-005-expected.txt: Added.
+        * layout-tests/traversal/tree-walker-005.html: Added.
+
 2004-07-12  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by Hyatt