Title: [125754] trunk
Revision
125754
Author
[email protected]
Date
2012-08-16 00:34:13 -0700 (Thu, 16 Aug 2012)

Log Message

[Forms] Wheel event support in multiple fields time input UI
https://bugs.webkit.org/show_bug.cgi?id=94166

Reviewed by Kent Tamura.

Source/WebCore:

This patch makes multiple fields time input UI to handle wheel event
on spin button.

This patch affects if ENABLE_INPUT_TYPE_TIME and ENABLE_INPUT_TYPE_MULTIPLE_FIELDS
are enabled.

Test: fast/forms/time-multiple-fields/time-multiple-fields-wheel-event.html

* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditElement::defaultEventHandler): Changed to forward
event to spin button if available.

LayoutTests:

This patch adds a test for wheel event handling in multiple fields
time input UI.

* fast/forms/time-multiple-fields/time-multiple-fields-wheel-event-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-wheel-event.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (125753 => 125754)


--- trunk/LayoutTests/ChangeLog	2012-08-16 07:28:43 UTC (rev 125753)
+++ trunk/LayoutTests/ChangeLog	2012-08-16 07:34:13 UTC (rev 125754)
@@ -1,3 +1,16 @@
+2012-08-16  Yoshifumi Inoue  <[email protected]>
+
+        [Forms] Wheel event support in multiple fields time input UI
+        https://bugs.webkit.org/show_bug.cgi?id=94166
+
+        Reviewed by Kent Tamura.
+
+        This patch adds a test for wheel event handling in multiple fields
+        time input UI. 
+
+        * fast/forms/time-multiple-fields/time-multiple-fields-wheel-event-expected.txt: Added.
+        * fast/forms/time-multiple-fields/time-multiple-fields-wheel-event.html: Added.
+
 2012-08-15  Yoshifumi Inoue  <[email protected]>
 
         [Tests] Disable fast/forms/time-multiple-fields tests for port which don't enable multiple fields time input UI feature

Added: trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-wheel-event-expected.txt (0 => 125754)


--- trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-wheel-event-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-wheel-event-expected.txt	2012-08-16 07:34:13 UTC (rev 125754)
@@ -0,0 +1,23 @@
+Test for wheel operations for <input type=time>
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Initial value is 07:00. We'll wheel up by 08:00:
+PASS input.value is "08:00"
+Wheel up by 100:
+PASS input.value is "09:00"
+Wheel down by 1:
+PASS input.value is "08:00"
+Wheel down by 256:
+PASS input.value is "07:00"
+Disabled input element:
+PASS input.value is "07:00"
+Read-only input element:
+PASS input.value is "07:00"
+No focus:
+PASS input.value is "07:00"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Property changes on: trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-wheel-event-expected.txt
___________________________________________________________________

Added: svn:eol-style

Added: trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-wheel-event.html (0 => 125754)


--- trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-wheel-event.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-wheel-event.html	2012-08-16 07:34:13 UTC (rev 125754)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script src=""
+</head>
+<body>
+<script>
+testWheelEvent({
+    'inputType' : 'time',
+    'initialValue' : '07:00',
+    'stepUpValue1' : '08:00',
+    'stepUpValue2' : '09:00' });
+</script>
+<script src=""
+</body>
+</html>
Property changes on: trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-wheel-event.html
___________________________________________________________________

Added: svn:eol-style

Modified: trunk/Source/WebCore/ChangeLog (125753 => 125754)


--- trunk/Source/WebCore/ChangeLog	2012-08-16 07:28:43 UTC (rev 125753)
+++ trunk/Source/WebCore/ChangeLog	2012-08-16 07:34:13 UTC (rev 125754)
@@ -1,3 +1,22 @@
+2012-08-16  Yoshifumi Inoue  <[email protected]>
+
+        [Forms] Wheel event support in multiple fields time input UI
+        https://bugs.webkit.org/show_bug.cgi?id=94166
+
+        Reviewed by Kent Tamura.
+
+        This patch makes multiple fields time input UI to handle wheel event
+        on spin button.
+
+        This patch affects if ENABLE_INPUT_TYPE_TIME and ENABLE_INPUT_TYPE_MULTIPLE_FIELDS
+        are enabled.
+
+        Test: fast/forms/time-multiple-fields/time-multiple-fields-wheel-event.html
+
+        * html/shadow/DateTimeEditElement.cpp:
+        (WebCore::DateTimeEditElement::defaultEventHandler): Changed to forward
+        event to spin button if available.
+
 2012-08-16  Zhigang Gong  <[email protected]>
 
         TextureMapperGL::beginPainting has a duplicate call to get GL_FRAMEBUFFER_BINDING.

Modified: trunk/Source/WebCore/html/shadow/DateTimeEditElement.cpp (125753 => 125754)


--- trunk/Source/WebCore/html/shadow/DateTimeEditElement.cpp	2012-08-16 07:28:43 UTC (rev 125753)
+++ trunk/Source/WebCore/html/shadow/DateTimeEditElement.cpp	2012-08-16 07:34:13 UTC (rev 125754)
@@ -418,6 +418,12 @@
     if (!focusField)
         return;
 
+    if (m_spinButton) {
+        m_spinButton->forwardEvent(event);
+        if (event->defaultHandled())
+            return;
+    }
+
     focusField->defaultEventHandler(event);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to