Commit Graph

3546 Commits

Author SHA1 Message Date
Masatoshi Kimura
3f402bfcc4 Bug 1683464 - Reduce nsContentPolicyType usage. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D100181
2021-01-07 15:18:52 +00:00
Razvan Maries
6a4eb25b10 Backed out 4 changesets (bug 1683464) for multiple perma failures. CLOSED TREE
Backed out changeset a5d315c017d0 (bug 1683464)
Backed out changeset 5f91001e4923 (bug 1683464)
Backed out changeset 1b7fe904e8af (bug 1683464)
Backed out changeset eb1c479fddca (bug 1683464)
2021-01-05 16:47:22 +02:00
Masatoshi Kimura
dfb97ca7cf Bug 1683464 - Reduce nsContentPolicyType usage. r=ckerschb
Depends on D100180

Differential Revision: https://phabricator.services.mozilla.com/D100181
2021-01-05 12:21:46 +00:00
Masatoshi Kimura
44274c030b Bug 1683464 - Remove aMimeTypeGuess from nsIContentSecurityPolicy::ShouldLoad. r=ckerschb
This parameter is unused.

Depends on D100178

Differential Revision: https://phabricator.services.mozilla.com/D100179
2021-01-04 17:05:01 +00:00
Masatoshi Kimura
60442b1dea Bug 1683464 - Make CSPDirective a CEnum type. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D100178
2021-01-04 17:01:31 +00:00
Masayuki Nakano
d876b20aaa Bug 1683226 - part 2: Make HTMLEmbedElement and HTMLObjectElement stop overriding nsIContent::GetDesiredIMEState() r=smaug
Currently, they are never focusable when its type is "plugin".
So, making stop them returning `IMEEnabled::Plugin` won't change
anything, but it guarantees that nobody will see `IMEEnabled::Plugin`
at runtime.  This is a preparation for the following patches.

Differential Revision: https://phabricator.services.mozilla.com/D100101
2020-12-21 05:52:26 +00:00
Sean Feng
12424aa6b0 Bug 1662265 - Fix input events handling for sync XHR when both TaskController and e10s are enabled r=smaug
There are two issues in our current setup

1) Input events which are occurring in the same tab are going to be lost
because sync XHR. We have event handling suppression for synx XHR, so input
events are going to be discarded.

2) Input events that are happening in another tab (same process as the
synx XHR tab) are not going to be delayed. This is not correct since
sync XHR should block the Javascript execution.

This patches fixes the above cases for when both TaskController and e10s are
enabled by suspending the InputTaskManager during sync XHR, which
delays the input event handling and keeps the events around.

Differential Revision: https://phabricator.services.mozilla.com/D90780
2020-12-15 01:33:24 +00:00
Emilio Cobos Álvarez
3987c781d0 Bug 1635914 - Move active flag handling explicitly to BrowsingContext. r=nika
And have it mirror in the parent process more automatically.

The docShellIsActive setter in the browser-custom-element side needs to
be there rather than in the usual DidSet() calls because the
AsyncTabSwitcher code relies on getting an exact amount of notifications
as response to that specific setter. Not pretty, but...

BrowserChild no longer sets IsActive() on the docshell itself for OOP
iframes. This fixes bug 1679521. PresShell activeness is used to
throttle rAF as well, which handles OOP iframes nicely as well.

Differential Revision: https://phabricator.services.mozilla.com/D96072
2020-12-11 15:43:19 +00:00
Simon Giesecke
5db2472bdf Bug 1673931 - Avoid including ReferrerPolicyBinding.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D97610
2020-12-10 11:09:29 +00:00
Emilio Cobos Álvarez
75be5de2e1 Bug 1666739 - Add an optional opacity threshold for visibility hit-test. r=mconley,miko
This is a best-effort thing of course, but so is the rest of the
visibility threshold stuff in practice and this should be good enough.

Differential Revision: https://phabricator.services.mozilla.com/D98360
2020-12-04 00:48:45 +00:00
Kagami Sascha Rosylight
296459ef20 Bug 1680167 - Part 9: Mark setFocus() as [can_run_script] r=masayuki
Depends on D98631

Differential Revision: https://phabricator.services.mozilla.com/D98632
2020-12-03 22:15:52 +00:00
Kagami Sascha Rosylight
00c44d3b04 Bug 1680167 - Part 4: MOZ_CAN_RUN_SCRIPT in dom/xul r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D98627
2020-12-03 22:08:44 +00:00
Razvan Maries
fd89df3f6d Backed out changeset 432c83951167 (bug 1662265) for perma failures on test_sync_xhr_event_handling_switch_bcg.html. CLOSED TREE 2020-12-03 23:03:05 +02:00
Sean Feng
f521450d39 Bug 1662265 - Fix input events handling for sync XHR when both TaskController and e10s are enabled r=smaug
There are two issues in our current setup

1) Input events which are occurring in the same tab are going to be lost
because sync XHR. We have event handling suppression for synx XHR, so input
events are going to be discarded.

2) Input events that are happening in another tab (same process as the
synx XHR tab) are not going to be delayed. This is not correct since
sync XHR should block the Javascript execution.

This patches fixes the above cases for when both TaskController and e10s are
enabled by suspending the InputTaskManager during sync XHR, which
delays the input event handling and keeps the events around.

Differential Revision: https://phabricator.services.mozilla.com/D90780
2020-12-03 03:13:04 +00:00
Emilio Cobos Álvarez
5f931a6c28 Bug 1680158 - Expose focused content browsing context to chrome code. r=hsivonen
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
2020-12-02 08:50:45 +00:00
Emilio Cobos Álvarez
0ebfee88c4 Bug 1676932 - Remove VisibilityChange/nsIContentPermissionRequestCallback. r=nika
Also unused.

Differential Revision: https://phabricator.services.mozilla.com/D96884
2020-11-13 20:55:17 +00:00
Emilio Cobos Álvarez
ab402ee088 Bug 1676932 - Remove nsIContentPermissionRequester. r=nika
It's an empty, useless interface after the previous patches. Also remove
a bunch of expired geolocation probes which were null-checking the requester
object for some reason.

Depends on D96882

Differential Revision: https://phabricator.services.mozilla.com/D96883
2020-11-12 20:23:52 +00:00
Emilio Cobos Álvarez
fa458d34ab Bug 1676932 - Remove nsIContentPermissionRequester.onVisibilityChange. r=nika
Also unused.

Depends on D96881

Differential Revision: https://phabricator.services.mozilla.com/D96882
2020-11-12 19:10:28 +00:00
Emilio Cobos Álvarez
1239692187 Bug 1676932 - Remove nsIContentPermissionRequester.getVisibility. r=nika
It's unused.

Differential Revision: https://phabricator.services.mozilla.com/D96881
2020-11-12 19:10:10 +00:00
Emilio Cobos Álvarez
4d7336a5cf Bug 1674078 - Remove nsIBrowserDOMWindow.OPEN_SWITCHTAB. r=edgar
Dead code is dead.

Differential Revision: https://phabricator.services.mozilla.com/D95122
2020-10-29 10:59:24 +00:00
Emilio Cobos Álvarez
e5a63697bf Bug 1673707 - Simplify handling of the suspendMediaWhenInactive flag. r=nika
Make it a synced field on the top browsing context. This handling the
propagation right and is much simpler.

This should fix cases where we don't look at the top level docshell to
figure out if we should suspend media.

Differential Revision: https://phabricator.services.mozilla.com/D94878
2020-10-27 19:55:47 +00:00
Ricky Stewart
02a7b4ebdf Bug 1654103: Standardize on Black for Python code in mozilla-central.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara
da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart
c0cea3b0fa Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca
1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart
50762dacab Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Agi Sferro
05cc37d7c1 Bug 1667471 - Expose IsCORSSafelistedRequestHeader in WindowUtils. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D91981
2020-10-15 00:43:19 +00:00
Razvan Maries
99ae18f920 Backed out 3 changesets (bug 1667471) for perma failures on NavigationDelegateTest. CLOSED TREE
Backed out changeset cfd11957a8a0 (bug 1667471)
Backed out changeset fdc015927934 (bug 1667471)
Backed out changeset ad8b66ec5171 (bug 1667471)
2020-10-15 01:53:02 +03:00
Agi Sferro
19fef5d6af Bug 1667471 - Expose IsCORSSafelistedRequestHeader in WindowUtils. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D91981
2020-10-14 22:14:12 +00:00
Kartikaya Gupta
9d6aa07b4f Bug 1669982 - Add a test. r=botond
Depends on D93494

Differential Revision: https://phabricator.services.mozilla.com/D93570
2020-10-14 20:59:35 +00:00
Razvan Maries
3a501e1025 Backed out 3 changesets (bug 1667471) for perma failures on NavigationDelegateTest. CLOSED TREE
Backed out changeset ab5779c59cca (bug 1667471)
Backed out changeset f7642b4cb27a (bug 1667471)
Backed out changeset 1453c6199311 (bug 1667471)
2020-10-15 00:02:42 +03:00
Agi Sferro
55236f8555 Bug 1667471 - Expose IsCORSSafelistedRequestHeader in WindowUtils. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D91981
2020-10-14 19:54:35 +00:00
Emilio Cobos Álvarez
ff1f98dfc8 Bug 1602915 - Remove nsIBrowserDOMWindow.isTabContentWindow. r=mossop,marionette-reviewers,whimboo
This only works for non-e10s and it also seems superseded by the
mPendingClose as per the comment.

Differential Revision: https://phabricator.services.mozilla.com/D92003
2020-10-13 16:58:37 +00:00
JulianWels
b88cf407ac Bug 1608074 - Set channel ReferrerInfo in privileged code instead of referrer header r=nchevobbe,mixedpuppy,valentin
Differential Revision: https://phabricator.services.mozilla.com/D59856
2020-10-13 12:27:26 +00:00
Mihai Alexandru Michis
55dd1dbe43 Backed out changeset b3fb1b5bbe34 (bug 1608074) for causing bustages in XMLHttpRequestMainThread.cpp
CLOSED TREE
2020-10-13 14:55:06 +03:00
JulianWels
2ae8134434 Bug 1608074 - Set channel ReferrerInfo in privileged code instead of referrer header r=nchevobbe,mixedpuppy,valentin
Differential Revision: https://phabricator.services.mozilla.com/D59856
2020-10-13 10:39:11 +00:00
Neil Deakin
af842b5083 Bug 1670134, remove message manager reference from LightweightThemeChild.jsm, by getting chromeOuterWindowId from BrowserChild instead, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D93043
2020-10-09 17:36:22 +00:00
Agi Sferro
6eabf70d45 Bug 1648157 - Add getter for windowUtils.desktopModeViewport. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D93006
2020-10-09 17:32:01 +00:00
Edgar Chen
27c71b7935 Bug 1667081 - Part 9: Remove SetFocusedWindowWithCallerType in nsIFocusManager; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D91346
2020-09-29 07:22:45 +00:00
Edgar Chen
5db823035c Bug 1667081 - Part 8: Remove parentActivated in nsIFocusManager; r=hsivonen
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
2020-09-29 07:22:32 +00:00
Edgar Chen
7bab46fd53 Bug 1667081 - Part 7: Remove focusPlugin in nsIFocusManager; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D91293
2020-09-29 07:22:25 +00:00
Edgar Chen
70ebd88a90 Bug 1667081 - Part 6: Remove fireDelayedEvents in nsIFocusManager; r=hsivonen
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
2020-09-29 07:22:12 +00:00
Edgar Chen
6c22b717c7 Bug 1667081 - Part 5: Remove windowHidden in nsIFocusManager; r=hsivonen
And make nsFocusManager::WindowHidden just returning void given all caller
doesn't actaully check the return value.

Differential Revision: https://phabricator.services.mozilla.com/D91291
2020-09-29 07:21:59 +00:00
Edgar Chen
e83ae66fc1 Bug 1667081 - Part 4: Remove windowShown in nsIFocusManager; r=hsivonen
And make nsFocusManager::WindowShown just returning void given all caller
doesn't actaully check the return value.

Differential Revision: https://phabricator.services.mozilla.com/D91290
2020-09-29 07:21:47 +00:00
Edgar Chen
2a18e0fc77 Bug 1667081 - Part 3: Remove windowLowered in nsIFocusManager; r=hsivonen
And make nsFocusManager::WindowLowered just returning void given all caller
doesn't actaully check the return value.

Differential Revision: https://phabricator.services.mozilla.com/D91289
2020-09-29 07:21:34 +00:00
Edgar Chen
6bf9a2e159 Bug 1667081 - Part 2: Remove windowRaised in nsIFocusManager; r=hsivonen
And make nsFocusManager::WindowRaised just returning void given all caller
doesn't actaully check the return value.

Differential Revision: https://phabricator.services.mozilla.com/D91288
2020-09-29 07:21:22 +00:00
Bogdan Tara
8f6c53bdf5 Backed out 9 changesets (bug 1667081) for assertion failure on nsFocusManager CLOSED TREE
Backed out changeset 156ab3eba505 (bug 1667081)
Backed out changeset 2e37f347082c (bug 1667081)
Backed out changeset 8f59cef879ae (bug 1667081)
Backed out changeset 1298ff140218 (bug 1667081)
Backed out changeset 91342c822425 (bug 1667081)
Backed out changeset aafb1878c590 (bug 1667081)
Backed out changeset 2252e975f0d7 (bug 1667081)
Backed out changeset c3bac5f407d2 (bug 1667081)
Backed out changeset b1e6e81396ae (bug 1667081)
2020-09-28 20:02:52 +03:00
Edgar Chen
34b033f00c Bug 1667081 - Part 9: Remove SetFocusedWindowWithCallerType in nsIFocusManager; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D91346
2020-09-28 14:05:53 +00:00
Edgar Chen
d2446c5649 Bug 1667081 - Part 8: Remove parentActivated in nsIFocusManager; r=hsivonen
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
2020-09-28 14:05:40 +00:00
Edgar Chen
9afea6d181 Bug 1667081 - Part 7: Remove focusPlugin in nsIFocusManager; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D91293
2020-09-28 14:05:28 +00:00