Bug 1699570 - Make mouse_focuses_formcontrol on chrome documents match the old behavior. r=mstange

For that, we make accessibility.mouse_focuses_formcontrol a static pref,
and make it work in all platforms because it's simpler and allows to
test mac-specific things on other platforms more easily.

Differential Revision: https://phabricator.services.mozilla.com/D109006
This commit is contained in:
Emilio Cobos Álvarez
2021-03-18 23:01:45 +00:00
parent ba6527aabd
commit 07e9744706
14 changed files with 72 additions and 57 deletions

View File

@@ -6131,13 +6131,7 @@ bool HTMLInputElement::IsHTMLFocusable(bool aWithMouse, bool* aIsFocusable,
return false;
}
#ifdef XP_MACOSX
const bool defaultFocusable =
!aWithMouse || nsFocusManager::sMouseFocusesFormControl;
#else
const bool defaultFocusable = true;
#endif
const bool defaultFocusable = IsFormControlDefaultFocusable(aWithMouse);
if (CreatesDateTimeWidget()) {
if (aTabIndex) {
// We only want our native anonymous child to be tabable to, not ourself.