Bug 1409183: Don't consider anonymous checkboxes as part of the document radio group. r=smaug
Summary: In this case the radiobox is in a SVG <use> subtree. Reviewers: smaug Bug #: 1409183 Differential Revision: https://phabricator.services.mozilla.com/D741 MozReview-Commit-ID: Abkg7ahST5t
This commit is contained in:
@@ -3213,6 +3213,10 @@ HTMLInputElement::GetRadioGroupContainer() const
|
||||
return mForm;
|
||||
}
|
||||
|
||||
if (IsInAnonymousSubtree()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//XXXsmaug It isn't clear how this should work in Shadow DOM.
|
||||
return static_cast<nsDocument*>(GetUncomposedDoc());
|
||||
}
|
||||
@@ -6680,7 +6684,7 @@ HTMLInputElement::AddedToRadioGroup()
|
||||
{
|
||||
// If the element is neither in a form nor a document, there is no group so we
|
||||
// should just stop here.
|
||||
if (!mForm && !IsInUncomposedDoc()) {
|
||||
if (!mForm && (!IsInUncomposedDoc() || IsInAnonymousSubtree())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user