Closed Bug 338649 Opened 18 years ago Closed 18 years ago

"ASSERTION: Options collection broken" involving optgroup inside option

Categories

(Core :: Layout: Form Controls, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: sicking)

References

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Security-sensitive only because bug 324918, where this assertion was added, is security-sensitive.

###!!! ASSERTION: Options collection broken: 'opt == aArray->ItemAsOption(aIndex++)', file /Users/admin/trunk/mozilla/content/html/content/src/nsHTMLSelectElement.cpp, line 2143
Attached file testcase
Attached patch Patch to fixSplinter Review
The problem is that the GetSelect method on nsHTMLOptionElement and nsHTMLOptGroupElement walks up the entire parent chain, rather than just a chain of optgroup elements. This confuses nsHTMLSelectElement since it gets notificaions from elements that it then doesn't find when walking the tree of just optgroup elements.

I fixed this and also gave the internal GetSelect methods better signatures to avoid extra QIs. Additionally I removed nsHTMLOptionElement::GetSelectFrame since that function isn't used
Assignee: nobody → bugmail
Status: NEW → ASSIGNED
Attachment #222853 - Flags: superreview?(bzbarsky)
Attachment #222853 - Flags: review?(bzbarsky)
Comment on attachment 222853 [details] [diff] [review]
Patch to fix

Looks reasonable.
Attachment #222853 - Flags: superreview?(bzbarsky)
Attachment #222853 - Flags: superreview+
Attachment #222853 - Flags: review?(bzbarsky)
Attachment #222853 - Flags: review+
I think Sicking checked this patch in at 2006-07-27 14:06.
Indeed, thanks.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
How could this bug block bug 324918 if that one was fixed in 1.8.0.4 and this one wasn't?
This is either fixed on the branch or never affected it. Long-fixed, removing security flag
Group: security
Crashtest checked in.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: