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

Issue 11665021: Merge 138365 (Closed)

Created:
8 years ago by tkent
Modified:
8 years ago
Reviewers:
keishi
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Visibility:
Public.

Description

Merge 138365 > Fix typing zero into multiple field input > https://bugs.webkit.org/show_bug.cgi?id=105501 > > Reviewed by Kent Tamura. > > Source/WebCore: > > 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): > > LayoutTests: > > * fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events-expected.txt: > * fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events.html: > * fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-keyboard-events-expected.txt: > * fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-keyboard-events.html: > * fast/forms/month-multiple-fields/month-multiple-fields-keyboard-events-expected.txt: > * fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events-expected.txt: > * fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html: > * fast/forms/week-multiple-fields/week-multiple-fields-keyboard-events-expected.txt: > * fast/forms/week-multiple-fields/week-multiple-fields-keyboard-events.html: > TBR=keishi@webkit.org BUG=crbug.com/167020 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=138417

Patch Set 1 #

Messages

Total messages: 1 (0 generated)
tkent
8 years ago (2012-12-23 09:26:26 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698