Persona is no longer an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 635554 - Implement :in-range and :out-of-range for <input> when the element is suffering from a value overflow/underflow
: Implement :in-range and :out-of-range for <input> when the element is sufferi...
: doc-bug-filed, html5
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal with 1 vote (vote)
: mozilla16
Assigned To: Mounir Lamouri (:mounir)
: Jet Villegas (:jet)
Depends on: 635499 635553
Blocks: 344616 598833
  Show dependency treegraph
Reported: 2011-02-19 16:00 PST by Mounir Lamouri (:mounir)
Modified: 2013-04-27 15:08 PDT (History)
7 users (show)
mounir: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch v1 (11.39 KB, patch)
2011-02-21 16:10 PST, Mounir Lamouri (:mounir)
no flags Details | Diff | Splinter Review
Part 1 - Keep track of whether an input element has a range applying (4.47 KB, patch)
2011-04-13 11:16 PDT, Mounir Lamouri (:mounir)
jonas: review+
Details | Diff | Splinter Review
Part 2 - Implement :in-range and :out-of-range (12.38 KB, patch)
2011-04-13 11:17 PDT, Mounir Lamouri (:mounir)
jonas: review+
Details | Diff | Splinter Review

Description Mounir Lamouri (:mounir) 2011-02-19 16:00:32 PST
This should be quite straightforward with bug 635499 and bug 635553 fixed (and using there tests).
Comment 1 Mounir Lamouri (:mounir) 2011-02-21 16:09:44 PST
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).
Comment 2 Mounir Lamouri (:mounir) 2011-02-21 16:10:24 PST
Created attachment 514088 [details] [diff] [review]
Patch v1
Comment 3 Jonas Sicking (:sicking) No longer reading bugmail consistently 2011-03-30 17:06:27 PDT
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.
Comment 4 Mounir Lamouri (:mounir) 2011-04-13 11:16:37 PDT
Created attachment 525734 [details] [diff] [review]
Part 1 - Keep track of whether an input element has a range applying

This will be way more clean when state will be flags on the elements.
Comment 5 Mounir Lamouri (:mounir) 2011-04-13 11:17:38 PDT
Created attachment 525735 [details] [diff] [review]
Part 2 - Implement :in-range and :out-of-range
Comment 6 Mounir Lamouri (:mounir) 2011-04-13 11:18:50 PDT
Jonas, the patch should correspond to what you want.
Comment 8 Florian Scholz [:fscholz] (MDN) 2013-04-27 15:08:42 PDT
See bug 866457 for documentation.

Note You need to log in before you can comment on or make changes to this bug.