Closed Bug 885024 Opened 6 years ago Closed 6 years ago
Ancestor Form should not be called if @form is set!"
###!!! 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.
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.
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+
Assignee: nobody → amarchesini
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.