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
When there is two-level nested iframe, like, a.com contains an iframe b.com,
and b.com contains an iframe c.com, when script in c.com calls window.focus()
to get the focus, we need to adjust the activeElement in a.com and b.com.
Currently, it needs to bounce IPC twice to make a.com get updated. This patch
tries to make a.com could be updated sooner, so when parent process recive the
adjustWindowFocus IPC from process of c.com, it will notify process of b.com
and a.com at the same time.
Differential Revision: https://phabricator.services.mozilla.com/D105659
Preserve the last state of when we focused the element in that window,
if the focus method is unknown.
Depends on D104861
Differential Revision: https://phabricator.services.mozilla.com/D104863
With multiple windows, a browsing context being active doesn't guarantee
being in the active window, so we explicitly check for that. We need to
introduce an special case for the initial document because the initial
document in the active window requesting focus breaks focusing the
urlbar on a new window.
Differential Revision: https://phabricator.services.mozilla.com/D104326
This simplify the code a bit and also fix FocusIsOutOfProcess isn't set correctly
for a certain case, e.g. framer calls iframe.focus() on a OOP iframe.
Differential Revision: https://phabricator.services.mozilla.com/D96720
A new `BrowsingContext` field has been added to track the active
browser window for the `:-moz-window-inactive` pseudoclass. This
field takes the place of `nsPIDOMWindowOuter::mIsActive`.
With this change `:-moz-window-inactive` is now fission compatible.
Differential Revision: https://phabricator.services.mozilla.com/D86422
A new `BrowsingContext` field has been added to track the active
browser window for the `:-moz-window-inactive` pseudoclass. This
field takes the place of `nsPIDOMWindowOuter::mIsActive`.
With this change `:-moz-window-inactive` is now fission compatible.
Differential Revision: https://phabricator.services.mozilla.com/D86422
The spec text has been improved a while ago, so I think we should do
this. This keeps the current moz-focusring behavior when the pref is
disabled, but when enabled it becomes effectively an alias of
focus-visible.
Differential Revision: https://phabricator.services.mozilla.com/D96697
Actually software keyboard is opened by the following situations.
- Click event in editor
- Get new focus event.
Ace editor has small <textarea> element to handles some input events.
When clicking editable-like area (but this isn't ediable on Ace editor),
mousedown handler calls `event.preventDefault()` then set focus to
<textarea> element. So editor doesn't get click event and focus is still
keep in <textarea> element. At finally, we cannot open software keyboard
again since focus isn't changed.
So even if focus isn't changed, we should call SetInputContext to open
software keyboard.
Also, actually we doesn't have generic test code for notification of
software keyboard change (bug 1670539). I will add the test by bug 1670539.
Differential Revision: https://phabricator.services.mozilla.com/D93326
And make nsFocusManager::ParentActivated just returning void given all caller
doesn't actaully check the return value.
Differential Revision: https://phabricator.services.mozilla.com/D91294
This patch also does following changes,
- Assert aDocument instead of early return given all caller passes a non-null document.
- Make it returning void given all caller doesn't actaully check the return value.
Differential Revision: https://phabricator.services.mozilla.com/D91292
And make nsFocusManager::ParentActivated just returning void given all caller
doesn't actaully check the return value.
Differential Revision: https://phabricator.services.mozilla.com/D91294
This patch also does following changes,
- Assert aDocument instead of early return given all caller passes a non-null document.
- Make it returning void given all caller doesn't actaully check the return value.
Differential Revision: https://phabricator.services.mozilla.com/D91292
This patch also does following changes,
- Assert aWindow instead of early return and ensure that caller pass a non-null window.
- Make it returning void given all caller doesn't actaully check the return value.
Differential Revision: https://phabricator.services.mozilla.com/D91291
This patch also does following changes,
- Assert aWindow instead of early return and ensure that caller pass a non-null window.
- Make it returning void given all caller doesn't actaully check the return value.
Differential Revision: https://phabricator.services.mozilla.com/D91290
This patch also does following changes,
- Assert aWindow instead of early return given all caller passes a non-null window.
- Make it returning void given all caller doesn't actaully check the return value.
Differential Revision: https://phabricator.services.mozilla.com/D91289
This patch also does following changes,
- Assert aWindow instead of early return given all caller passes a non-null window.
- Make it returning void given all caller doesn't actaully check the return value.
Differential Revision: https://phabricator.services.mozilla.com/D91288