Commit Graph

121 Commits

Author SHA1 Message Date
Brendan Dahl
ef30c33394 Bug 1470510 - Rename nsXULWindow and nsIXULWindow to AppWindow and nsIAppWindow. r=smaug
nsXULWindow is no longer XUL specific and is somewhat confusing name.

Differential Revision: https://phabricator.services.mozilla.com/D51486
2019-11-05 17:56:28 +00:00
Mihai Alexandru Michis
5803a050c4 Backed out 2 changesets (bug 1470510) for causing bustages in widget/cocoa/nsChildView.mm CLOSED TREE
Backed out changeset a343f30c34a3 (bug 1470510)
Backed out changeset 4da64790094d (bug 1470510)
2019-11-05 09:24:26 +02:00
Brendan Dahl
b484de8fe7 Bug 1470510 - Rename nsXULWindow and nsIXULWindow to AppWindow and nsIAppWindow. r=smaug
nsXULWindow is no longer XUL specific and is somewhat confusing name.

Differential Revision: https://phabricator.services.mozilla.com/D51486
2019-11-04 23:37:31 +00:00
Dorel Luca
bcbec745b9 Backed out 2 changesets (bug 1470510) for build bustage on /build/src/widget/cocoa/nsChildView.mm. CLOSED TREE
Backed out changeset 5967bf633574 (bug 1470510)
Backed out changeset 067a556bb614 (bug 1470510)
2019-11-04 19:18:56 +02:00
Brendan Dahl
4f87b88cc6 Bug 1470510 - Rename nsXULWindow and nsIXULWindow to AppWindow and nsIAppWindow. r=smaug
nsXULWindow is no longer XUL specific and is somewhat confusing name.

Differential Revision: https://phabricator.services.mozilla.com/D51486
2019-11-04 16:52:35 +00:00
Edgar Chen
3dc70dd58e Bug 1587062 - Move SandboxFlags from DocShell to BrowsingContext; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D50663
2019-10-28 11:48:30 +00:00
Andreas Farre
22d88214fc Bug 1575051 - Part 2: Look in chrome browsing context group when docshell is missing. r=kmag
Also some minor cleanup in nsWindowWatcher, as well as a small fix,
where GetWindowByName forgot to addref its return value (as changed in
Part 1).

Differential Revision: https://phabricator.services.mozilla.com/D48976
2019-10-24 14:53:07 +00:00
Andreas Farre
3262edc078 Bug 1575051 - Part 1: Remove nsIDocShellTreeItem.findItemWithName. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D46285
2019-10-24 14:53:07 +00:00
Edgar Chen
b2d6793250 Bug 1588720 - Part 2: Track number of popup spam through BrowsingContext; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49276
2019-10-18 03:04:55 +00:00
Narcis Beleuzu
8b503ffdd0 Backed out 3 changesets (bug 1575051) for bc failures on browser_browsingContext-getWindowByName.js . CLOSED TREE
Backed out changeset 67aaf4a157af (bug 1575051)
Backed out changeset e01256038537 (bug 1575051)
Backed out changeset 0c8f70f9328b (bug 1575051)
2019-10-14 19:19:05 +03:00
Andreas Farre
c48483dcae Bug 1575051 - Part 2: Look in chrome browsing context group when docshell is missing. r=kmag
Also some minor cleanup in nsWindowWatcher, as well as a small fix,
where GetWindowByName forgot to addref its return value (as changed in
Part 1).

Differential Revision: https://phabricator.services.mozilla.com/D48976
2019-10-14 12:32:08 +00:00
Andreas Farre
967275c308 Bug 1575051 - Part 1: Remove nsIDocShellTreeItem.findItemWithName. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D46285
2019-10-14 12:07:14 +00:00
Matt Woodrow
d90755519d Bug 1578624 - P11: Add a flag to ask the parent to not actually load the URI when opening a window, since we'll do it ourselves anyway. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D47867
2019-10-11 01:56:35 +00:00
Ehsan Akhgari
6d7829d3ba Bug 1587922 - Remove the remnants of the showModalDialog code; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D48892
2019-10-10 22:59:28 +00:00
Brindusan Cristian
170d6fb93f Backed out 11 changesets (bug 1578624) for build bustages. CLOSED TREE
Backed out changeset b22733eb880f (bug 1578624)
Backed out changeset cb5e15489635 (bug 1578624)
Backed out changeset f1746b2f9dec (bug 1578624)
Backed out changeset d08a099a22ff (bug 1578624)
Backed out changeset 8ebd563c72a8 (bug 1578624)
Backed out changeset d8bfec2dc9b6 (bug 1578624)
Backed out changeset 591664928bce (bug 1578624)
Backed out changeset 63f5a619b9ef (bug 1578624)
Backed out changeset ff67cc13cdf3 (bug 1578624)
Backed out changeset 43556c937a09 (bug 1578624)
Backed out changeset 49065a55694d (bug 1578624)
2019-10-09 11:50:37 +03:00
Matt Woodrow
74519473ee Bug 1578624 - P11: Add a flag to ask the parent to not actually load the URI when opening a window, since we'll do it ourselves anyway. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D47867
2019-10-09 07:54:45 +00:00
Narcis Beleuzu
eab5ec4098 Backed out 11 changesets (bug 1578624) for bustages on WindowGlobalChild.h . CLOSED TREE
Backed out changeset 478897956ee0 (bug 1578624)
Backed out changeset ab9c09164df0 (bug 1578624)
Backed out changeset f461f10efa46 (bug 1578624)
Backed out changeset 9b958693a003 (bug 1578624)
Backed out changeset 3b8220a15051 (bug 1578624)
Backed out changeset 180407dc57a8 (bug 1578624)
Backed out changeset bb11892e2171 (bug 1578624)
Backed out changeset 4f5c28244290 (bug 1578624)
Backed out changeset 6c02bbe5c1c5 (bug 1578624)
Backed out changeset 1d762fdce921 (bug 1578624)
Backed out changeset 818bc6e20c7d (bug 1578624)
2019-10-09 08:52:25 +03:00
Matt Woodrow
35812a4c7a Bug 1578624 - P11: Add a flag to ask the parent to not actually load the URI when opening a window, since we'll do it ourselves anyway. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D47867
2019-10-03 23:15:19 +00:00
Gabriele Svelto
652cb568da Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47678
2019-09-30 22:06:47 +00:00
Brindusan Cristian
8633c6f1f4 Backed out 2 changesets (bug 1582716, bug 1575051) for gv-junit failures, new exception. CLOSED TREE
Backed out changeset b5aa3ac4483e (bug 1582716)
Backed out changeset c385531b4ee3 (bug 1575051)
2019-09-24 19:47:00 +03:00
Andreas Farre
adc8fc7fb5 Bug 1575051 - Remove nsIDocShellTreeItem.findItemWithName. r=kmag
This also allows us to remove TabGroup::FindItemWithName, which is a
big step towards removing TabGroup entirely.

Differential Revision: https://phabricator.services.mozilla.com/D46285
2019-09-24 13:16:26 +00:00
Brindusan Cristian
f52298b70e Backed out changeset 0ebd1612a4ae (bug 1575051) for gv-junit crashes and bc failures on browser_browsingContext-02.js. CLOSED TREE 2019-09-24 15:08:41 +03:00
Andreas Farre
24fa934f6b Bug 1575051 - Remove nsIDocShellTreeItem.findWithName. r=kmag
This also allows us to remove TabGroup::FindItemWithName, which is a
big step towards removing TabGroup entirely.

Differential Revision: https://phabricator.services.mozilla.com/D46285
2019-09-24 10:58:47 +00:00
Kris Maglione
a1a1c94bf6 Bug 1553804: Part 1 - Don't allow opening content windows with chrome openers. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D45326
2019-09-20 04:43:37 +00:00
Kris Maglione
73ba808d16 Bug 1581548: Handle new BrowsingContexts becoming discarded during nested event loop. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D46088

MANUAL PUSH: Cannot update reopened Phabricator revisions.
2019-09-17 22:19:50 +00:00
Kris Maglione
89e21d6e79 Bug 1574593: Silently ignore load attempt on/from discarded BrowsingContext. r=nika
The (non-normative) window.open spec does not specify what should happen when
window.open is called on a window with a null/discarded browsing context, but
in general the lookup and creation rules do not make sense when the window has
no BC. It does, however, specify that we should return null when a target BC
cannot be found or created, and gives us broad discretion over when we decide
to ignore a load request and return null. Since we can't trigger a
cross-process load from a discarded BC, simply aborting in that case seems
like the logical solution.

For Location objects, the spec is more specific, and requires that we ignore
load attempts on Location objects whose documents are null, which in our
implementation corresponds to a discarded BrowsingContext.
LocationBase::SetURI already enforces this, but a second check in
BrowsingContext::LoadURI is probably a good idea as well.

Differential Revision: https://phabricator.services.mozilla.com/D45635
2019-09-12 11:37:01 +00:00
Kris Maglione
abf57fd58e Bug 1576407: Part 4 - Stop storing opener redundantly on nsGlobalWindowOuter. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D43693
2019-08-28 18:07:45 +00:00
Mihai Alexandru Michis
5bf8e80ffd Backed out 6 changesets (bug 1576407) for causing wpt and mochitest failures. CLOSED TREE
Backed out changeset 3b0498064cbf (bug 1576407)
Backed out changeset 38e4ea431445 (bug 1576407)
Backed out changeset 19bf40067233 (bug 1576407)
Backed out changeset 0ddbc451dcab (bug 1576407)
Backed out changeset 08d4c25fc670 (bug 1576407)
Backed out changeset be7cbc61f825 (bug 1576407)
2019-08-29 03:00:47 +03:00
Kris Maglione
9c50c43630 Bug 1576407: Part 4 - Stop storing opener redundantly on nsGlobalWindowOuter. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D43693
2019-08-28 18:07:45 +00:00
Kashav Madan
16e23ab668 Bug 1562264 - Propagate remote/fission flags from parent to child for content window.open() calls, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D40836
2019-08-23 16:06:09 +00:00
Razvan Maries
1f67d7021a Backed out 2 changesets (bug 1562264) for causing Android perma fails. CLOSED TREE
Backed out changeset b66eec7d2e55 (bug 1562264)
Backed out changeset 445eadfd8ce3 (bug 1562264)
2019-08-17 02:24:40 +03:00
Kashav Madan
f234800954 Bug 1562264 - Propagate remote/fission flags from parent to child for content window.open() calls, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D40836
2019-08-16 17:31:38 +00:00
Henri Sivonen
a311128f9f Bug 1574090 - Make fission.autostart available via StaticPrefs. r=njn
Differential Revision: https://phabricator.services.mozilla.com/D42091
2019-08-16 07:35:29 +00:00
Kris Maglione
6dcc1db854 Bug 1562292: Follow-up: Fix bustage in GetWindowByName after dropping removal patch. r=bustage CLOSED TREE
MANUAL PUSH: Bustage fix.
2019-08-14 12:08:05 -07:00
Kris Maglione
c3f6ee52bb Bug 1562292: Part 2d - Operate on BrowsingContext in most of OpenWindowInternal. r=nika
This allows us to actually correctly load URIs into and return BCs for
cross-process named targets. It still leaves a lot of code which needs to
operate directly on DocShells, but it only applies to new windows, which
always start out same-process.

The one exception is the logic to change the opener of an existing
cross-process window targeted by an open() operation, which can't currently be
accomplished outside of the BC's owner process. This will need a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D40501
2019-08-01 17:08:54 -07:00
Kris Maglione
4f509ee856 Bug 1562292: Part 2c - Use BrowserContext rather than DocShell to resolve named targets. r=nika
This lets us lookup cross-process targets, but does not yet allow returning or
loading anything into them.

Differential Revision: https://phabricator.services.mozilla.com/D40500
2019-06-28 14:34:58 -07:00
Kris Maglione
b5cd69594c Bug 1562292: Part 2b - Remove unused nsPIWindowWatcher::FindItemWithName method. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D40499
2019-06-28 12:32:49 -07:00
Kris Maglione
f98ef52fa5 Bug 1562292: Part 1e - Use BrowsingContext as target in IsSandboxedFrom(). r=nika
This check always has access to an in-process DocShell which is attempting to
perform a load, but its target may often be cross-process, and have no
in-process DocShell. This patch changes the target checks to use a
BrowsingContext in a Fission-compatible way.

Differential Revision: https://phabricator.services.mozilla.com/D40496
2019-08-01 16:36:32 -07:00
Kris Maglione
7cd2a9581b Bug 1562292: Part 1d - Move OnePermittedSandboxedNavigator to BrowsingContext. r=nika
We need to be able to check the one-permitted-sandboxed-navigator from
potentially-cross-process access checks in DocShell, which means it needs to
live on BrowsingContext rather than DocShell.

Differential Revision: https://phabricator.services.mozilla.com/D40495
2019-08-01 16:22:52 -07:00
Kannan Vijayan
c110dbe443 Bug 1569262 - Rename nsIDocShellTreeItem::GetRootTreeItem to GetInProcessRootTreeItem for Fission marking. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D41064
2019-08-07 19:24:00 +00:00
Kris Maglione
dbebcfeaa8 Bug 1571272: Add missing null check. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D40672
2019-08-06 17:36:16 +00:00
Kris Maglione
7575d4eb1d Bug 1561015: Part 2 - Return BrowsingContext from openWindow2. r=bzbarsky
There are some unfortunate aspects of openWindow() and openWindow2() that make
this difficult. Namely, they sometimes return top-level chrome windows, and
sometimes a single content window from the top-level chrome window that they
open, depending on how they're called.

There really isn't any reason to return a BrowsingContext rather than a chrome
window in the former case, but there also really isn't a way to make the API
polymorphic in a way that would allow handling the two cases differently. So
at some point, the two cases should ideally be split into separate APIs rather
than separate special cases of a single API.

In the mean time, I've left openWindow() returning local mozIDOMWindowProxy
objects, since it isn't used by the DOM window.open() or openDialog() APIs,
and only updated openWindow2(). As a follow-up, we should remove both
openWindow() and openWindow2(), and replace them with openChromeWindow() and
openContentWindow() (or similar) methods which make it immediately clear what
type of window is being returned.

Differential Revision: https://phabricator.services.mozilla.com/D35689
2019-08-02 20:48:40 +00:00
Kris Maglione
1bb60064a6 Bug 1561015: Part 1 - Use BrowsingContext in window provider APIs. r=bzbarsky,mossop
This is the first step in making it possible to return remote WindowProxy
objects from window.open() and related APIs.

This patch also incidentally fixes a bug where getContentWindowOrOpenURI
returned the top-level browser window rather than the new content window when
passed OPEN_NEWWINDOW for the `aWhere` parameter. This was not the expected
behavior, and was a potentially major footgun for any new users who expected
to always get the content window for the URL they were loading, rather than
sometimes getting a chrome browser window instead.

For now, that case just returns null, which is only a minor footgun, rather
than the major one we had before.

Differential Revision: https://phabricator.services.mozilla.com/D35688
2019-08-02 20:48:33 +00:00
Tom Schuster
0700472892 Bug 1558915 - Use infallible nsIURI::SchemeIs in toolkit/ r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40323
2019-08-02 16:31:54 +00:00
Mihai Alexandru Michis
5a74ddfbef Backed out 2 changesets (bug 1558915) for causing bustages. CLOSED TREE
Backed out changeset e44c9fd81e5b (bug 1558915)
Backed out changeset 3da6e9e86be4 (bug 1558915)
2019-08-02 12:17:42 +03:00
Tom Schuster
b637c03f89 Bug 1558915 - Use infallible nsIURI::SchemeIs in toolkit/ r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40323
2019-08-02 08:54:18 +00:00
Kannan Vijayan
c690c1925f Bug 1559414 - Rename unaudited pre-fission methods with SameProcess for future audit burndown. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D39378
2019-07-26 16:48:31 +00:00
Thomas Nguyen
5a46d126ce Bug 1534681 Use ReferrerInfo class in document r=ckerschb,baku,Gijs
Also, in many place, we use document uri as referrer. It is not right
for the case srdoc iframe. We should use the last non-srdoc parent
document's uri

Differential Revision: https://phabricator.services.mozilla.com/D30191
2019-06-06 07:23:37 +00:00
Nika Layzell
071576bb6e Bug 1555850 - Get rid of nsIWindowCreator2, r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33232
2019-05-31 03:41:47 +00:00
Edgar Chen
ea9872bc1b Bug 1554122 - Rename nsAutoPopupStatePusher* to AutoPopupStatePusher; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32457
2019-05-24 12:42:29 +00:00