Bug 1128054 - Part 3: Invalid tabindex attribute should not make an element focusable; r=smaug

See https://html.spec.whatwg.org/#attr-tabindex.

Depends on D68209

Differential Revision: https://phabricator.services.mozilla.com/D68210
This commit is contained in:
Edgar Chen
2020-04-04 20:03:09 +00:00
parent 2199aefd76
commit 00e61c43c9
16 changed files with 190 additions and 18 deletions

View File

@@ -527,7 +527,7 @@ bool HTMLImageElement::IsHTMLFocusable(bool aWithMouse, bool* aIsFocusable,
#ifdef XP_MACOSX
(!aWithMouse || nsFocusManager::sMouseFocusesFormControl) &&
#endif
(tabIndex >= 0 || HasAttr(kNameSpaceID_None, nsGkAtoms::tabindex));
(tabIndex >= 0 || GetTabIndexAttrValue().isSome());
return false;
}