Closed Bug 885024 Opened 11 years ago Closed 11 years ago

"ASSERTION: FindAncestorForm should not be called if @form is set!"

Categories

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

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: jruderman, Assigned: baku)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(1 file, 2 obsolete files)

Attached file testcase (obsolete) (deleted) —
###!!! ASSERTION: FindAncestorForm should not be called if @form is set!: '!HasAttr(kNameSpaceID_None, nsGkAtoms::form)', file content/html/content/src/nsGenericHTMLElement.cpp, line 658
Nice. Baku, please add a check for img to that assertion.
Keywords: regression
Attached patch patch (obsolete) (deleted) — Splinter Review
Test included.
Attachment #765385 - Flags: review?(bzbarsky)
Comment on attachment 765385 [details] [diff] [review] patch No, this is backwards. @form means nothing on <img> so HTMLImageElement::UpdateFormOwner was correct but the assert in FindAncestorForm is wrong: it should only assert !HasAttr if the element is not an image.
Attachment #765385 - Flags: review?(bzbarsky) → review-
And you should add a test that when an <img form="foo"> is added as a descendant of <form id="bar"> it still shows up on the form id="bar", even if there is another <form id="foo"> around.
Attached patch patch (deleted) — Splinter Review
Attachment #764995 - Attachment is obsolete: true
Attachment #765385 - Attachment is obsolete: true
Attachment #765446 - Flags: review?(bzbarsky)
Comment on attachment 765446 [details] [diff] [review] patch r=me I assume this test does fail with your first patch?
Attachment #765446 - Flags: review?(bzbarsky) → review+
Keywords: checkin-needed
Assignee: nobody → amarchesini
Flags: in-testsuite+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: