[Webkit-unassigned] [Bug 250535] Parsing input type=number should skip spaces

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 12 17:37:47 PST 2023


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

--- Comment #1 from Karl Dubost <karlcow at apple.com> ---
All tests pass here 
https://wpt.fyi/results/html/semantics/forms/the-input-element/number.html?label=master&label=experimental&aligned&view=subtest&q=input

But that doesn't mean it covers the full extent of the spec.


Spec 
https://html.spec.whatwg.org/multipage/input.html#number-state-(type=number)

> The value sanitization algorithm is as follows: If the value of the element is not a valid floating-point number, then set it to the empty string instead.

Links to  an algorithm to convert from string to number. 
https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-floating-point-number


> Step 6 Skip ASCII whitespace within input given position.

links to https://infra.spec.whatwg.org/#skip-ascii-whitespace

> To skip ASCII whitespace within a string input given a position variable position, collect a sequence of code points that are ASCII whitespace from input given position. The collected code points are not used, but position is still updated.

And ASCII whitespace means:
https://infra.spec.whatwg.org/#ascii-whitespace

> ASCII whitespace is U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, or U+0020 SPACE.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230113/fb0acaec/attachment.htm>


More information about the webkit-unassigned mailing list