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 shipped in 85, we can remove the feature flag now. Keep
:-moz-focusring as an alias to :focus-visible at parse time.
Differential Revision: https://phabricator.services.mozilla.com/D103752
This shipped in 85, we can remove the feature flag now. Keep
:-moz-focusring as an alias to :focus-visible at parse time.
Differential Revision: https://phabricator.services.mozilla.com/D103752
Note that there's still a little plugin related code in
widget/ and gfx/ etc after this. That can be removed
once we remove plugin support from dom/ etc.
The removal from layout/ should be pretty complete though.
Differential Revision: https://phabricator.services.mozilla.com/D102140
We always compute the tabindex value, so just return it to the caller
all the time. This allows us to use early-returns which makes the code a
bit easier to follow.
This patch shouldn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D100423
Resetting focus would also clear selection on editable element, so get
current selected text before moving focus to findbar to make
prefill-with-selection work if the content is loaded in chrome process.
Differential Revision: https://phabricator.services.mozilla.com/D89557
Resetting focus would also clear selection on editable element, so get
current selected text before moving focus to findbar to make
prefill-with-selection work if the content is loaded in chrome process.
Differential Revision: https://phabricator.services.mozilla.com/D89557
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
This is useful for printing. Naming is confusing IMO, but my read of the
docs and experimentation agree this is what we want :)
Differential Revision: https://phabricator.services.mozilla.com/D98415
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
This suppress unnecessary blur and focus actions in the framer, we would need
to find a way to notify framer that the focus has moved to OOP iframe to
dispatch corresponding blur event, see bug 1677474.
Differential Revision: https://phabricator.services.mozilla.com/D97158
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
We got the data we need to make a decision.
(( This is a combined revert of the four commits that added the instrumentation ))
Differential Revision: https://phabricator.services.mozilla.com/D94620
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
The expectation is that the blurring would eventually result in an IPC message
doing this anyway, but this doesn't happen if the focus is in OOP iframe which
won't try to bounce an IPC message to its parent frame.
Differential Revision: https://phabricator.services.mozilla.com/D93210
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