Closed Bug 306620 Opened 19 years ago Closed 19 years ago

option and optgroup should match enabled/disabled too

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: allan, Assigned: allan)

References

Details

(Keywords: fixed1.8)

Attachments

(1 file)

I missed that option and optgroup also have a disabled attribute.
Status: NEW → ASSIGNED
Blocks: 306621
Attached patch PatchSplinter Review
Here's a patch.

It basically just adds the AfterSetAttr() functionality to OptGroup and Option.
It's exactly the same code... should I inject a common superclass, or just let
it rest?

We could possibly inject the Before/AfterSetAttr somewhere higher in the object
hierachy, as it is needed in quite a few places now.
Attachment #194563 - Flags: superreview?(bzbarsky)
Attachment #194563 - Flags: review?(bzbarsky)
Testcases here:
http://beaufour.dk/tmp/
> We could possibly inject the Before/AfterSetAttr somewhere higher in the object
> hierachy

Separate bug on that, please?
Comment on attachment 194563 [details] [diff] [review]
Patch

>Index: content/html/content/src/nsHTMLOptGroupElement.cpp
>+  virtual void AfterSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,

Why virtual?

>Index: content/html/content/src/nsHTMLOptionElement.cpp
>+  virtual void AfterSetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,

Again.

Looks great otherwise.
Attachment #194563 - Flags: superreview?(bzbarsky)
Attachment #194563 - Flags: superreview+
Attachment #194563 - Flags: review?(bzbarsky)
Attachment #194563 - Flags: review+
Attachment #194563 - Flags: approval1.8b5?
Attachment #194563 - Flags: approval1.8b5? → approval1.8b5+
please add the fixed1.8 keyword when you land this on the branch
Flags: blocking1.8b5+
Checked in to 1.8 branch
Keywords: fixed1.8
Attachment 194563 [details] [diff] does not apply on trunk anymore. Maybe we should wait for bug
308270 before putting this on trunk?
Depends on: 308270
It might be a while before that happens.  Please land this on trunk ASAP so it
can get tested by trunk users too, not just branch users...
Checked in to trunk
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: