Closed Bug 635554 Opened 14 years ago Closed 12 years ago

Implement :in-range and :out-of-range for <input> when the element is suffering from a value overflow/underflow

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: mounir, Assigned: mounir)

References

Details

(Keywords: doc-bug-filed, html5)

Attachments

(2 files, 1 obsolete file)

This should be quite straightforward with bug 635499 and bug 635553 fixed (and using there tests).
Filed a bug against the specs to have :in-range and :out-of-range pseudo-classes application for HTML elements fit what CSS3-UI requires (which makes more sense too).
Attached patch Patch v1 (obsolete) (deleted) — Splinter Review
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #514088 - Flags: review?(jonas)
Whiteboard: [needs review]
Blocks: 598833
Comment on attachment 514088 [details] [diff] [review] Patch v1 >+ // :in-range and :out-of-range only apply if min and max apply. >+ if (DoesMinMaxApply()) { >+ state |= (GetValidityState(VALIDITY_STATE_RANGE_OVERFLOW) || >+ GetValidityState(VALIDITY_STATE_RANGE_UNDERFLOW)) >+ ? NS_EVENT_STATE_OUTOFRANGE >+ : NS_EVENT_STATE_INRANGE; >+ } As I stated in the HTML bug, I still think that these pseudo-classes should only apply if we're actually enforcing a range. I.e. if either min or max exists and have a valid value.
This will be way more clean when state will be flags on the elements.
Attachment #514088 - Attachment is obsolete: true
Attachment #514088 - Flags: review?(jonas)
Attachment #525734 - Flags: review?(jonas)
Attachment #525735 - Flags: review?(jonas)
Jonas, the patch should correspond to what you want.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs review]
Target Milestone: --- → mozilla16
See bug 866457 for documentation.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: