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

Unified Diff: LayoutTests/fast/forms/relayout-shifts-inner-editor.html

Issue 952663002: Text inside input field gets misaligned when relaying out (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 5 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/fast/forms/relayout-shifts-inner-editor-expected.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/relayout-shifts-inner-editor.html
diff --git a/LayoutTests/fast/forms/relayout-shifts-inner-editor.html b/LayoutTests/fast/forms/relayout-shifts-inner-editor.html
new file mode 100644
index 0000000000000000000000000000000000000000..25c3302f9e05323af42eecca01214497484ad0a2
--- /dev/null
+++ b/LayoutTests/fast/forms/relayout-shifts-inner-editor.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<script>
+var i = 0;
+var refreshIntervalId;
+function repaintTest()
+{
+ refreshIntervalId = setInterval(function(){moveInputElement();}, 10);
+}
+function moveInputElement()
+{
+ var input = document.getElementById('input');
+ i++;
+ input.style.left = i*10 + 'px';
+ if (i >= 3) {
+ clearInterval(refreshIntervalId);
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+}
+if (window.testRunner)
+ testRunner.waitUntilDone();
+window.onload = repaintTest();
+</script>
+<style>
+input {
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 50px;
+ width: 200px;
+}
+</style>
+<div>This change checks that the caret in the &gt;input&lt; below doesn't shift out of it after several layouts.</div>
+<div>This test has passed if the caret is centered <b>inside</b> the &gt;input&lt;</div>
+<input id="input" type="text" autofocus>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/relayout-shifts-inner-editor-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698