Bug 1729008 - Part 2: Make HTMLFormElement::IsLastActiveElement take nsGenericHTMLFormElement as argument; r=smaug
Depends on D124459 Differential Revision: https://phabricator.services.mozilla.com/D124462
This commit is contained in:
@@ -1802,13 +1802,13 @@ bool HTMLFormElement::ImplicitSubmissionIsDisabled() const {
|
||||
}
|
||||
|
||||
bool HTMLFormElement::IsLastActiveElement(
|
||||
const nsIFormControl* aControl) const {
|
||||
MOZ_ASSERT(aControl, "Unexpected call");
|
||||
const nsGenericHTMLFormElement* aElement) const {
|
||||
MOZ_ASSERT(aElement, "Unexpected call");
|
||||
|
||||
for (auto* element : Reversed(mControls->mElements)) {
|
||||
// XXX How about date/time control?
|
||||
if (element->IsTextControl(false) && !element->IsDisabled()) {
|
||||
return element == aControl;
|
||||
return element == aElement;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user