Add assert back into SetFormElement
Categories
(Core :: DOM: HTML Parser, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox94 | --- | fixed |
People
(Reporter: jkt, Assigned: edgar)
References
Details
Attachments
(1 file)
Add back in assert into parser/html/nsHtml5TreeOperation.cpp:
NS_ASSERTION(formControl, "Form-associated element did not implement nsIFormControl.");
Also we can remove formControl from this line too:
if (formControl &&
!aNode->AsElement()->HasAttr(kNameSpaceID_None, nsGkAtoms::form)) {
However we have at least a few crashing tests:
layout/base/crashtests/49122-1.html
tests/reftest/tests/layout/reftests/bugs/81947-1.html
browser/extensions/formautofill/test/unit/heuristics/third_party/test_CDW.js
This code is called when nsHtml5TreeBuilder::createElement(
is triggered, it looks to me like the only other caller of significance is <img>
when in an imagemap.
Reporter | ||
Comment 1•5 years ago
|
||
:hsivonen I made this a follow up bug as it appears Img is now the issue instead.
Updated•4 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
I think the comment and assertion are not valid any more as img is a form-associated element, https://html.spec.whatwg.org/#form-associated-element. And we do already handle the img case well.
Assignee | ||
Comment 3•3 years ago
|
||
Per https://html.spec.whatwg.org/#form-associated-element, img is a form-associated
element, and we do handle the img case well.
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1c5d2eecb0f2 Remove invalid comment and assertion in nsHtml5TreeOperation::SetFormElement; r=hsivonen
Comment 5•3 years ago
|
||
bugherder |
Description
•