зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1401992 - Don't cross anonymous boundaries when finding the fieldset. r=bz
MozReview-Commit-ID: DiywRognpqx
This commit is contained in:
Родитель
528cd7a92c
Коммит
2ceae78919
|
@ -545,7 +545,7 @@ nsGenericHTMLElement::FindAncestorForm(HTMLFormElement* aCurrentForm)
|
|||
"FindAncestorForm should not be called if @form is set!");
|
||||
|
||||
// Make sure we don't end up finding a form that's anonymous from
|
||||
// our point of view.
|
||||
// our point of view. See also nsGenericHTMLFormElement::UpdateFieldSet.
|
||||
nsIContent* bindingParent = GetBindingParent();
|
||||
|
||||
nsIContent* content = this;
|
||||
|
@ -2365,7 +2365,11 @@ nsGenericHTMLFormElement::UpdateFieldSet(bool aNotify)
|
|||
nsIContent* parent = nullptr;
|
||||
nsIContent* prev = nullptr;
|
||||
|
||||
for (parent = GetParent(); parent;
|
||||
// Don't walk out of anonymous subtrees. Note the similar code in
|
||||
// nsGenericHTMLElement::FindAncestorForm.
|
||||
nsIContent* bindingParent = GetBindingParent();
|
||||
|
||||
for (parent = GetParent(); parent && parent != bindingParent;
|
||||
prev = parent, parent = parent->GetParent()) {
|
||||
HTMLFieldSetElement* fieldset =
|
||||
HTMLFieldSetElement::FromContent(parent);
|
||||
|
|
Загрузка…
Ссылка в новой задаче