Index: Source/WebCore/ChangeLog |
=================================================================== |
--- Source/WebCore/ChangeLog (revision 139034) |
+++ Source/WebCore/ChangeLog (working copy) |
@@ -1,3 +1,38 @@ |
+2012-12-21 Keishi Hattori <keishi@webkit.org> |
+ |
+ Fix typing zero into multiple field input |
+ https://bugs.webkit.org/show_bug.cgi?id=105501 |
+ |
+ Reviewed by Kent Tamura. |
+ |
+ We have a couple of problems when handling zero in a multiple fields |
+ element. |
+ 1. Typing '02' into a month field will set '12'. |
+ 2. Typing '0' into 12 hour hour field will set '12' and move to the |
+ focus to the next field. |
+ This change adds a type ahead buffer so we can handle these cases |
+ properly. If the value in the type ahead buffer is valid we set it so a |
+ change event will fire. |
+ |
+ Added tests to *-multiple-fields-keyboard-events.html. |
+ |
+ * html/shadow/DateTimeNumericFieldElement.cpp: |
+ (WebCore::DateTimeNumericFieldElement::didBlur): Clear the type ahead |
+ buffer. handleKeyboardEvent() won't set the type ahead value if it is |
+ not in range, so we set the value here. |
+ (WebCore::DateTimeNumericFieldElement::handleKeyboardEvent): |
+ (WebCore::DateTimeNumericFieldElement::setEmptyValue): Clear type ahead buffer. |
+ (WebCore::DateTimeNumericFieldElement::setValueAsInteger): |
+ (WebCore::DateTimeNumericFieldElement::stepDown): Clear type ahead buffer. |
+ (WebCore::DateTimeNumericFieldElement::stepUp): Clear type ahead buffer. |
+ (WebCore::DateTimeNumericFieldElement::typeAheadValue): Returns integer |
+ value for the type ahead characters. |
+ (WebCore): |
+ (WebCore::DateTimeNumericFieldElement::visibleValue): If we have type |
+ ahead characters, show that. |
+ * html/shadow/DateTimeNumericFieldElement.h: |
+ (DateTimeNumericFieldElement): |
+ |
2012-12-17 Matthew Dempsky <mdempsky@google.com> |
Regression causing DOM objects to have unstable NPObject* references with v8 bindings |