Bug 27450 - Support HTML5 :in-range and :out-of-range CSS selectors
Summary: Support HTML5 :in-range and :out-of-range CSS selectors
Status: RESOLVED DUPLICATE of bug 29071
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Kent Tamura
URL: http://www.whatwg.org/specs/web-apps/...
Keywords:
Depends on: 28934 29069 29070 29071
Blocks: HTML5Forms 24703
  Show dependency treegraph
 
Reported: 2009-07-20 11:41 PDT by Peter Kasting
Modified: 2010-04-29 16:48 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Kasting 2009-07-20 11:41:56 PDT
See HTML5 spec section 4.10.4.2.9.

This encompasses parsing the min and max attributes, hooking them to the rangeUnderflow() and rangeOverflow() methods on the ValidityState object, and adding :in-range and :out-of-range support.

There is existing support for some WebKit-custom syntax for similar things for Dashboard widgets; this syntax predates HTML5.  dhyatt says that this syntax will be deprecated, and we don't need to worry about hooking this existing machinery into the ValidityState object or CSS selectors.
Comment 1 Michelangelo De Simone 2009-08-03 13:42:54 PDT
On http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#rules-for-parsing-floating-point-number-values there's the algorithm to parse element's value and check whether or not it's a float number value.

Is that somehow already implemented?
Comment 2 Kent Tamura 2009-08-04 03:33:53 PDT
(In reply to comment #1)
> On
> http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#rules-for-parsing-floating-point-number-values
> there's the algorithm to parse element's value and check whether or not it's a
> float number value.
> 
> Is that somehow already implemented?

WTF::strtod() in JavaScriptCore/wtf/dtoa.h might be useful.
Comment 3 Michelangelo De Simone 2009-08-04 19:06:28 PDT
(In reply to comment #2)

> WTF::strtod() in JavaScriptCore/wtf/dtoa.h might be useful.

Thanks man, it's a good starting point.
Comment 4 Kent Tamura 2009-09-08 22:42:26 PDT
I'll split this bug into 3.  They will be:
 - min/max and ValidityState.rangeOverflow rangeUnderflow support for type=number
 - ditto for date&time types
 - :in-range and :out-of-range CSS selectors
Comment 5 Peter Kasting 2010-04-29 11:45:23 PDT
Kent, did anything ever happen on this?
Comment 6 Kent Tamura 2010-04-29 16:38:53 PDT
(In reply to comment #5)
> Kent, did anything ever happen on this?

min/max attribute support was done.
The remaining is :out-of-range and :in-range CSS selectors. It's easy to implement but my priority for it is low.
Comment 7 Peter Kasting 2010-04-29 16:40:30 PDT
OK, updating title.
Comment 8 Kent Tamura 2010-04-29 16:44:20 PDT
It already has a dedicated bug: Bug#29071.
Comment 9 Peter Kasting 2010-04-29 16:48:13 PDT
OK, you could have just marked as a dupe then.

*** This bug has been marked as a duplicate of bug 29071 ***