Closed Bug 477531 Opened 16 years ago Closed 16 years ago

Support the CSS3 :indeterminate pseudoclass

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ventnor.bugzilla, Assigned: ventnor.bugzilla)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file, 2 obsolete files)

Attached patch Patch (obsolete) — Splinter Review
Now that we support indeterminate checkboxes on all platforms, it would be nice to implement this pseudoclass to make it even more useful. Webkit supports it, as did Tasman when it was still relevant...
Attachment #361198 - Flags: superreview?(dbaron)
Attachment #361198 - Flags: review?(dbaron)
Attachment #361198 - Flags: superreview?(dbaron)
Attachment #361198 - Flags: superreview+
Attachment #361198 - Flags: review?(dbaron)
Attachment #361198 - Flags: review?(bzbarsky)
Attachment #361198 - Flags: review+
Comment on attachment 361198 [details] [diff] [review]
Patch

Looks good to me, but I'd like bzbarsky to look at it as well since he knows the event state stuff better than I do.

I think you should also add a mochitest that tests that dynamic changes work correctly, i.e., that indeterminate starts and stops matching based on the changes to the DOM property.
It would also be good to have a test (mochitest, probably?) that tests that type changes correctly update :indeterminate.  I think they should, since we generally capture state changes across attr changes now, but worth checking.

Other than that, looks ok.  The invalidation living where it does still bothers me, but I don't have a better proposal that wouldn't involve invalidating on those "internal" changes you make there.
Attached patch Patch 2 (obsolete) — Splinter Review
I added both requested tests as a single mochitest referencing this bug.
Attachment #361198 - Attachment is obsolete: true
Attachment #361448 - Flags: review?(bzbarsky)
Attachment #361198 - Flags: review?(bzbarsky)
Comment on attachment 361448 [details] [diff] [review]
Patch 2

Add a test that setting indeterminate back to false also works, and looks great.
Attachment #361448 - Flags: review?(bzbarsky) → review+
Attached patch Patch 3Splinter Review
No worries.
Attachment #361448 - Attachment is obsolete: true
Keywords: checkin-needed
Whiteboard: [needs landing]
Pushed http://hg.mozilla.org/mozilla-central/rev/58c758340aa5
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [needs landing]
Component: Content → DOM
QA Contact: content → general
Keywords: dev-doc-needed
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: