[Webkit-unassigned] [Bug 50007] New: Auto-clamping values don't work for <input type="range" step="any" />

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 24 00:35:43 PST 2010


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

           Summary: Auto-clamping values don't work for <input
                    type="range" step="any" />
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: dmikurube at google.com


How to reproduce:

1. <input type="range" step="any" id="range" min="0" max="300" />
2. document.getElementById("range").value = 199

Expected :
document.getElementById("range").value should be 198.
document.getElementById("range").stepMismatch() should be false correctly.

Actual:
document.getElementById("range").value is 199.
document.getElementById("range").stepMismatch() is false. (As RangeInputType::stepMismatch() is hard-coded.) But it is not step-matching.



Facts:

1. A value in <input type="range" /> must be clamped for steps. Never stepMismatch() == true.
2. stepUp() for <input type="range" step="any" /> assumes step="'(1/100 of the value range)" in the current implementation. (See the comment below (*))

(*) WebCore/html/RangeInputType.cpp :
         // FIXME: We can't use stepUp() for the step value "any". So, we increase
        // or decrease the value by 1/100 of the value range. Is it reasonable?

Though 1 and 2, input.value can be set with a step-mismatched value in case of step="any".

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