Title: [88951] trunk/LayoutTests
Revision
88951
Author
[email protected]
Date
2011-06-15 10:11:52 -0700 (Wed, 15 Jun 2011)

Log Message

2011-06-15  Ryosuke Niwa  <[email protected]>

        Reviewed by Dimitri Glazkov.

        Can't type text when input element is shrunken by a CSS rule
        https://bugs.webkit.org/show_bug.cgi?id=62550

        Added a regression test now that the bug no longer reproduces.

        * fast/forms/type-after-focus-rule-shrink-width-expected.txt: Added.
        * fast/forms/type-after-focus-rule-shrink-width.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (88950 => 88951)


--- trunk/LayoutTests/ChangeLog	2011-06-15 17:02:00 UTC (rev 88950)
+++ trunk/LayoutTests/ChangeLog	2011-06-15 17:11:52 UTC (rev 88951)
@@ -1,3 +1,15 @@
+2011-06-15  Ryosuke Niwa  <[email protected]>
+
+        Reviewed by Dimitri Glazkov.
+
+        Can't type text when input element is shrunken by a CSS rule
+        https://bugs.webkit.org/show_bug.cgi?id=62550
+
+        Added a regression test now that the bug no longer reproduces.
+
+        * fast/forms/type-after-focus-rule-shrink-width-expected.txt: Added.
+        * fast/forms/type-after-focus-rule-shrink-width.html: Added.
+
 2011-06-15  Alexander Pavlov  <[email protected]>
 
         Reviewed by Pavel Feldman.

Added: trunk/LayoutTests/fast/forms/type-after-focus-rule-shrink-width-expected.txt (0 => 88951)


--- trunk/LayoutTests/fast/forms/type-after-focus-rule-shrink-width-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/type-after-focus-rule-shrink-width-expected.txt	2011-06-15 17:11:52 UTC (rev 88951)
@@ -0,0 +1,5 @@
+This test ensures WebKit allows text be typed in an input element, when input:focus rule shrinks the width of input element and the focus was set by mouse down on the shrunken part of the element.
+
+To manually test, click on the right half of the input element (green part). You should see 'PASS'.
+
+PASS

Added: trunk/LayoutTests/fast/forms/type-after-focus-rule-shrink-width.html (0 => 88951)


--- trunk/LayoutTests/fast/forms/type-after-focus-rule-shrink-width.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/type-after-focus-rule-shrink-width.html	2011-06-15 17:11:52 UTC (rev 88951)
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+
+input { width: 200px; background: -webkit-linear-gradient(left, white 110px, green 100px); }
+input:focus { width: 100px; }
+
+</style>
+</head>
+<body>
+<p>This test ensures WebKit allows text be typed in an input element, when input:focus rule shrinks the width of input element
+and the focus was set by mouse down on the shrunken part of the element.</p>
+<p>To manually test, click on the right half of the input element (green part). You should see 'PASS'.</p>
+<div><input type="text" value="FAIL" _onmousedown_="setTimeout(typeText, 0)"></div>
+<script>
+
+var input = document.getElementsByTagName('input')[0];
+
+function typeText() {
+    document.execCommand('SelectAll', false, null);
+    document.execCommand('InsertText', false, 'PASS');
+    if (window.layoutTestController) {
+        input.parentNode.innerHTML = input.value;
+        layoutTestController.notifyDone();
+    }
+}
+
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    if (!window.eventSender)
+        document.write('This test requires eventSender');
+    else {
+        layoutTestController.waitUntilDone();
+
+        eventSender.mouseMoveTo(input.offsetLeft + input.offsetWidth * 2 / 3, input.offsetTop + input.offsetHeight / 2);
+        eventSender.mouseDown();
+        eventSender.leapForward(200);
+        eventSender.mouseUp();
+    }
+}
+
+</script>
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to