mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 738744 - Fix "ASSERTION: Form controls should always have parents". r=bz
This commit is contained in:
parent
51ba3dd231
commit
832858eb8d
4
content/html/content/crashtests/738744.xhtml
Normal file
4
content/html/content/crashtests/738744.xhtml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<input xmlns="http://www.w3.org/1999/xhtml" form="f">
|
||||||
|
<form id="f" />
|
||||||
|
<input form="f" />
|
||||||
|
</input>
|
@ -33,3 +33,4 @@ load 680922-1.xul
|
|||||||
load 682058.xhtml
|
load 682058.xhtml
|
||||||
load 682460.html
|
load 682460.html
|
||||||
load 673853.html
|
load 673853.html
|
||||||
|
load 738744.xhtml
|
||||||
|
@ -1053,7 +1053,12 @@ CompareFormControlPosition(nsGenericHTMLFormElement *aControl1,
|
|||||||
{
|
{
|
||||||
NS_ASSERTION(aControl1 != aControl2, "Comparing a form control to itself");
|
NS_ASSERTION(aControl1 != aControl2, "Comparing a form control to itself");
|
||||||
|
|
||||||
NS_ASSERTION(aControl1->GetParent() && aControl2->GetParent(),
|
// If an element has a @form, we can assume it *might* be able to not have
|
||||||
|
// a parent and still be in the form.
|
||||||
|
NS_ASSERTION((aControl1->HasAttr(kNameSpaceID_None, nsGkAtoms::form) ||
|
||||||
|
aControl1->GetParent()) &&
|
||||||
|
(aControl2->HasAttr(kNameSpaceID_None, nsGkAtoms::form) ||
|
||||||
|
aControl2->GetParent()),
|
||||||
"Form controls should always have parents");
|
"Form controls should always have parents");
|
||||||
|
|
||||||
// If we pass aForm, we are assuming both controls are form descendants which
|
// If we pass aForm, we are assuming both controls are form descendants which
|
||||||
|
Loading…
Reference in New Issue
Block a user