Граф коммитов

565 Коммитов

Автор SHA1 Сообщение Дата
Edgar Chen 61b3f2657e Bug 1724905 - Remove native only updateURLAndHistory in nsIDocShell; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D122211
2021-08-10 22:15:09 +00:00
Andreas Farre d9f3a1519c Bug 1701303 - Move counting of private browsing contexts to parent process. r=smaug,johannh
Move the counting of private browsing contexts to the parent
process. Also change to only consider non-chrome browsing contexts
when counting private contexts. The latter is possible due to bug
1528115, because we no longer need to support hidden private windows.

With counting in the parent process we can make sure that when we're
changing remoteness on a private browsing context the private browsing
context count never drops to zero. This fixes an issue with Fission,
where we remoteness changes could transiently have a zero private
browsing context count, that would be mistaken for the last private
browsing context going away.

Changing to only count non-chrome browsing contexts makes us only fire
'last-pb-context-exited' once, and since we count them in the parent
there is no missing information about contexts that makes us wait for
a content process about telling us about insertion or removal of
browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D118182
2021-07-05 15:17:55 +00:00
Marian-Vasile Laza 17d6e262f7 Backed out changeset 55f827545de2 (bug 1701303) for causing bustages on ContentParent.cpp. CLOSED TREE 2021-07-05 17:12:13 +03:00
Andreas Farre b3cd1ccf21 Bug 1701303 - Move counting of private browsing contexts to parent process. r=smaug,johannh
Move the counting of private browsing contexts to the parent
process. Also change to only consider non-chrome browsing contexts
when counting private contexts. The latter is possible due to bug
1528115, because we no longer need to support hidden private windows.

With counting in the parent process we can make sure that when we're
changing remoteness on a private browsing context the private browsing
context count never drops to zero. This fixes an issue with Fission,
where we remoteness changes could transiently have a zero private
browsing context count, that would be mistaken for the last private
browsing context going away.

Changing to only count non-chrome browsing contexts makes us only fire
'last-pb-context-exited' once, and since we count them in the parent
there is no missing information about contexts that makes us wait for
a content process about telling us about insertion or removal of
browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D118182
2021-07-05 13:16:49 +00:00
Marian-Vasile Laza 47a2086ba6 Backed out changeset 4854ff4fff72 (bug 1701303) for causing bustages on nsDocShell.cpp. CLOSED TREE 2021-07-05 14:21:48 +03:00
Andreas Farre 56b9a33c06 Bug 1701303 - Move counting of private browsing contexts to parent process. r=smaug,johannh
Move the counting of private browsing contexts to the parent
process. Also change to only consider non-chrome browsing contexts
when counting private contexts. The latter is possible due to bug
1528115, because we no longer need to support hidden private windows.

With counting in the parent process we can make sure that when we're
changing remoteness on a private browsing context the private browsing
context count never drops to zero. This fixes an issue with Fission,
where we remoteness changes could transiently have a zero private
browsing context count, that would be mistaken for the last private
browsing context going away.

Changing to only count non-chrome browsing contexts makes us only fire
'last-pb-context-exited' once, and since we count them in the parent
there is no missing information about contexts that makes us wait for
a content process about telling us about insertion or removal of
browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D118182
2021-07-05 09:30:53 +00:00
Henri Sivonen 7df7939f77 Bug 1713627 - Remove code obsoleted by the replacing the Text Encoding menu with one item. r=jaws,emk
Differential Revision: https://phabricator.services.mozilla.com/D116391
2021-06-21 12:09:01 +00:00
Dorel Luca 2118316ba4 Backed out changeset 4891a17c55e2 (bug 1713627) for Browser-chrome failures in docshell/test/browser/browser_bug673087-1.js. CLOSED TREE 2021-06-21 12:10:54 +03:00
Henri Sivonen abbbf94915 Bug 1713627 - Remove code obsoleted by the replacing the Text Encoding menu with one item. r=jaws,emk
Differential Revision: https://phabricator.services.mozilla.com/D116391
2021-06-21 08:09:43 +00:00
Kris Maglione ae436f55ec Bug 1646560: Part 2 - Move allowJavascript and friends from DocShell to BrowsingContext and WindowContext. r=jdescottes,nika,geckoview-reviewers,devtools-backward-compat-reviewers,agi
This is slightly complicated by the fact that the editor code wants to be able
to set this from the content process, so we really need separate
BrowsingContext and WindowContext flags, the latter of which can be set by the
owning process.

Differential Revision: https://phabricator.services.mozilla.com/D114899
2021-06-15 04:40:11 +00:00
Emilio Cobos Álvarez 3e0cb7c68b Bug 1703289 - Make mixed content blocker use a session-persistent permission rather than ad-hoc code. r=ckerschb,smaug
This is more fission-compatible, and a lot simpler.

Differential Revision: https://phabricator.services.mozilla.com/D111480
2021-04-12 18:04:12 +00:00
Kashav Madan c91bbe8c6d Bug 1597499 - Move nsIDocShell::ChildOffset to BrowsingContext, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D89969
2021-03-23 18:01:20 +00:00
Mark Banner e8d532d179 Bug 1699747 - Clean up old references to nsIDocShellLoadInfo. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D109095
2021-03-19 18:38:32 +00:00
smolnar 200bfc652c Backed out 4 changesets (bug 1597499) for causing Fission crashes (bug 1699349). a=backout
Backed out changeset 0df7b8660446 (bug 1597499)
Backed out changeset d015ba9097c5 (bug 1597499)
Backed out changeset e84054ccadb0 (bug 1597499)
Backed out changeset 12762a25c4fa (bug 1597499)
2021-03-18 11:29:08 +02:00
Kashav Madan 1f5d10dfba Bug 1597499 - Move nsIDocShell::ChildOffset to BrowsingContext, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D89969
2021-03-17 16:43:04 +00:00
Emilio Cobos Álvarez c1853bc54e Bug 1697580 - Remove nsIDocShell.isOffScreenBrowser. r=smacleod
It's unused.

Differential Revision: https://phabricator.services.mozilla.com/D107888
2021-03-10 19:29:11 +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
Steven MacLeod 971103bdd5 Bug 1606061 - move TouchEventsOverride to BrowsingContext. r=farre,devtools-backward-compat-reviewers
This change removes docshell's `mTouchEventsOverride` and replaces it
with a new `BrowsingContext` field `TouchEventsOverrideInternal`.
All uses of the old field have been replaced and an override should
now work under fission when there are cross-origin descendent frames.

Differential Revision: https://phabricator.services.mozilla.com/D96414
2020-11-10 15:57:30 +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
Agi Sferro deddd22ef0 Bug 1648157 - Move DisplayMode to BrowsingContext. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D92484
2020-10-09 17:31:59 +00:00
Emilio Cobos Álvarez bed4af1f24 Bug 1666827 - Make nsDocShell::mIsPrintPreview a flag in the top browsing context. r=smaug
This should make it work on fission, plus is simpler than the
alternative of traversing the whole docshell tree and then undo it.

It also is going to make easier the actual fix for this bug.

Differential Revision: https://phabricator.services.mozilla.com/D91438
2020-09-27 12:07:19 +00:00
Kashav Madan 042b6e115d Bug 1666485 - Make BrowsingContext::CreatedDynamically non-synced, r=nika,kmag
Differential Revision: https://phabricator.services.mozilla.com/D89223
2020-09-23 13:43:38 +00:00
Butkovits Atila 2314b9b687 Backed out changeset a81b4130ac14 (bug 1666485) for causing bustages on BrowsingContext. CLOSED TREE 2020-09-23 16:18:53 +03:00
Kashav Madan c95234bd08 Bug 1666485 - Make BrowsingContext::CreatedDynamically non-synced, r=nika,kmag
Differential Revision: https://phabricator.services.mozilla.com/D89223
2020-09-23 12:45:38 +00:00
Peter Van der Beken f1fd281cee Bug 1666326 - Remove nsDocShell::mHistoryID and always use the BrowsingContext's HistoryID synced field. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D90909
2020-09-22 09:37:08 +00:00
Kris Maglione a3b66dd82c Bug 1662841: Remove Fission-incompatible `nsDocumentViewer::AppendSubtree`. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D90615
2020-09-17 22:43:47 +00:00
Andreas Farre f9f96d23ca Bug 1662410 - Part 1: Fix usage of ChildSHistory.legacySHistory . r=peterv
ChildSHistory.legacySHistory isn't valid for content processes when
session history in the parent is enabled. We try to fix this by either
delegating to the parent by IPC or move the implementation partially
or as a whole to the parent.

Differential Revision: https://phabricator.services.mozilla.com/D89353
2020-09-16 14:51:01 +00:00
Peter Van der Beken 7f6d4f154e Bug 1660869 - Forward RemoveFromSessionHistory to the parent process for session history in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D88061
2020-08-25 16:20:17 +00:00
Emilio Cobos Álvarez 044b3c4332 Bug 1636728 - Centralize printing entry points in nsGlobalWindowOuter, and move cloning out of nsPrintJob. r=jwatt,geckoview-reviewers,smaug,agi
This centralizes our print and preview setup in nsGlobalWindowOuter so
that we never re-clone a clone, and so that we reuse the window.open()
codepath to create the browsing context to clone into.

For window.print, for both old print dialog / silent printing and new
print preview UI, we now create a hidden browser (as in with visibility:
collapse, which takes no space but still gets a layout box).

 * In the modern UI case, this browser is swapped with the actual print
   preview clone, and the UI takes care of removing the browser.

 * In the print dialog / silent printing case, the printing code calls
   window.close() from nsDocumentViewer::OnDonePrinting().

 * We don't need to care about the old print preview UI for this case
   because it can't be open from window.print().

We need to fall back to an actual window when there's no
nsIBrowserDOMWindow around for WPT print tests and the like, which don't
have one. That seems fine, we could special-case this code path more if
needed but it doesn't seem worth it.

Differential Revision: https://phabricator.services.mozilla.com/D87063
2020-08-25 17:45:12 +00:00
Steven MacLeod 6ceacee1c3 Bug 1646567 - fix nsDocShell::HasUnloadedParent to work for OOP frames. r=nika
With fission enabled, walking the docshell tree to find unloaded
parents would stop at the first OOP parent. Instead we now walk
the `BrowsingContext`/`WindowContext` tree. To still check parents
which are OOP, we take advantage of the fact that a parent
`WindowContext` will no longer be the current `WindowContext` if
the parent was unloaded. For in process docshell's we additionally
check the docshell directly.

Differential Revision: https://phabricator.services.mozilla.com/D85328
2020-07-31 19:58:09 +00:00
Butkovits Atila 336243e692 Backed out changeset 6164e09df60e (bug 1646567) for nsDocShell failures. CLOSED TREE 2020-07-31 21:26:45 +03:00
Steven MacLeod ae5aa0f5bf Bug 1646567 - fix nsDocShell::HasUnloadedParent to work for OOP frames. r=nika
With fission enabled, walking the docshell tree to find unloaded
parents would stop at the first OOP parent. Instead we now walk
the `BrowsingContext`/`WindowContext` tree. To still check parents
which are OOP, we take advantage of the fact that a parent
`WindowContext` will no longer be the current `WindowContext` if
the parent was unloaded. For in process docshell's we additionally
check the docshell directly.

Differential Revision: https://phabricator.services.mozilla.com/D85328
2020-07-31 16:23:58 +00:00
Peter Van der Beken bcde4b996a Bug 1655735 - Remove nsIDocShell::GetOSHEId. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D85146
2020-07-28 14:17:49 +00:00
Gabriel Luong bcf1de6e49 Bug 1647972 - Add a new PlatformOverride field onto BrowsingContext r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D81285
2020-06-26 14:17:08 +00:00
Henri Sivonen a9061bdcce Bug 1646484 - Remove nsIDocShell::forcedCharset. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D80072
2020-06-18 01:18:11 +00:00
Nika Layzell cde53b3bec Bug 1508306 - Part 1: Migate the Large-Allocation handler to DocumentLoadListener, r=mattwoodrow,necko-reviewers,geckoview-reviewers,agi,valentin
This removes the diagnostic warnings which used to be logged when the
Large-Allocation header was present, but failed to switch into a
Large-Allocation process. Due to the low adoption of the header, this shouldn't
be too large of a problem, but we can look into re-adding the diagnostics if
needed in the future.

The new codepath no longer performs multiple network requests for
Large-Allocation resources, and now relies on the battle-tested
DocumentLoadListener codepath for process switching.

Differential Revision: https://phabricator.services.mozilla.com/D78998
2020-06-15 23:24:07 +00:00
Narcis Beleuzu a8dde16e58 Backed out 10 changesets (bug 1508306, bug 1640019) for bc failures on browser_autoOpen.js . CLOSED TREE
Backed out changeset 8844170ff408 (bug 1508306)
Backed out changeset b750f1d873cf (bug 1508306)
Backed out changeset c7170e76e676 (bug 1640019)
Backed out changeset 5905995e4815 (bug 1640019)
Backed out changeset 7bf86513348e (bug 1640019)
Backed out changeset f7d0605295f7 (bug 1640019)
Backed out changeset 521b4d5a9a89 (bug 1640019)
Backed out changeset 8542edc564bc (bug 1640019)
Backed out changeset 4f6a03152526 (bug 1640019)
Backed out changeset 30d2bf04719b (bug 1640019)
2020-06-12 22:47:50 +03:00
Nika Layzell 47c0aeb539 Bug 1508306 - Part 1: Migate the Large-Allocation handler to DocumentLoadListener, r=mattwoodrow,necko-reviewers,geckoview-reviewers,agi,valentin
This removes the diagnostic warnings which used to be logged when the
Large-Allocation header was present, but failed to switch into a
Large-Allocation process. Due to the low adoption of the header, this shouldn't
be too large of a problem, but we can look into re-adding the diagnostics if
needed in the future.

The new codepath no longer performs multiple network requests for
Large-Allocation resources, and now relies on the battle-tested
DocumentLoadListener codepath for process switching.

Differential Revision: https://phabricator.services.mozilla.com/D78998
2020-06-12 16:52:13 +00:00
Emilio Cobos Álvarez 6b709b5f55 Bug 1606660 - Move allowfullscreen checks to the browsing context. r=nika
So that they work properly on fission iframes.

Differential Revision: https://phabricator.services.mozilla.com/D78702
2020-06-08 23:49:31 +00:00
Andrea Marchesini 22d905d24e Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-03 06:09:52 +00:00
Csoregi Natalia 2d5cafc841 Backed out 5 changesets (bug 1639833) for failures on browser_blockingIndexedDbInWorkers.js. CLOSED TREE
Backed out changeset 6b4f76d65540 (bug 1639833)
Backed out changeset c77acba1aacb (bug 1639833)
Backed out changeset 30c97666919e (bug 1639833)
Backed out changeset d769b313441a (bug 1639833)
Backed out changeset ed41b41d1b03 (bug 1639833)
2020-06-02 15:02:31 +03:00
Andrea Marchesini e31c7313ca Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-02 08:28:05 +00:00
Noemi Erli f08b043cf6 Backed out 5 changesets (bug 1639833) for causing sessionstorage related failures CLOSED TREE
Backed out changeset b36af8d9db34 (bug 1639833)
Backed out changeset 712c11904dbe (bug 1639833)
Backed out changeset 14f1e4783582 (bug 1639833)
Backed out changeset b7f14c4cfe5d (bug 1639833)
Backed out changeset b4b25034dd83 (bug 1639833)
2020-06-01 19:31:50 +03:00
Andrea Marchesini 8c0df411d1 Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-01 11:57:46 +00:00
Matt Woodrow e060a86c42 Bug 1631405 - Move nsISecureBrowserUI to be owned by the canonical browsing context instead of docshell. r=nika,ckerschb,Gijs,webcompat-reviewers,twisniewski
This removes all docshell nsISecureBrowserUI and mixed content properties, and moves them into CanonicalBrowsingContext/WindowGlobalParent. It makes the mixed content blocker just compute the state for the current load, and then send the results to the parent process, where we update the security state accordingly.

I think we could in the future remove onSecurityChange entirely, and instead just fire an event to the <browser> element notifying it of changes to the queryable securityUI.

Unfortunately we have a lot of existing code that depends on specific ordering between onSecurityChange and onLocationChange, so I had to hook into the RemoteWebProgress implementation in BrowserParent to mimic the same timings.

Differential Revision: https://phabricator.services.mozilla.com/D75447
2020-05-27 00:28:59 +00:00
Bogdan Tara a54ec3073f Backed out 4 changesets (bug 1631405) for multiple mochitest failures CLOSED TREE
Backed out changeset 9963cc0b23cb (bug 1631405)
Backed out changeset 469ac933ed7c (bug 1631405)
Backed out changeset 0c5f55864268 (bug 1631405)
Backed out changeset 20dcbcc2f3b8 (bug 1631405)
2020-05-27 01:30:20 +03:00
Matt Woodrow 240d417eb6 Bug 1631405 - Move nsISecureBrowserUI to be owned by the canonical browsing context instead of docshell. r=nika,ckerschb,Gijs,webcompat-reviewers,twisniewski
This removes all docshell nsISecureBrowserUI and mixed content properties, and moves them into CanonicalBrowsingContext/WindowGlobalParent. It makes the mixed content blocker just compute the state for the current load, and then send the results to the parent process, where we update the security state accordingly.

I think we could in the future remove onSecurityChange entirely, and instead just fire an event to the <browser> element notifying it of changes to the queryable securityUI.

Unfortunately we have a lot of existing code that depends on specific ordering between onSecurityChange and onLocationChange, so I had to hook into the RemoteWebProgress implementation in BrowserParent to mimic the same timings.

Differential Revision: https://phabricator.services.mozilla.com/D75447
2020-05-26 21:17:01 +00:00
Dan Glastonbury b4dde7ce2a Bug 1633459 - Marshal customUserAgent setting via nsDocShell. r=geckoview-reviewers,esawin,nika
Reinstate customUserAgent interface for nsIDocShell. This is so it can be used
as a choke-point to catch setting values on docshells which are in the process
of changing process. We don't want to send changes which will be rejected on the
parent side.

This code should be removed once callers setting customUserAgent are refactored
to only occur from parent process.

Differential Revision: https://phabricator.services.mozilla.com/D75006
2020-05-20 00:19:59 +00:00
Peter Van der Beken ef557497ca Bug 1629866 - Store ChildSHistory on the BrowsingContext. r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D70997
2020-05-19 08:57:44 +00:00
Csoregi Natalia 517e830522 Backed out 4 changesets (bug 1629866, bug 1570255) for assertion failures on DocumentChannelChild.cpp. CLOSED TREE
Backed out changeset 214e4a11be0d (bug 1570255)
Backed out changeset db066dda1bb8 (bug 1570255)
Backed out changeset d9f75d88613e (bug 1570255)
Backed out changeset fe2d4790b73a (bug 1629866)
2020-05-13 18:30:42 +03:00