[webkit-reviews] review denied: [Bug 105501] Fix typing zero into multiple field input : [Attachment 180300] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 20 07:34:28 PST 2012
Kent Tamura <tkent at chromium.org> has denied Keishi Hattori
<keishi at webkit.org>'s request for review:
Bug 105501: Fix typing zero into multiple field input
https://bugs.webkit.org/show_bug.cgi?id=105501
Attachment 180300: Patch
https://bugs.webkit.org/attachment.cgi?id=180300&action=review
------- Additional Comments from Kent Tamura <tkent at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=180300&action=review
> Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp:113
> + int value = typeAheadValue();
> + m_typeAheadBuffer.clear();
> + if (value >= 0)
> + setValueAsInteger(value, DispatchEvent);
If the field is for 1-12h and m_typeAheadBuffer is "0", this code will set "0".
I don't think it's a correct behavior.
Dispatching events at this timing looks dangerous. But I think it's ok because
an Event object for this 'blur' event has a RefPtr for this.
> Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp:225
> + if (m_typeAheadBuffer.length() > 0) {
> + bool ok = false;
> + return m_typeAheadBuffer.toString().toInt(&ok);
.length() never be negative. It should be
if (m_typeAheadBuffer.length())
The variable 'ok' is not read. It should be omitted.
return m_typeAheadBuffer.toString().toInt();
More information about the webkit-reviews
mailing list