git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20647 268f45cc-cd09-0410...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Apr 2007 05:21:33 +0000 (05:21 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Apr 2007 05:21:33 +0000 (05:21 +0000)
LayoutTests/fast/text/justified-selection-at-edge-expected.checksum [new file with mode: 0644]
LayoutTests/fast/text/justified-selection-at-edge-expected.png [new file with mode: 0644]
LayoutTests/fast/text/justified-selection-at-edge-expected.txt [new file with mode: 0644]
LayoutTests/fast/text/justified-selection-at-edge.html [new file with mode: 0644]

diff --git a/LayoutTests/fast/text/justified-selection-at-edge-expected.checksum b/LayoutTests/fast/text/justified-selection-at-edge-expected.checksum
new file mode 100644 (file)
index 0000000..a034931
--- /dev/null
@@ -0,0 +1 @@
+195976e085eefa71242608e6af9ecf89
\ No newline at end of file
diff --git a/LayoutTests/fast/text/justified-selection-at-edge-expected.png b/LayoutTests/fast/text/justified-selection-at-edge-expected.png
new file mode 100644 (file)
index 0000000..e28b4bd
Binary files /dev/null and b/LayoutTests/fast/text/justified-selection-at-edge-expected.png differ
diff --git a/LayoutTests/fast/text/justified-selection-at-edge-expected.txt b/LayoutTests/fast/text/justified-selection-at-edge-expected.txt
new file mode 100644 (file)
index 0000000..274f4a2
--- /dev/null
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x576
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 386x18
+          text run at (0,0) width 386: "Test for bug 13234, layout of selected justified text is broken."
+      RenderBlock {P} at (0,34) size 784x18
+        RenderText {#text} at (0,0) size 251x18
+          text run at (0,0) width 251: "The two blue boxes should be identical."
+      RenderBlock {DIV} at (0,68) size 256x42 [border: (3px solid #0000FF)]
+        RenderText {#text} at (3,3) size 189x18
+          text run at (3,3) width 189: "Lorem ipsum dolor si"
+        RenderInline {SPAN} at (0,0) size 61x18 [color=#008000] [bgcolor=#FFFF00]
+          RenderText {#text} at (192,3) size 61x18
+            text run at (192,3) width 61: "t amet,"
+        RenderText {#text} at (3,21) size 173x18
+          text run at (3,21) width 173: "consectetuer adipiscing elit."
+      RenderBlock (anonymous) at (0,110) size 784x18
+        RenderBR {BR} at (0,0) size 0x18
+      RenderBlock {P} at (0,144) size 256x42 [border: (3px solid #0000FF)]
+        RenderText {#text} at (3,3) size 250x36
+          text run at (3,3) width 250: "Lorem ipsum dolor sit amet,"
+          text run at (3,21) width 173: "consectetuer adipiscing elit."
+selection start: position 20 of child 0 {#text} of child 8 {P} of child 1 {BODY} of child 0 {HTML} of document
+selection end:   position 27 of child 0 {#text} of child 8 {P} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/fast/text/justified-selection-at-edge.html b/LayoutTests/fast/text/justified-selection-at-edge.html
new file mode 100644 (file)
index 0000000..41b390f
--- /dev/null
@@ -0,0 +1,17 @@
+<style>
+    .fakeselection, ::selection { color: green; background-color: yellow; }
+</style>
+<p>
+    Test for bug 13234, layout of selected justified text is broken.
+</p>
+<p>
+    The two blue boxes should be identical.
+</p>
+<div style="text-align: justify; width: 250px; border: solid blue;">Lorem ipsum dolor si<span class="fakeselection">t amet,</span> consectetuer adipiscing elit.
+ </div>
+<br>
+<p align="justify" id="target" style="width: 250px; border: solid blue">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
+<script>
+    var text = document.getElementById("target").firstChild;
+    getSelection().setBaseAndExtent(text, 27, text, 20);
+</script>