Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: LayoutTests/editing/selection/subpixel-positioned-selection.html

Issue 464143003: Fix selection residue in sub-pixel positioned element (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More rebaselines Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/editing/selection/subpixel-positioned-selection-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698