Sean Feng
b6ab38886a
Bug 1724816 - Check the focused window still persists after MoveCaretToFocus r=smaug
...
In nsFocusManager::UpdateCaret, the focused window has a null check
at the beginning of the function. However, this isn't enough because
MoveCaretToFocus can possibly run scripts as well, and the scripts
may clear the focused window.
This patch adds a null check after the usage of MoveCaretToFocus.
Differential Revision: https://phabricator.services.mozilla.com/D122750
2021-08-16 18:51:26 +00:00
Andi-Bogdan Postelnicu
f07c975367
Bug 1519636 - Reformat recent changes to the Google coding style. r=necko-reviewers,emilio
...
Updated with clang-format version 12.0.0 (taskcluster-FZRqPXamQIOU_i4hF0cAcg)
Differential Revision: https://phabricator.services.mozilla.com/D117905
2021-06-17 11:00:22 +00:00
Henri Sivonen
3e40a36745
Bug 1713624 - Null out mFocusedWindow when receiving OOP focused BrowsingContext. r=NeilDeakin
...
Differential Revision: https://phabricator.services.mozilla.com/D117156
2021-06-09 15:08:36 +00:00
Henri Sivonen
fed8756f39
Bug 1681983 - Adjust a comment in nsFocusManager for Fission. r=NeilDeakin DONTBUILD
...
Differential Revision: https://phabricator.services.mozilla.com/D116215
2021-06-09 14:45:05 +00:00
Brindusan Cristian
f1c800c956
Backed out changeset 5d7dec65aced (bug 1681983) for causing mochitest failures in test_focus.xhtml.
...
CLOSED TREE
2021-06-08 00:41:59 +03:00
Henri Sivonen
9b5990ba79
Bug 1681983 - Make SetFocusedWindowWithCallerType not call ClearFocus. r=NeilDeakin
...
No test, because the expectation is that this code is not actually exercised anyway.
Differential Revision: https://phabricator.services.mozilla.com/D116215
2021-06-07 17:42:21 +00:00
Sandor Molnar
f54d590b19
Backed out changeset a385ad897612 (bug 1681983) for causing reftest failures. CLOSED TREE
2021-06-03 17:48:07 +03:00
Henri Sivonen
5ecf096b95
Bug 1681983 - Make SetFocusedWindowWithCallerType speculatively more Fission-aware. r=NeilDeakin
...
No test, because the expectation is that this code is not actually exercised anyway.
Differential Revision: https://phabricator.services.mozilla.com/D116215
2021-06-03 13:40:09 +00:00
Edgar Chen
2d24105bd2
Bug 1712038 - Exit fullscreen only when the focus change will raise the window; r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D116182
2021-05-28 20:42:32 +00:00
Emilio Cobos Álvarez
2314b37da7
Bug 1712724 - Don't trigger select on programmatic focus during keyboard events. r=smaug
...
Depends on D115900
Differential Revision: https://phabricator.services.mozilla.com/D115901
2021-05-26 11:21:44 +00:00
Emilio Cobos Álvarez
d289bd695b
Bug 1712724 - Cleanup focus method mask usage. r=smaug
...
No behavior change, since `GetLastFocusMethod` is only checked by `HTMLInputElement.cpp` / `nsGlobalWindowInner.cpp` for FLAG_BYKEY, and some JS code for `FLAG_BYMOUSE`.
But this makes the next patch more straight-forward.
Differential Revision: https://phabricator.services.mozilla.com/D115900
2021-05-26 11:21:44 +00:00
Alexandru Michis
1df3b4b4d2
Backed out 3 changesets (bug 1712724) for causing mochitests without e10s failures in test_focus.xhtml
...
CLOSED TREE
Backed out changeset 61d8ca98120b (bug 1712724)
Backed out changeset 46b1d60b6b6b (bug 1712724)
Backed out changeset 36504d508b34 (bug 1712724)
2021-05-26 08:18:02 +03:00
Emilio Cobos Álvarez
ef6415ef1f
Bug 1712724 - Don't trigger select on programmatic focus during keyboard events. r=smaug
...
Depends on D115900
Differential Revision: https://phabricator.services.mozilla.com/D115901
2021-05-25 22:29:02 +00:00
Emilio Cobos Álvarez
8dea5d3fa5
Bug 1712724 - Cleanup focus method mask usage. r=smaug
...
No behavior change, since `GetLastFocusMethod` is only checked by `HTMLInputElement.cpp` / `nsGlobalWindowInner.cpp` for FLAG_BYKEY, and some JS code for `FLAG_BYMOUSE`.
But this makes the next patch more straight-forward.
Differential Revision: https://phabricator.services.mozilla.com/D115900
2021-05-25 22:29:01 +00:00
Emilio Cobos Álvarez
bdb1583dff
Bug 1711057
- Consider programmatic focus during keyboard input as key focus. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D115137
2021-05-17 13:46:50 +00:00
Edgar Chen
a3ff3d48aa
Bug 1709200 - Rename nsContentUtils::GetRootDocument to GetInProcessSubtreeRootDocument; r=kmag
...
Differential Revision: https://phabricator.services.mozilla.com/D114177
2021-05-05 09:42:20 +00:00
Henri Sivonen
ffad9ff507
Bug 1708632 - Apply reviewbot formatting to focus logging. r=edgar
...
Apply reviewbot's formatting changes to bug 1696323
.
Differential Revision: https://phabricator.services.mozilla.com/D113915
2021-04-30 09:04:22 +00:00
Henri Sivonen
2ea7308888
Bug 1696323
- Return early when attempting to focus a remote iframe whose BrowsingContext is already the focused one. r=edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D112534
2021-04-29 12:51:39 +00:00
imoraru
6349660632
Backed out changeset 12893215ed66 (bug 1696323
) for OS X build bustages on BrowserBridgeChild.cpp. CLOSED TREE
2021-04-29 13:09:17 +03:00
Henri Sivonen
e56b92eb66
Bug 1696323
- Return early when attempting to focus a remote iframe whose BrowsingContext is already the focused one. r=edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D112534
2021-04-29 09:43:53 +00:00
smolnar
b870a28dcc
Backed out changeset 1abffab5d5e9 (bug 1697256) for causing reftest failures in crashtests/1697256. CLOSED TREE
2021-04-14 15:25:49 +03:00
Kagami Sascha Rosylight
4f93853004
Bug 1697256 - Check docshell existence in SetFocusInner r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D111950
2021-04-14 11:02:16 +00:00
David Parks
4db3910bdb
Bug 1682030 - Remove nsIPluginDocument. r=jmathies,emilio
...
Removes nsIPluginDocument and its implementation as part of removing all NPAPI plugin support.
Differential Revision: https://phabricator.services.mozilla.com/D107145
2021-04-06 19:28:13 +00:00
Csoregi Natalia
d68661e2cc
Backed out 24 changesets (bug 1682030) for bustage on ProcessHangMonitor.cpp and nsCOMPtr.h. CLOSED TREE
...
Backed out changeset 5b1644096477 (bug 1682030)
Backed out changeset 35ae60eea3c7 (bug 1682030)
Backed out changeset 3eca76a6d639 (bug 1682030)
Backed out changeset 259c45447ad9 (bug 1682030)
Backed out changeset de9222dc8c31 (bug 1682030)
Backed out changeset 2986c7e14349 (bug 1682030)
Backed out changeset 6af3410bdb93 (bug 1682030)
Backed out changeset 42b0621c2927 (bug 1682030)
Backed out changeset 366e3e371858 (bug 1682030)
Backed out changeset 9adb2865adea (bug 1682030)
Backed out changeset 6af6af3bc03a (bug 1682030)
Backed out changeset da94a91b35ae (bug 1682030)
Backed out changeset 9143da258d0e (bug 1682030)
Backed out changeset 5e20d06952ba (bug 1682030)
Backed out changeset 6253d7e1ce7d (bug 1682030)
Backed out changeset 0e06ddeea3e2 (bug 1682030)
Backed out changeset 9c58d57c9e44 (bug 1682030)
Backed out changeset e90edd89430e (bug 1682030)
Backed out changeset 5861b8166b10 (bug 1682030)
Backed out changeset b4b88cdc7993 (bug 1682030)
Backed out changeset b80054e9805c (bug 1682030)
Backed out changeset 580d857674c0 (bug 1682030)
Backed out changeset a9cdf93c2662 (bug 1682030)
Backed out changeset 9c9c8b4998e2 (bug 1682030)
2021-04-06 03:54:12 +03:00
David Parks
aca228b08f
Bug 1682030 - Remove nsIPluginDocument. r=jmathies,emilio
...
Removes nsIPluginDocument and its implementation as part of removing all NPAPI plugin support.
Differential Revision: https://phabricator.services.mozilla.com/D107145
2021-04-05 23:48:36 +00:00
Henri Sivonen
9c0fdd5c35
Bug 1696908 - Ensure parent-managed order of setting the focused browsing context. r=nika
...
Differential Revision: https://phabricator.services.mozilla.com/D98134
2021-04-01 08:45:14 +00:00
Andreea Pavel
4674e1b5e2
Backed out changeset 27d3d97f875f (bug 1696908) build bustage at nsFocusManager.cpp on a CLOSED TREE
2021-03-31 19:32:11 +03:00
Henri Sivonen
64b6a0c73b
Bug 1696908 - Ensure parent-managed order of setting the focused browsing context. r=nika
...
Differential Revision: https://phabricator.services.mozilla.com/D98134
2021-03-31 14:56:48 +00:00
Edgar Chen
9f111d5ebc
Bug 1675484 - iframe.onfocus should not be invoked when focus moves to out-of-process iframes; r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D110098
2021-03-31 08:53:19 +00:00
Emilio Cobos Álvarez
a8f3c5d571
Bug 1699259 - Add a ChromeOnly FocusOptions.preventFocusRing to opt out of focus ring heuristics. r=edgar,Gijs
...
This seems easier than making those heuristics work across processes
somehow.
Differential Revision: https://phabricator.services.mozilla.com/D108931
2021-03-20 14:49:01 +00:00
Alexandru Michis
c3da6488ee
Backed out changeset f588378316fd (bug 1699259) for causing mochitest failures in test_focusrings.xhtml
...
CLOSED TREE
2021-03-20 03:10:02 +02:00
Emilio Cobos Álvarez
9d854aa834
Bug 1699259 - Add a ChromeOnly FocusOptions.preventFocusRing to opt out of focus ring heuristics. r=edgar,Gijs
...
This seems easier than making those heuristics work across processes
somehow.
Differential Revision: https://phabricator.services.mozilla.com/D108931
2021-03-19 23:10:35 +00:00
Emilio Cobos Álvarez
f2d4b8c005
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
2021-03-18 23:01:45 +00:00
Emilio Cobos Álvarez
52e3823a9c
Bug 1699154 - Tweak focusring heuristics for script focus. r=edgar
...
What we implemented before this patch was basically what the heuristics
in the spec said, which used to be normative:
https://drafts.csswg.org/selectors/#the-focus-visible-pseudo
That has become non-normative and there's ongoing discussion on what
should happen for cases like this in:
https://github.com/w3c/csswg-drafts/issues/5885
https://github.com/web-platform-tests/wpt/pull/27806
There seems to be agreement on that WPT issue on cases like this one, so
let's make it work.
Differential Revision: https://phabricator.services.mozilla.com/D108805
2021-03-18 19:53:38 +00:00
smolnar
b2e94b592b
Backed out changeset 74ab7aa60b1a (bug 1699154) for causing reftest failures. CLOSED TREE
2021-03-18 18:39:44 +02:00
Emilio Cobos Álvarez
b892d58030
Bug 1699154 - Tweak focusring heuristics for script focus. r=edgar
...
What we implemented before this patch was basically what the heuristics
in the spec said, which used to be normative:
https://drafts.csswg.org/selectors/#the-focus-visible-pseudo
That has become non-normative and there's ongoing discussion on what
should happen for cases like this in:
https://github.com/w3c/csswg-drafts/issues/5885
https://github.com/web-platform-tests/wpt/pull/27806
There seems to be agreement on that WPT issue on cases like this one, so
let's make it work.
Differential Revision: https://phabricator.services.mozilla.com/D108805
2021-03-18 15:08:31 +00:00
smolnar
8b8afdb266
Backed out changeset 1c8b807651b8 (bug 1699154) for causing mochitest failures in test_focusrings.xhtml CLOSED TREE
2021-03-18 15:46:51 +02:00
Emilio Cobos Álvarez
1cad7af959
Bug 1699154 - Tweak focusring heuristics for script focus. r=edgar
...
What we implemented before this patch was basically what the heuristics
in the spec said, which used to be normative:
https://drafts.csswg.org/selectors/#the-focus-visible-pseudo
That has become non-normative and there's ongoing discussion on what
should happen for cases like this in:
https://github.com/w3c/csswg-drafts/issues/5885
https://github.com/web-platform-tests/wpt/pull/27806
There seems to be agreement on that WPT issue on cases like this one, so
let's make it work.
Differential Revision: https://phabricator.services.mozilla.com/D108805
2021-03-18 12:34:31 +00:00
Csoregi Natalia
b08ae4fb50
Backed out changeset ab94b17b8da3 (bug 1646561) for failures on browser_abort_visibility.js. CLOSED TREE
2021-03-16 20:33:34 +02:00
Steven MacLeod
46d2914958
Bug 1646561 - Stop using DocShell::GetVisibility in nsFocusManager. r=emilio,mconley
...
We stop checking for the tab state to be `STATE_LOADED` since it
messes up initial focus. Instead, we directly check if the tab
is warming, since that was the intention of this check, AFAICT.
See Bug 1397426 for where this was introduced.
Differential Revision: https://phabricator.services.mozilla.com/D108452
2021-03-16 15:36:55 +00:00
Emilio Cobos Álvarez
a89fa005e2
Bug 1697580 - Remove special case for offscreen browsers in nsFocusManager. r=smacleod,hsivonen
...
Offscreen browsers are no longer a thing.
We should just check whether the frame is focusable, which will check
visibility for us instead on relying on IsWindowVisible looking up the
docshell tree.
Depends on D107888
Differential Revision: https://phabricator.services.mozilla.com/D107889
2021-03-15 21:00:10 +00:00
Alexandru Michis
c3d50b35db
Backed out changeset e072b56f8518 (bug 1696908) for causing bc failures in browser_bug1303838.js
...
CLOSED TREE
2021-03-12 12:00:52 +02:00
Henri Sivonen
58b09235a5
Bug 1696908 - Ensure parent-managed order of setting the focused browsing context. r=nika
...
Differential Revision: https://phabricator.services.mozilla.com/D98134
2021-03-12 07:45:36 +00:00
Henri Sivonen
4a7c55c8ad
Bug 1691892 - Reject stale active browsing context setting attempts by action id in content processes. r=nika
...
Differential Revision: https://phabricator.services.mozilla.com/D107192
2021-03-10 05:36:48 +00:00
Edgar Chen
7ae2dc0d78
Bug 1677474 - Part 3: Trigger blur steps when window needs to adjust its focused element; r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D104538
2021-03-02 10:17:16 +00:00
Edgar Chen
10cc0a11f4
Bug 1677474 - Part 2: Refine AdjustWindowFocus IPC flow; r=hsivonen
...
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
2021-03-02 10:17:15 +00:00
Edgar Chen
87bdcc2a5c
Bug 1677474 - Part 1: Remove aCheckPermission parameter from AdjustWindowFocus IPC; r=hsivonen
...
As we always pass aCheckPermission as false over IPC.
Differential Revision: https://phabricator.services.mozilla.com/D105641
2021-03-02 10:17:15 +00:00
Henri Sivonen
9d6d02b341
Bug 1663931 - Avoid moving focus when changing iframe remoteness. r=nika,mccr8
...
Differential Revision: https://phabricator.services.mozilla.com/D99215
2021-02-22 10:51:51 +00:00
Emilio Cobos Álvarez
ba7c09d55d
Bug 1689155 - Don't necessarily show outlines on refocus. r=edgar
...
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
2021-02-15 19:08:42 +00:00
Emilio Cobos Álvarez
6e886fe86a
Bug 1689155 - Shuffle a bit the focus ring code again. r=edgar
...
No behavior change, just moving the decision of whether to show outlines
to slightly earlier.
Differential Revision: https://phabricator.services.mozilla.com/D104861
2021-02-15 19:08:42 +00:00