[webkit-reviews] review denied: [Bug 57723] Spinbuttons on [type="number"] etc. with [step="any"] do not work : [Attachment 99054] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jun 29 01:56:04 PDT 2011
Kent Tamura <tkent at chromium.org> has denied Shinya Kawanaka
<shinyak at google.com>'s request for review:
Bug 57723: Spinbuttons on [type="number"] etc. with [step="any"] do not work
https://bugs.webkit.org/show_bug.cgi?id=57723
Attachment 99054: Patch
https://bugs.webkit.org/attachment.cgi?id=99054&action=review
------- Additional Comments from Kent Tamura <tkent at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=99054&action=review
> Source/WebCore/ChangeLog:17
> + * html/HTMLInputElement.cpp:
> + (WebCore::HTMLInputElement::applyStep):
> +
(WebCore::HTMLInputElement::getAllowedValueStepWithDecimalPlacesWithAllowingSte
pAny):
> + (WebCore::HTMLInputElement::stepUp):
> + (WebCore::HTMLInputElement::stepDown):
> + (WebCore::HTMLInputElement::stepUpFromRenderer):
> + * html/HTMLInputElement.h:
You should write summaries of changes in each of files/functions.
> Source/WebCore/html/HTMLInputElement.cpp:380
> +void HTMLInputElement::applyStep(double count, bool allowsStepAny,
ExceptionCode& ec)
Do not introduce bool parameter. We prefer enum to bool strongly.
e.g.
enum AnyStepHandling { RejectAny, AnyIsDefaultStep };
> Source/WebCore/html/HTMLInputElement.cpp:443
> + ASSERT(step);
> + double defaultStep = m_inputType->defaultStep();
> + double stepScaleFactor = m_inputType->stepScaleFactor();
> + if (!isfinite(defaultStep) || !isfinite(stepScaleFactor))
> + return false;
This part is duplicate with getAllowedValueStepWithDecimalPlaces(). It's not
good.
The difference between this function and getAllowedValueStepWithDecimalPlaces()
is only "any" handling. I think it's ok to add the enum parameter to
getAllowedValueStepWithDecimalPlaces().
More information about the webkit-reviews
mailing list