Commit Graph

6943 Commits

Author SHA1 Message Date
David Teller
985b3f945a Bug 1632794 - Bare bones about:processes;r=fluent-reviewers,florian,Pike
This is a very first iteration of about:processes, so that people who actually need the tool can start using it immediately and provide feedback.

Differential Revision: https://phabricator.services.mozilla.com/D72617
2020-05-05 22:19:44 +00:00
Narcis Beleuzu
d262ef72aa Backed out changeset 9da3ff68132f (bug 1632160) for bc failures on browser_bug1045809.js . CLOSED TREE 2020-05-06 12:12:59 +03:00
Christoph Kerschbaumer
3bf440d570 Bug 1632160: Remove GetAllowMixedContentAndConnectionData from nsIDocShell and expose similar functionality on BrowsingContext. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D72901
2020-05-06 07:15:40 +00:00
Ian Moody
011b59d595 Bug 1536556 - Replace raw thrown Cr.ERRORs with Components.Exception. r=mossop,remote-protocol-reviewers,marionette-reviewers,whimboo,necko-reviewers,geckoview-reviewers,valentin,agi
Raw Cr.ERROR don't get stack information, same as throwing JS literals instead
of `new Error()`s.

This was done automatically with a new eslint rule that will be introduced in
the next commit.  One instance of a raw Cr.ERROR was not replaced since it is
used in a test that specifically checks the preservation of raw Cr values in
XPCJS.  The rule will be disabled for that instance.

Differential Revision: https://phabricator.services.mozilla.com/D28073
2020-05-05 17:41:36 +00:00
Razvan Maries
0c308b94ae Backed out 2 changesets (bug 1632794) for build bustages on aboutProcesses.ftl. CLOSED TREE
Backed out changeset e616abcb192d (bug 1632794)
Backed out changeset 47701348412d (bug 1632794)
2020-05-05 19:21:24 +03:00
David Teller
e6eea81b34 Bug 1632794 - Bare bones about:processes;r=fluent-reviewers,florian,Pike
This is a very first iteration of about:processes, so that people who actually need the tool can start using it immediately and provide feedback.

Differential Revision: https://phabricator.services.mozilla.com/D72617
2020-05-05 15:56:18 +00:00
Emilio Cobos Álvarez
761e9dfe4c Bug 1635094 - Cleanup the ReferrerInfo code. r=ckerschb
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.

Anyhow, always require an element, and add two convenience constructors
for C++ code.

Differential Revision: https://phabricator.services.mozilla.com/D73636
2020-05-04 18:50:20 +00:00
Cosmin Sabou
71a40eae48 Backed out 2 changesets (bug 1635094) for build bustages on nsMacShellService.cpp. CLOSED TREE
Backed out changeset 0a2b0c6ea19a (bug 1635094)
Backed out changeset ead4f26f76ee (bug 1635094)
2020-05-04 20:04:06 +03:00
Emilio Cobos Álvarez
6dde680742 Bug 1635094 - Cleanup the ReferrerInfo code. r=ckerschb
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.

Anyhow, always require an element, and add two convenience constructors
for C++ code.

Differential Revision: https://phabricator.services.mozilla.com/D73636
2020-05-04 16:26:51 +00:00
Jonathan Watt
4def60efaf Bug 1634370. Make docshell/ buildable outside of unified-build environment. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D73255
2020-05-04 14:53:34 +00:00
Nika Layzell
573962fe33 Bug 1634764 - Add helpers for Top/Parent WindowContext, r=farre
There are various times when it would be useful to get the toplevel or parent
WindowContext from a window or browsing context. While this is already possible,
it's currently somewhat inconvenient.

Differential Revision: https://phabricator.services.mozilla.com/D73500
2020-05-04 14:26:34 +00:00
stundets
10f080ebe4 Bug 1629424 - remove useless return. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D73534
2020-05-04 11:00:00 +00:00
Christoph Kerschbaumer
3262e01355 Bug 1634270: Fix rebase error from Bug 1623565 affecting MixedContentBlocker. r=kamidphish
Differential Revision: https://phabricator.services.mozilla.com/D73196
2020-05-03 03:26:00 +00:00
Nika Layzell
a0d1066c47 Bug 1633723 - Add CanonicalBrowsingContext::GetParentCrossChromeBoundary, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D73337
2020-04-30 19:48:04 +00:00
Matt Woodrow
3c9a252e29 Bug 1634339 - Don't crash if we didn't get passed an existing DOMNavigationTiming. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D73403
2020-05-01 02:36:33 +00:00
Emilio Cobos Álvarez
164acdc0b9 Bug 1634218 - Remove the zoom actors. r=nika
After the recent simplifications to the zoom code, they only take care
of forwarding the enlarge / decrease zoom messages.

We can do that via PBrowser instead, and get rid of the actors. We can
also remove ZoomChangeUsingMouseWheel. Zooming with the mouse wheel will
end up in a *ZoomChange event anyways, and the only consumer already
listened for them.

Differential Revision: https://phabricator.services.mozilla.com/D73175
2020-04-30 16:35:35 +00:00
Christoph Kerschbaumer
7a530a9a70 Bug 1634289: Add CanSet method for browsing context field IsSecure. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D73214
2020-04-30 09:56:25 +00:00
Emilio Cobos Álvarez
e0c490b2cd Bug 1633488 - Fire zoom change events directly in the parent process instead of roundabouting through the child process. r=nika
This ensures that chrome code can always react to the state the browsing
context the parent process observes properly. It's also simpler.

We fix one test that was relying on the event being fired at the
browser. For the same reason as the previous patch in this bug, we can
use resize events instead.

Differential Revision: https://phabricator.services.mozilla.com/D72712
2020-04-30 01:21:20 +00:00
Emilio Cobos Álvarez
9a9ab94bc2 Bug 1578008 - Remove various hacks to restore resolution only after a full zoom change. r=bradwerth
This is no longer needed now that MVM doesn't restore the zoom.

Differential Revision: https://phabricator.services.mozilla.com/D72551
2020-04-30 01:21:26 +00:00
Dorel Luca
8e7e7136a3 Backed out 4 changesets (bug 1633938, bug 1578008, bug 1633488) for Devtool failures in browser/base/content/test/static/browser_parsable_css.js. CLOSED TREE
Backed out changeset e690c4cf8848 (bug 1633938)
Backed out changeset c999ecad3be8 (bug 1633488)
Backed out changeset abbc47ce1451 (bug 1578008)
Backed out changeset 9e6925ea790f (bug 1578008)
2020-04-30 04:13:42 +03:00
Gijs Kruitbosch
7073bb6903 Bug 1634075 - back out changeset 0aa77ee04caa (bug 1583696) over regressions with overly long non-wrapping prompt text and visual appearance with lightweight themes, r=MattN
Things that were broken:

- prompts become unreadable when using dark-background lwthemes, because they
  keep the window text-shadow (due to the namespace change of tabmodalprompt)
- prompts with long text without word-wrap possibilities
  (e.g. `alert("x".repeat(1000))`) cause the text to escape its container.

Differential Revision: https://phabricator.services.mozilla.com/D73131
2020-04-29 20:30:37 +00:00
Emilio Cobos Álvarez
f071fe4b8e Bug 1633488 - Fire zoom change events directly in the parent process instead of roundabouting through the child process. r=nika
This ensures that chrome code can always react to the state the browsing
context the parent process observes properly. It's also simpler.

We fix one test that was relying on the event being fired at the
browser. For the same reason as the previous patch in this bug, we can
use resize events instead.

Differential Revision: https://phabricator.services.mozilla.com/D72712
2020-04-29 21:44:13 +00:00
Emilio Cobos Álvarez
0169492da2 Bug 1578008 - Remove various hacks to restore resolution only after a full zoom change. r=bradwerth
This is no longer needed now that MVM doesn't restore the zoom.

Differential Revision: https://phabricator.services.mozilla.com/D72551
2020-04-29 21:44:01 +00:00
Nika Layzell
5325da14b7 Bug 1633204 - Live WindowContexts should keep BrowsingContextGroup alive, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D72893
2020-04-29 18:49:10 +00:00
Dimi Lee
f0e37815cd Bug 1612376 - P5. Remove HasStoragePermission from WindowContext r=timhuang,baku
We don't access HasStoragePermission across process, so we don't need to
store the permission in WindowContext.

After this patch, HasStoragePermission will only be stored in the
channel's LoadInfo, which is set when a channel is created in the parent
and it won't be updated.

Depends on D71985

Differential Revision: https://phabricator.services.mozilla.com/D72305
2020-04-29 14:48:39 +00:00
Mike Conley
6b7012c4b1 Bug 1630234 - Manually persist layout history state when process flipping. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D72399
2020-04-29 13:38:47 +00:00
Christoph Kerschbaumer
af3bb17589 Bug 1575356: Update Mixed Content Blocker to rely on BrowsingContext instead of nsIDocShellTreeItem. r=baku,smaug
Differential Revision: https://phabricator.services.mozilla.com/D71547
2020-04-28 13:08:57 +00:00
Csoregi Natalia
879ef8e0a4 Backed out changeset f4a75756b1b4 (bug 1575356) for failures on test_iframe_referrer_invalid.html. CLOSED TREE 2020-04-28 12:23:22 +03:00
Christoph Kerschbaumer
59c7891e26 Bug 1575356: Update Mixed Content Blocker to rely on BrowsingContext instead of nsIDocShellTreeItem. r=baku,smaug
Differential Revision: https://phabricator.services.mozilla.com/D71547
2020-04-28 07:32:51 +00:00
Csoregi Natalia
0185f41854 Backed out changeset 14568f3c84b6 (bug 1575356) for failures on test_iframe_referrer.html. CLOSED TREE 2020-04-28 10:01:30 +03:00
Christoph Kerschbaumer
73c3fa2f74 Bug 1575356: Update Mixed Content Blocker to rely on BrowsingContext instead of nsIDocShellTreeItem. r=baku,smaug
Differential Revision: https://phabricator.services.mozilla.com/D71547
2020-04-28 05:18:28 +00:00
Jean-Yves Avenard
071771cdc7 Bug 1633319 - Wait for load before resolving promise. r=Gijs,zombie
Differential Revision: https://phabricator.services.mozilla.com/D72593
2020-04-27 22:42:25 +00:00
Steven MacLeod
e34761f02e Bug 1597413 - fix locking screen orientation to be fission compatible. r=farre
Both the deprecated `Screen.lockOrientation` and replacement
`ScreenOrientation.lock` APIs have been updated to make use of a new
`OrientationLock` field on the `BrowsingContext`. This replaces the
storage and use of APIs for this on the root docshell.

In the non fission case things should behave the same, as pending
promises for previous calls to `Screen.lockOrientation` will still be
cancelled in process. If there are `BrowsingContext`s in other
processes though, IPC will be sent to the parent, and then each other
child to cancel them. This should be spec compliant as the spec is
already racy with regards to multiple `lockOrientation` calls.

This new implementation has a little extra IPC than the optimal
implementation would since the root `BrowsingContext`s
`OrientationLock` is set using the normal `SyncedContext` machinery,
rather than combining the `AbortOtherOrientationPendingPromises`
message for a single message.

This commit fixes both Bug 1597413 and Bug 1597443.

Differential Revision: https://phabricator.services.mozilla.com/D70416
2020-04-27 15:43:36 +00:00
Andrew McCreight
6bc3c0572e Bug 1632338 - Allow remote window proxies before SetNewDocument. r=peterv
In BrowsingContext::SetDocShell(), we indicate that any remote outer window
proxies need to be cleaned up, if we've transitioned from a remote window
proxy to a local one. However, we don't actually do the cleanup until
nsGlobalWindowOuter::SetNewDocument(), so don't assert if we find remote
window proxies when we're in between these two periods.

Also includes a formatting fix by clang-format.

Differential Revision: https://phabricator.services.mozilla.com/D72251
2020-04-27 15:22:53 +00:00
Dan Glastonbury
f2d5afd779 Bug 1623565 - P4: Make browser.cache.check_doc_frequency a StaticPref. r=nika
Due to the refactored code,
browser/base/content/test/performance/browser_preferences_usage.js started
reporting more accesses to browser.cache.check_doc_frequency preference.

Differential Revision: https://phabricator.services.mozilla.com/D68319
2020-04-27 05:38:22 +00:00
Dan Glastonbury
6ffa81c157 Bug 1623565 - P3: Remove mLoadFlags from DocumentChannelCreationArgs. r=mattwoodrow,jya
Differential Revision: https://phabricator.services.mozilla.com/D67799
2020-04-27 05:38:15 +00:00
Dan Glastonbury
0d4af00c6b Bug 1623565 - P2: Refactor document channel load flags computation. r=nika,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D67797
2020-04-27 05:38:07 +00:00
Dan Glastonbury
a48830f2b3 Bug 1623565 - P1: Move defaultLoadFlags to BrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D67796
2020-04-27 05:37:59 +00:00
Andreas Farre
6adf2b375d Bug 1576188 - Handle save-as for cross process iframes. r=peterv
Depends on D70388

Differential Revision: https://phabricator.services.mozilla.com/D70389
2020-04-27 05:41:40 +00:00
Matt Woodrow
c130a82806 Bug 1602318 - Disable parent-initiated loads when using devtools. r=nika,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D71136
2020-04-26 00:55:12 +00:00
Matt Woodrow
a34398fd9f Bug 1602318 - Initiate document loads in the parent process in parallel with setting up the content process side. r=nika,jya
Differential Revision: https://phabricator.services.mozilla.com/D72112
2020-04-26 00:54:15 +00:00
Matt Woodrow
69baeef355 Bug 1602318 - Add load identifier and copy-ctor to nsDocShellLoadState. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D72110
2020-04-26 00:53:19 +00:00
Matt Woodrow
98e4b6eb1f Bug 1602318 - Expose LoadContext on BrowsingContext webidl. r=nika,kmag,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D71135
2020-04-26 00:53:01 +00:00
Matt Woodrow
35eb0ce991 Bug 1602318 - Make sure rv is initialized correctly in all branches of OpenInitializedChannel. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70621
2020-04-26 00:51:18 +00:00
Matt Woodrow
59ee67c46a Bug 1602318 - Remove nsILoadContext from DocumentLoadListener. r=nika,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D70618
2020-04-26 00:50:52 +00:00
Matt Woodrow
6e36d339b4 Bug 1602318 - Remove incorrect assertion. r=jya
This was previously true, since we only used ResumeRedirectedLoad with a brand new docshell. This bug adds code for using it with existing docshells, which can have any Document (and associated timing object) loaded in them.

Differential Revision: https://phabricator.services.mozilla.com/D67097
2020-04-26 00:49:36 +00:00
Matt Woodrow
c5176bc6cf Bug 1602318 - Initialize mixed content channel for process-switches. r=ckerschb,necko-reviewers,dragana
Same process origin changes are handled by the docshell, which detects this during AsyncOnChannelRedirect and clears the mixed content permission.
Process switches load in a fresh docshell, so we need to make sure we appropriately set or clear the mixed content permission.

Differential Revision: https://phabricator.services.mozilla.com/D67095
2020-04-26 00:49:21 +00:00
Matt Woodrow
8ff849ade1 Bug 1602318 - Associate a current DocumentLoadListener with CanonicalBrowsingContext. r=nika,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D67094
2020-04-26 00:49:19 +00:00
Sylvestre Ledru
34acbb653a Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
Dorel Luca
c2d429f9a0 Backed out 2 changesets (bug 1576188) for Build bustage in docshell/base/BrowsingContext.cpp. CLOSED TREE
Backed out changeset 7e5e86986811 (bug 1576188)
Backed out changeset b731cbad59a8 (bug 1576188)
2020-04-24 23:02:11 +03:00