Commit Graph

7866 Commits

Author SHA1 Message Date
Edgar Chen
0916876268 Bug 1690747 - Should also check blur is allowed in BrowsingContext::Blur(); r=hsivonen
When binding delegates blur() to BrowsingContext::Blur, the remote side skips
the check given that there is no js on the stack, but we should not skip the
check. This only affects design-mode which allows the focus moving to the root
element.

Differential Revision: https://phabricator.services.mozilla.com/D104008
2021-02-09 14:56:56 +00:00
Emilio Cobos Álvarez
d871818995 Bug 1691214 - Take focus from window.open etc even if we're already active but not in the active window. r=hsivonen
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
2021-02-09 13:03:32 +00:00
Andreea Pavel
c546ab6198 Backed out changeset ebb61065ad47 (bug 1690747) for failing mochitests at test_focus_design_mode.html on a CLOSED TREE 2021-02-09 15:11:05 +02:00
Edgar Chen
486af881a2 Bug 1690747 - Should also check blur is allowed in BrowsingContext::Blur(); r=hsivonen
When binding delegates blur() to BrowsingContext::Blur, the remote side skips
the check given that there is no js on the stack, but we should not skip the
check. This only affects design-mode which allows the focus moving to the root
element.

Differential Revision: https://phabricator.services.mozilla.com/D104008
2021-02-09 12:18:15 +00:00
Yura Zenevich
c72349ac1a Bug 1689445 - revert EventUtils.sendMouseEvent back to being sync. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D104127
2021-02-09 01:30:08 +00:00
Kershaw Chang
22a60154b9 Bug 1685942 - Only fallback to original conn info when network error happens r=necko-reviewers,valentin,dragana
Differential Revision: https://phabricator.services.mozilla.com/D102703
2021-02-08 11:46:51 +00:00
smolnar
1b7149f584 Backed out changeset d807fa812d8f (bug 1691214) for causing failures in browser_bug1691214. CLOSED TREE 2021-02-08 13:24:16 +02:00
Emilio Cobos Álvarez
2480eacb0b Bug 1691214 - Take focus from window.open etc even if we're already active. r=hsivonen
With multiple windows, being active doesn't guarantee being in the
foreground window.

Differential Revision: https://phabricator.services.mozilla.com/D104326
2021-02-08 08:01:49 +00:00
Mihai Alexandru Michis
6da97a654e Backed out 2 changesets (bug 1689445) for causing bc failures in browser_search.js
Backed out changeset 2b1ec882c4c1 (bug 1689445)
Backed out changeset bcb4ba398ee0 (bug 1689445)
2021-02-06 05:33:02 +02:00
Yura Zenevich
d3beb62c1d Bug 1689445 - revert EventUtils.sendMouseEvent back to being sync. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D104127
2021-02-05 21:26:54 +00:00
Nika Layzell
91f9c9c927 Bug 1681529 - Part 1: Add a test for reloading a page with a large postdata payload, r=peterv
Without the other patches in this series, this test fails with both with and
without Fission enabled, for two different reasons.

With Fission disabled, the second reload request appears as empty, due to us
being unable to rewind the postData nsIInputStream. With Fission enabled, the
second reload request causes crashes due to the nsMIMEInputStream's invariant of
requiring a seekable stream is invalidated, causing the nsICloneableInputStream
implementation to misbehave.

Differential Revision: https://phabricator.services.mozilla.com/D101800
2021-02-04 18:12:52 +00:00
Anny Gakhokidze
ada178047e Bug 1690696 - Change test_bug660404.html to use BroadcastChannel, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103963
2021-02-04 18:01:26 +00:00
Emilio Cobos Álvarez
a48bca7a4d Bug 1655967 - Clean up touch events override code. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D103756
2021-02-04 06:16:25 +00:00
Anny Gakhokidze
ffa59b72d4 Bug 1690628 - Change test_bug1121701.html to use BroadcastChannel, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103936
2021-02-03 23:29:28 +00:00
Luca Greco
e1d14d5183 Bug 1525179 - Use aboutaddons.html at the root of about:addons. r=robwu
- Moved aboutaddons.html at the root of the about:addons page
- renamed aboutaddons.js `initialize` global function to `initializeView` (and renamed `show` and `hide` global functions accordingly)
- Simplify initial load logic a bit more:
  - remove gCategories
  - moved responsability of the CategoriesBox initialization to the `initializationView` function
  - replaced initialization logic based on `gPendingInitializations` and `notifyInitialized` with
    a `promiseInitialized` global resolved when `initializeView` method has been called and its return value resolved
- Fix test helpers and test failures
  - InlineOptionsBrowser: take into account that browser-custom-element does opt-in the delayedConnectedCallback behavior
    and browser.loadURI may throw if called while the document is still loading.

Differential Revision: https://phabricator.services.mozilla.com/D96472
2021-02-03 17:08:14 +00:00
Emilio Cobos Álvarez
bfe77f303a Bug 1591120 - Move print and color-scheme simulation to browsingContext. r=ochameau,nika,devtools-backward-compat-reviewers
We keep mMedium in nsPresContext rather than just looking it up in the
browsing context because that's used quite more frequently.

Differential Revision: https://phabricator.services.mozilla.com/D103782
2021-02-03 10:38:09 +00:00
Emilio Cobos Álvarez
635e3580e3 Bug 1655967 - Move serviceWorkersTestingEnabled to BrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D103757
2021-02-03 10:38:43 +00:00
Bogdan Tara
abc7c8eeee Backed out 11 changesets (bug 1681529) for talos crashes CLOSED TREE
Backed out changeset c87d0f32d7a6 (bug 1681529)
Backed out changeset b1269f35d525 (bug 1681529)
Backed out changeset 29df8d4c984a (bug 1681529)
Backed out changeset 4def7578ced0 (bug 1681529)
Backed out changeset ce57c5a26c25 (bug 1681529)
Backed out changeset 78b186ec645a (bug 1681529)
Backed out changeset b1d1550a66ca (bug 1681529)
Backed out changeset e8620622208a (bug 1681529)
Backed out changeset 636b1a7c13e4 (bug 1681529)
Backed out changeset a5a8eac68b87 (bug 1681529)
Backed out changeset 968e17db71df (bug 1681529)
2021-02-03 09:29:38 +02:00
Olli Pettay
affb60b285 Bug 1683751 - Removing iframes should update history.length r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D100274
2021-02-03 00:02:29 +00:00
Nika Layzell
b227119f4b Bug 1681529 - Part 1: Add a test for reloading a page with a large postdata payload, r=peterv
Without the other patches in this series, this test fails with both with and
without Fission enabled, for two different reasons.

With Fission disabled, the second reload request appears as empty, due to us
being unable to rewind the postData nsIInputStream. With Fission enabled, the
second reload request causes crashes due to the nsMIMEInputStream's invariant of
requiring a seekable stream is invalidated, causing the nsICloneableInputStream
implementation to misbehave.

Differential Revision: https://phabricator.services.mozilla.com/D101800
2021-02-02 23:26:16 +00:00
Kris Maglione
8ec2442bf5 Bug 1647519: Reject javascript: requests targeting other content processes. r=nika
Loads targeting cross-process BrowsingContexts are by definition cross-origin,
which should preclude any javascript: loads. While those loads are currently
prevented by principal checks in the final target process, sending IPC
messages for the attempts is unnecessary, and potentially opens a door to
privilege escalation exploits by a compromised content process.

This patch prevents any cross-process load requests from being sent by content
processes, and adds checks in the parent process to kill any (potentially
compromised) content process which attempts to send them.

Differential Revision: https://phabricator.services.mozilla.com/D103529
2021-02-02 22:24:47 +00:00
Brindusan Cristian
e87cc6c9b1 Backed out changeset e4cefba9f87e (bug 1647519) for build bustages in BrowsingContext.cpp. CLOSED TREE 2021-02-03 00:08:53 +02:00
Kris Maglione
dc41c70e24 Bug 1647519: Reject javascript: requests targeting other content processes. r=nika
Loads targeting cross-process BrowsingContexts are by definition cross-origin,
which should preclude any javascript: loads. While those loads are currently
prevented by principal checks in the final target process, sending IPC
messages for the attempts is unnecessary, and potentially opens a door to
privilege escalation exploits by a compromised content process.

This patch prevents any cross-process load requests from being sent by content
processes, and adds checks in the parent process to kill any (potentially
compromised) content process which attempts to send them.

Differential Revision: https://phabricator.services.mozilla.com/D103529
2021-02-02 21:46:53 +00:00
Mihai Alexandru Michis
f2070ec731 Backed out changeset c0ecccf36d56 (bug 1647519) for causing bustages in BrowsingContext.cpp
CLOSED TREE
2021-02-02 22:47:01 +02:00
Kris Maglione
e2e8e3c012 Bug 1647519: Reject javascript: requests targeting other content processes. r=nika
Loads targeting cross-process BrowsingContexts are by definition cross-origin,
which should preclude any javascript: loads. While those loads are currently
prevented by principal checks in the final target process, sending IPC
messages for the attempts is unnecessary, and potentially opens a door to
privilege escalation exploits by a compromised content process.

This patch prevents any cross-process load requests from being sent by content
processes, and adds checks in the parent process to kill any (potentially
compromised) content process which attempts to send them.

Differential Revision: https://phabricator.services.mozilla.com/D103529
2021-02-02 20:32:04 +00:00
Brindusan Cristian
1f923f4895 Backed out changeset 0395717ea76d (bug 1647519) for build bustages at BrowsingContext.cpp. CLOSED TREE 2021-02-02 22:07:10 +02:00
Brindusan Cristian
cbdb020883 Backed out 11 changesets (bug 1681529) for mochitest failures at test_reload_large_postdata.html. CLOSED TREE
Backed out changeset f1f988155c82 (bug 1681529)
Backed out changeset f0ba367de05e (bug 1681529)
Backed out changeset dbea9952ec79 (bug 1681529)
Backed out changeset 6e185ec2c4a4 (bug 1681529)
Backed out changeset d0b11c08666a (bug 1681529)
Backed out changeset f2515096b378 (bug 1681529)
Backed out changeset ecd8c3b8fdb4 (bug 1681529)
Backed out changeset 7ea2e9cc8bad (bug 1681529)
Backed out changeset dbc85d0bffaf (bug 1681529)
Backed out changeset f0893f544219 (bug 1681529)
Backed out changeset 91979e21aa8e (bug 1681529)
2021-02-02 22:02:59 +02:00
Kris Maglione
403125cd23 Bug 1647519: Reject javascript: requests targeting other content processes. r=nika
Loads targeting cross-process BrowsingContexts are by definition cross-origin,
which should preclude any javascript: loads. While those loads are currently
prevented by principal checks in the final target process, sending IPC
messages for the attempts is unnecessary, and potentially opens a door to
privilege escalation exploits by a compromised content process.

This patch prevents any cross-process load requests from being sent by content
processes, and adds checks in the parent process to kill any (potentially
compromised) content process which attempts to send them.

Differential Revision: https://phabricator.services.mozilla.com/D103529
2021-02-02 19:47:12 +00:00
Kris Maglione
2d56612fcb Bug 1685106: Add some missing IsInProcess() checks to nsDocShell. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D103566
2021-02-01 22:09:01 +00:00
Nika Layzell
b3fac57b0f Bug 1681529 - Part 1: Add a test for reloading a page with a large postdata payload, r=peterv
Without the other patches in this series, this test fails with both with and
without Fission enabled, for two different reasons.

With Fission disabled, the second reload request appears as empty, due to us
being unable to rewind the postData nsIInputStream. With Fission enabled, the
second reload request causes crashes due to the nsMIMEInputStream's invariant of
requiring a seekable stream is invalidated, causing the nsICloneableInputStream
implementation to misbehave.

Differential Revision: https://phabricator.services.mozilla.com/D101800
2021-01-28 19:40:22 +00:00
Emilio Cobos Álvarez
0778166734 Bug 1690099 - Move focus for window.open() on a targeted tab. r=hsivonen
That doesn't go through BrowsingContext::InternalLoad. This matches the
behavior of clicking links and the behavior of other browsers.

Differential Revision: https://phabricator.services.mozilla.com/D103720
2021-02-02 14:33:48 +00:00
Gijs Kruitbosch
7f3e59e909 Bug 1689598 r=tkikuchi,mhowell,dmajor,valentin
Differential Revision: https://phabricator.services.mozilla.com/D103523
2021-02-02 12:36:56 +00:00
Gijs Kruitbosch
1f7304567e Bug 1643789 - fix use of alternate URI fixup for middle clicks, context menu clicks, etc., r=nika
Differential Revision: https://phabricator.services.mozilla.com/D103410
2021-02-02 00:27:42 +00:00
Randell Jesup
013e325e7d Bug 1673617 - Refactor how session restore works with SHIP, r=nika
With mods from kashav's last Try run

Differential Revision: https://phabricator.services.mozilla.com/D99461
2021-02-01 22:57:14 +00:00
Andreea Pavel
dd3abe2b67 Bug 1607713 - disable browser_backforward_userinteraction.js on linux64 opt to reduce failure rate r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D103541
2021-02-01 19:10:37 +00:00
Emilio Cobos Álvarez
cb38bec4d1 Bug 1689853 - Fake a user interaction when handling LOAD_FLAGS_ALLOW_POPUPS. r=edgar
I'll simplify all the popup-blocking setup in a follow-up, but this is
the low-risk change.

Need to add a test for this of course. Kinda baffled we did not have
any.

Differential Revision: https://phabricator.services.mozilla.com/D103571
2021-02-01 14:17:55 +00:00
dluca
dd05c52966 Backed out 2 changesets (bug 1689853) for Browser-chrome crash in [@ mozilla::(anonymous namespace)::RunWatchdog(void*)]. CLOSED TREE
Backed out changeset f37f0997d677 (bug 1689853)
Backed out changeset 16c796643d52 (bug 1689853)
2021-02-01 15:18:08 +02:00
Emilio Cobos Álvarez
36bf950113 Bug 1689853 - Fake a user interaction when handling LOAD_FLAGS_ALLOW_POPUPS. r=edgar
I'll simplify all the popup-blocking setup in a follow-up, but this is
the low-risk change.

Need to add a test for this of course. Kinda baffled we did not have
any.

Differential Revision: https://phabricator.services.mozilla.com/D103571
2021-02-01 10:15:15 +00:00
Nika Layzell
b9efbca10c Bug 1687805 - Part 3: Support submitting form data with noopener enabled, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D103361
2021-01-29 22:15:46 +00:00
Nika Layzell
8c7b06dc23 Bug 1687805 - Part 2: Don't use OpenNoNavigate if noopener is force-enabled, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D103360
2021-01-29 22:15:44 +00:00
Nika Layzell
bbaf7fbc65 Bug 1682285 - Part 2: Track LOAD_FLAGS_FROM_EXTERNAL separately from LOAD_TYPE, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D103365
2021-01-29 22:06:36 +00:00
Nika Layzell
29c2d4d113 Bug 1682285 - Part 1: Split internal and external load flags, r=kmag,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D103364
2021-01-29 22:06:16 +00:00
Kris Maglione
f440a0cc36 Bug 1685801: Part 2 - Move site origin telemetry to separate module. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D101482
2021-01-28 20:58:26 +00:00
Mihai Alexandru Michis
040e2ea5d0 Backed out 12 changesets (bug 1685801) for causing bc failures in browser_ctrlTab.js
CLOSED TREE

Backed out changeset 021924b62f13 (bug 1685801)
Backed out changeset 38cc10101c1f (bug 1685801)
Backed out changeset 9ab9574ac72a (bug 1685801)
Backed out changeset 1a7f259cc2ec (bug 1685801)
Backed out changeset b267b19a7f6e (bug 1685801)
Backed out changeset 7dfcf0257487 (bug 1685801)
Backed out changeset ee0d0169b079 (bug 1685801)
Backed out changeset 0c358ee51951 (bug 1685801)
Backed out changeset 338ab91af557 (bug 1685801)
Backed out changeset a49415007aaf (bug 1685801)
Backed out changeset b91098299143 (bug 1685801)
Backed out changeset edf6209861a8 (bug 1685801)
2021-01-28 22:55:11 +02:00
Kris Maglione
59963809cd Bug 1685801: Part 2 - Move site origin telemetry to separate module. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D101482
2021-01-28 18:48:25 +00:00
Kris Maglione
882bdac7b8 Bug 1688715: Rename BrowsingContext::CheckOnlyOwningProcessCanSet to LegacyCheckOnlyOwningProcessCanSet. r=nika
It is inherently buggy and should not be used in new code.

Differential Revision: https://phabricator.services.mozilla.com/D102960
2021-01-28 03:31:50 +00:00
Henri Sivonen
0ddb192035 Bug 1688368 - Check mFeedChardet before feeding the detector. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D102905
2021-01-27 10:36:39 +00:00
Steven MacLeod
3869c69e78 Bug 1677774 - Relax CanSet for TouchEventsOverrideInternal. r=nika
As a temporary fix to prevent crashes we are loosening the `CanSet`
restrictions for TouchEventsOverrideInternal. In the future this will
be fixed properly by changing DevTools to set this property from the
parent only, at which time tighter restrictions on setting
`TouchEventsOverrideInternal` may be added.

Differential Revision: https://phabricator.services.mozilla.com/D103080
2021-01-26 20:38:20 +00:00
Peter Van der Beken
8853d16553 Bug 1674464 - Stop adding entries for about:tabcrashed when SHIP is enabled. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D96383
2021-01-26 12:41:22 +00:00
Magnus Melin
e4574c7ab0 Bug 1524836 - Move new HTML about:config page from browser to toolkit. r=fluent-reviewers,preferences-reviewers,geckoview-reviewers,Gijs,agi
Unbitrot and change strategy for geckoview: now map about:config directly in nsAboutRecirector.cpp

Differential Revision: https://phabricator.services.mozilla.com/D25938
2021-01-26 00:27:56 +00:00