[Webkit-unassigned] [Bug 45491] when empty, clicking "down" on outer-spin-button returns "max value"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 25 01:26:30 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=45491





--- Comment #20 from Kent Tamura <tkent at chromium.org>  2010-11-25 01:26:30 PST ---
(From update of attachment 74830)
View in context: https://bugs.webkit.org/attachment.cgi?id=74830&action=review

>>> WebCore/html/HTMLInputElement.h:270
>>> +    virtual bool isRangeControl() const { return deprecatedInputType() == RANGE; }
>> 
>> Do not use deprecatedInputType() in new code.
> 
> Replaced with formControlType() == InputTypeNames::range().
> Is it ok?

It's acceptable.  But the best way is to add isRangeControl() to InputType and RangeInputType.
isRangeControl() is not called by other classes.  We don't need to add it to the public section of HTMLInputElement.

>>> WebCore/html/InputType.h:92
>>> +    virtual double defaultValue() const;
>> 
>> The name "defaultValue" is not good.  The functions of InputType are usually synchronized with HTMLInputElement, and HTMLInputElement already has defaultValue().
> 
> Replaced with startingValue().

It is not self-descriptible.  How about defaultValueForStepUp() or something?

>>> WebCore/html/RangeInputType.cpp:165
>>> +        element()->stepUpFromRenderer(stepMagnification);
>> 
>> Is this change related to this bug?
> 
> Yes, keydowns from renderer for range-type inputs are handled with stepUp(), not stepUpFromRenderer() without this change. It results in no clamping steps for range-type inputs.
> 
> If clamping steps (stepwise adjustment) is not related in this bug, this change should be done in another bug. We discussed it at https://bugs.webkit.org/show_bug.cgi?id=48976#c23

Ok, I understand.  stepUp() is insufficient for "natural" behavior and we had better centralize the code.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list