Commit Graph

680 Commits

Author SHA1 Message Date
Andi-Bogdan Postelnicu
45c2f471e5 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
2c5182f635 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
61edd2f79b 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
7ceb0880e3 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
1c90d06c4f 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
4e25a50561 Backed out changeset a385ad897612 (bug 1681983) for causing reftest failures. CLOSED TREE 2021-06-03 17:48:07 +03:00
Henri Sivonen
fe63bacaf8 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
45111f3e2d 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
71a286281a 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
13476ca805 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
4e10c8288d 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
b195fe1588 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
6a12e24fce 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
f8ac2c96d4 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
1bb16b15ba 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
3b9d17fe2a 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
0821a39ff2 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
e88e3fd18c 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
f33c9a8dff 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
8dc72d14d6 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
1f6903243b 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
be47c3f4bc 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
c1ab4757eb 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
d5afa22261 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
6e21b1891b 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
d268bb213d 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
0e811b2371 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
725c2acd2f 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
fc1cdbbda4 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
651e3d34ea 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
dd869c5378 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
07e9744706 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
ce2b7f509a 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
6b4219af67 Backed out changeset 74ab7aa60b1a (bug 1699154) for causing reftest failures. CLOSED TREE 2021-03-18 18:39:44 +02:00
Emilio Cobos Álvarez
bd2d67da06 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
8a66401dd4 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
6e69a23e46 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
b167ea2ca3 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
42f60aa4ee 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
985ce7e5c4 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
5255b04bb5 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
593a7ac4f7 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
b4617017c6 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
b57d088547 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
7d43df39cd 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
d7dbc1ce44 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
a6c09e7b0c 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
6225dd4a20 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
5743ed8b82 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
Mihai Alexandru Michis
989e70c820 Backed out 2 changesets (bug 1689155) for causing bc failures in browser_outline_refocus.js
CLOSED TREE

Backed out changeset bf4ed0fa612b (bug 1689155)
Backed out changeset 78a47c967db3 (bug 1689155)
2021-02-15 19:40:05 +02:00