[Webkit-unassigned] [Bug 104628] Milliseconds field of date/time input UI should respect step attribute

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 10 22:07:33 PST 2012


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





--- Comment #3 from Kent Tamura <tkent at chromium.org>  2012-12-10 22:09:58 PST ---
(From update of attachment 178709)
View in context: https://bugs.webkit.org/attachment.cgi?id=178709&action=review

The approach looks good.

> Source/WebCore/html/shadow/DateTimeEditElement.cpp:220
> +        ASSERT(!m_parameters.stepRange.step().isZero());
> +        int step = 1;
> +        if (Decimal(static_cast<int>(msPerSecond)).remainder(m_parameters.stepRange.step()).isZero())
> +            step = static_cast<int>(m_parameters.stepRange.step().toDouble());
> +        RefPtr<DateTimeNumericFieldElement> field = DateTimeMillisecondFieldElement::create(document, m_editElement, step);

We should take account of non-zero step-base value.  e.g. <input type=time step=0.100 min=00:00:00.050>
We need to pass step-base value (the milliseconds part of the min), or stop step-aware behavior if step-base is not zero.

> Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp:71
> +    , m_step(step)
>  {
>      // We show a direction-neutral string such as "--" as a placeholder. It

We should have ASSERT(m_step).

> Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp:199
>          setValueAsInteger(defaultValueForStepDown(), DispatchEvent);

defaultValueForStepDown() needs to be aligned to m_step.

> Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp:212
>          setValueAsInteger(defaultValueForStepUp(), DispatchEvent);

defaultValueForStepUp() needs to be aligned to m_step.

-- 
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