Index: LayoutTests/editing/selection/subpixel-positioned-selection.html |
diff --git a/LayoutTests/editing/selection/subpixel-positioned-selection.html b/LayoutTests/editing/selection/subpixel-positioned-selection.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c3ce8c47308d12bddc9785aecd492d734fa5038f |
--- /dev/null |
+++ b/LayoutTests/editing/selection/subpixel-positioned-selection.html |
@@ -0,0 +1,27 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/run-after-display.js"></script> |
+<script> |
+if (window.testRunner) |
+ testRunner.waitUntilDone(); |
+ |
+function test(start, end) { |
+ var text = document.getElementsByTagName('div')[0].firstChild; |
+ window.getSelection().setBaseAndExtent(text, start, text, end); |
+ if (start == end) { |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
+ return; |
+ } |
+ runAfterDisplay(function() { |
+ test(start + 1, end - 1); |
+ }); |
+} |
+ |
+onload = function() { |
+ test(1, 25); |
+}; |
+</script> |
+There should be no residue when shrinking a selection under a sub-pixel-positioned element. |
+<div style="position: absolute; left: 0.3px"> |
+ABCDEFGHIJKLMNOPQRSTUVWXYZ |
+</div> |