WebCore:
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Jul 2006 17:22:37 +0000 (17:22 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Jul 2006 17:22:37 +0000 (17:22 +0000)
2006-07-07  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=8300
        REGRESSION: First mouse click is randomly ignored when clicking on checkbox and radio buttons

        * css/html4.css:
        Set "-webkit-user-select: ignore" on radio buttons and check boxes .

LayoutTests:

2006-07-07  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=8300
        REGRESSION: First mouse click is randomly ignored when clicking on checkbox and radio buttons

        * fast/forms/radio-check-click-and-drag-expected.txt: Added.
        * fast/forms/radio-check-click-and-drag.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15200 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/forms/radio-check-click-and-drag-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/radio-check-click-and-drag.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/css/html4.css

index a558e82a9efbb9b1e9f1d45d5b060eaeb38a1621..951daf30b36c64f8dd5cf40fcc7c9badc3c8b95c 100644 (file)
@@ -1,3 +1,13 @@
+2006-07-07  Anders Carlsson  <acarlsson@apple.com>
+
+        Reviewed by Darin.
+
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=8300
+        REGRESSION: First mouse click is randomly ignored when clicking on checkbox and radio buttons
+
+        * fast/forms/radio-check-click-and-drag-expected.txt: Added.
+        * fast/forms/radio-check-click-and-drag.html: Added.
+
 2006-07-06  Justin Garcia  <justin.garcia@apple.com>
 
         Reviewed by levi
diff --git a/LayoutTests/fast/forms/radio-check-click-and-drag-expected.txt b/LayoutTests/fast/forms/radio-check-click-and-drag-expected.txt
new file mode 100644 (file)
index 0000000..52e5005
--- /dev/null
@@ -0,0 +1,4 @@
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:(null) affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+This tests that check boxes and radio buttons can be toggled even if the mouse is moved between the button press and release. If the test is successful, the text "SUCCESS" should be shown below.
+SUCCESS
+
diff --git a/LayoutTests/fast/forms/radio-check-click-and-drag.html b/LayoutTests/fast/forms/radio-check-click-and-drag.html
new file mode 100644 (file)
index 0000000..c995a31
--- /dev/null
@@ -0,0 +1,36 @@
+<html>
+    <head>
+        <script>
+            function simulateDragClick(x, y) {
+                eventSender.mouseMoveTo(x, y);
+                eventSender.mouseDown();
+                eventSender.mouseMoveTo(x + 5, y + 5);
+                eventSender.mouseUp();                
+            }
+            function runTest() {
+                if (!window.layoutTestController) {
+                    alert('this test can only be run by DumpRenderTree.')
+                    return;
+                }
+
+                if (window.layoutTestController)
+                    layoutTestController.dumpAsText();
+                    
+                var checkbox = document.getElementById('checkbox');                
+                var radio = document.getElementById('radio');                
+
+                simulateDragClick(15, 15);
+                simulateDragClick(15, 30);
+
+                if (checkbox.value == 'on' && radio.value == 'on');
+                    document.getElementById('result').innerHTML = "SUCCESS";
+            }
+        </script>
+    </head>    
+    <body onload="runTest()">
+        <div><input id="checkbox" type="checkbox"></div>
+        <div><input name="test" id="radio" type="radio"></div>
+        <div>This tests that check boxes and radio buttons can be toggled even if the mouse is moved between the button press and release. If the test is successful, the text "SUCCESS" should be shown below.</div>
+        <div id="result">FAILURE</div>
+    </body>
+</html>
index fa0d07c4fadf382486229387c8ca51c9e18a4f62..8d721aaa68a182e95c37837755453bd272e1100f 100644 (file)
@@ -1,3 +1,13 @@
+2006-07-07  Anders Carlsson  <acarlsson@apple.com>
+
+        Reviewed by Darin.
+
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=8300
+        REGRESSION: First mouse click is randomly ignored when clicking on checkbox and radio buttons
+        
+        * css/html4.css:
+        Set "-webkit-user-select: ignore" on radio buttons and check boxes .
+        
 2006-07-07  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Tim Hatcher.
index cfea1eeb33b232812d2bfc6fa95c84d53b0c2fad..321626ced3181e4b722bfaa5040c162a7c121b58 100644 (file)
@@ -380,7 +380,7 @@ input[type="button"]:active:disabled, input[type="submit"]:active:disabled, inpu
     border-style: outset
 }
 
-select, button, input[type="button"], input[type="image"], input[type="submit"], input[type="reset"], img {
+select, button, input[type="button"], input[type="image"], input[type="submit"], input[type="reset"], input[type="checkbox"], input[type="radio"], img {
     -webkit-user-select: ignore
 }