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

8981 Коммитов

Автор SHA1 Сообщение Дата
Daisuke Akatsuka 3093cbbf0a Bug 1733045: Remove nsINavBookmarkObserver. r=mak
Depends on D169583

Differential Revision: https://phabricator.services.mozilla.com/D131754
2023-02-15 00:29:13 +00:00
Joel Maher a62ef05cdb Bug 1816191 - Skip tests in order to keep win7 running @ azure. r=gbrown,necko-reviewers,settings-reviewers,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,nalexander,sgalich,alwu
Differential Revision: https://phabricator.services.mozilla.com/D169523
2023-02-14 23:44:12 +00:00
Peter Van der Beken de3979ca1f Bug 1816234 - Fix meta refresh with SHIP. r=smaug
BrowsingContext::ShouldAddEntryForRefresh expects to be passed the current URI,
to determine if it's the same as the URI for the new load (we shouldn't add a
new entry if they are the same). Before this patch, in the child process we call
BrowsingContext::ShouldAddEntryForRefresh from nsDocShell::MoveLoadingToActiveEntry
(nsDocShell::CreateContentViewer -> Embed -> MoveLoadingToActiveEntry), passing
nsDocShell's mCurrentURI. However, by that point nsDocShell::CreateContentViewer
has already set the mCurrentURI to the newly loading URI (through
nsDocShell::OnNewURI). In the parent process we do pass the correct URI to
BrowsingContext::ShouldAddEntryForRefresh, so the session history ends up being
correct, but depending on timing of the IPC messages there's a brief moment where
index and length are incorrect in the child process (child process and parent
process get a different answer from BrowsingContext::ShouldAddEntryForRefresh).
This causes intermittent failures in the test at
docshell/test/mochitest/test_bug1742865.html.

Differential Revision: https://phabricator.services.mozilla.com/D169544
2023-02-14 10:19:54 +00:00
Gijs Kruitbosch 387cf24ca0 Bug 1810141 - fix tests to deal with changes to loadURI, r=mossop,perftest-reviewers,geckoview-reviewers,extension-reviewers,sparky,owlish
Depends on D168396

Differential Revision: https://phabricator.services.mozilla.com/D168397
2023-02-13 23:50:41 +00:00
Gijs Kruitbosch 9340b9bc7e Bug 1810141 - make docshell/nsIWebNavigation's loadURI actually take a URI object rather than a string, r=nika
Depends on D168390

Differential Revision: https://phabricator.services.mozilla.com/D168391
2023-02-13 23:50:39 +00:00
Gijs Kruitbosch 9d7452a247 Bug 1810141 - update consumers of CanonicalBrowsingContext.loadURI to use fixup or pass a URI object if they have it, r=mak,webdriver-reviewers,whimboo
Depends on D168389

Differential Revision: https://phabricator.services.mozilla.com/D168390
2023-02-13 23:50:38 +00:00
Gijs Kruitbosch 57b6bd03cd Bug 1810141 - make browsingcontext's loadURI actually take a URI rather than a string, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D168389
2023-02-13 23:50:38 +00:00
Julian Descottes 66eca9e88c Bug 1757457 - [devtools] Recompute mCanExecuteScripts after navigation r=smaug
I can see that after navigation, allowJavascript is correctly set for the browsing context, but it seems we need to call
RecomputeCanExecuteScripts() to force it to be applied to the new page. Not sure if doing this here makes sense or if it should be done earlier.

Also there are still other issues with this feature:
- closing the toolbox does not reload the page: meaning JavaScript remains disabled on the page
- similarly all pages which have been put in bfcache will retain the javascript disabled/enabled setting

For the first issue, I wonder if we should force a reload when closing the toolbox (iff javascript disabled was toggled).
And for the second issue, could we invalidate contexts put in bfcache for a given browsing context when we toggle allowJavaScript?

Olli: Does this change make sense at least to fix the basic issue?

Differential Revision: https://phabricator.services.mozilla.com/D169182
2023-02-13 17:52:51 +00:00
Cristina Horotan 5f4356e527 Backed out 9 changesets (bug 1810141) for several test failures on a CLOSED TREE
Backed out changeset 8781a0d1254d (bug 1810141)
Backed out changeset 131037295784 (bug 1810141)
Backed out changeset 3852fbe290f4 (bug 1810141)
Backed out changeset 118f131a524a (bug 1810141)
Backed out changeset ab5d76846e10 (bug 1810141)
Backed out changeset dce3aa683445 (bug 1810141)
Backed out changeset 4dc41d90dbb3 (bug 1810141)
Backed out changeset 50b57ba1a061 (bug 1810141)
Backed out changeset 569de94781e4 (bug 1810141)
2023-02-13 16:05:30 +02:00
Gijs Kruitbosch ff1cc20bd7 Bug 1810141 - fix tests to deal with changes to loadURI, r=mossop,perftest-reviewers,geckoview-reviewers,extension-reviewers,sparky,owlish
Depends on D168396

Differential Revision: https://phabricator.services.mozilla.com/D168397
2023-02-13 12:55:26 +00:00
Gijs Kruitbosch 60d67bb0ad Bug 1810141 - make docshell/nsIWebNavigation's loadURI actually take a URI object rather than a string, r=nika
Depends on D168390

Differential Revision: https://phabricator.services.mozilla.com/D168391
2023-02-13 12:55:23 +00:00
Gijs Kruitbosch e460aa10f3 Bug 1810141 - update consumers of CanonicalBrowsingContext.loadURI to use fixup or pass a URI object if they have it, r=mak,webdriver-reviewers,whimboo
Depends on D168389

Differential Revision: https://phabricator.services.mozilla.com/D168390
2023-02-13 12:55:22 +00:00
Gijs Kruitbosch 4cd5a989e5 Bug 1810141 - make browsingcontext's loadURI actually take a URI rather than a string, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D168389
2023-02-13 12:55:22 +00:00
Cristian Tuns b25ff1fab8 Backed out 3 changesets (bug 1768495) for causing reftest failures in 1478035.html CLOSED TREE
Backed out changeset 6a48a9418fb3 (bug 1768495)
Backed out changeset ac0c0d68e31d (bug 1768495)
Backed out changeset 74c1903a5df6 (bug 1768495)
2023-02-09 21:31:43 -05:00
Brad Werth 421dfdd517 Bug 1768495 Part 2: Pause or resume compositor when CanonicalBrowsingContext recomputes its visibility. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D169345
2023-02-09 23:44:19 +00:00
Emilio Cobos Álvarez d28f1e4d47 Bug 1815255 - Fix tests to deal with flexbox emulation. r=Jamie,Gijs
Mostly changing XUL attributes to CSS properties, though there are a few
tricky ones:

 * test_offsets.xhtml expects the scroller to be full-width, while
   modern flexbox would honor width: 200px (so just remove it).

 * window_intrinsic_size.xhtml was relying on the div imposing a XUL
   min-size (the test is for SetSizeConstraints, bug 1447056). Use
   min-height instead as that's what modern flexbox reads. Confirmed
   that bug doesn't regress in any case.

 * object-fit-contain-png-001.xhtml has a float: left which had no
   effect on -moz-box, but which assert with modern layout[1]. In the
   future I think we could remove that assert but anyways, for now just
   keeping behavior.

 * image-size.xhtml has a couple uninvestigated sizing differences. They
   didn't seem problematic.

 * 579323-1-ref.html changes because the other file has a canvas with
   width=100 height=100 which imposes an aspect ratio (which XUL never
   honored).

 * window_largemenu.xhtml shows a regression, but this never worked on
   some platforms (at least Linux+Wayland) and nobody has noticed it in
   the browser area, so I suspect we're fine.

[1]: https://searchfox.org/mozilla-central/rev/08362489086b10de96e7a199b267ea5504c01583/layout/generic/ReflowInput.cpp#2137

Differential Revision: https://phabricator.services.mozilla.com/D169084
2023-02-09 12:24:53 +00:00
Nazım Can Altınova 3c14a0bff0 Bug 1812368 - Truncate the URLs we are passing into profiler markers r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D169053
2023-02-09 10:16:51 +00:00
Marian-Vasile Laza 7675a138b5 Backed out 2 changesets (bug 1815255) for causing reftest failures. CLOSED TREE
Backed out changeset b1173e8c7497 (bug 1815255)
Backed out changeset bd09cf2a4abb (bug 1815255)
2023-02-09 04:26:01 +02:00
Emilio Cobos Álvarez 656f11b2a0 Bug 1815255 - Fix tests to deal with flexbox emulation. r=Jamie,Gijs
Mostly changing XUL attributes to CSS properties, though there are a few
tricky ones:

 * test_offsets.xhtml expects the scroller to be full-width, while
   modern flexbox would honor width: 200px (so just remove it).

 * window_intrinsic_size.xhtml was relying on the div imposing a XUL
   min-size (the test is for SetSizeConstraints, bug 1447056). Use
   min-height instead as that's what modern flexbox reads. Confirmed
   that bug doesn't regress in any case.

 * object-fit-contain-png-001.xhtml has a float: left which had no
   effect on -moz-box, but which assert with modern layout[1]. In the
   future I think we could remove that assert but anyways, for now just
   keeping behavior.

 * image-size.xhtml has a couple uninvestigated sizing differences. They
   didn't seem problematic.

 * 579323-1-ref.html changes because the other file has a canvas with
   width=100 height=100 which imposes an aspect ratio (which XUL never
   honored).

 * window_largemenu.xhtml shows a regression, but this never worked on
   some platforms (at least Linux+Wayland) and nobody has noticed it in
   the browser area, so I suspect we're fine.

[1]: https://searchfox.org/mozilla-central/rev/08362489086b10de96e7a199b267ea5504c01583/layout/generic/ReflowInput.cpp#2137

Differential Revision: https://phabricator.services.mozilla.com/D169084
2023-02-09 00:55:13 +00:00
Cristina Horotan fbcc0f66b4 Backed out 2 changesets (bug 1815255) for causing chrome failures at test_focus.xhtml on a CLOSED TREE
Backed out changeset 983fe4e70647 (bug 1815255)
Backed out changeset f8c6426c60f9 (bug 1815255)
2023-02-08 19:50:19 +02:00
Emilio Cobos Álvarez 5db814c383 Bug 1815255 - Fix tests to deal with flexbox emulation. r=Jamie,Gijs
Mostly changing XUL attributes to CSS properties, though there are a few
tricky ones:

 * test_offsets.xhtml expects the scroller to be full-width, while
   modern flexbox would honor width: 200px (so just remove it).

 * window_intrinsic_size.xhtml was relying on the div imposing a XUL
   min-size (the test is for SetSizeConstraints, bug 1447056). Use
   min-height instead as that's what modern flexbox reads. Confirmed
   that bug doesn't regress in any case.

 * object-fit-contain-png-001.xhtml has a float: left which had no
   effect on -moz-box, but which assert with modern layout[1]. In the
   future I think we could remove that assert but anyways, for now just
   keeping behavior.

 * image-size.xhtml has a couple uninvestigated sizing differences. They
   didn't seem problematic.

 * 579323-1-ref.html changes because the other file has a canvas with
   width=100 height=100 which imposes an aspect ratio (which XUL never
   honored).

 * window_largemenu.xhtml shows a regression, but this never worked on
   some platforms (at least Linux+Wayland) and nobody has noticed it in
   the browser area, so I suspect we're fine.

[1]: https://searchfox.org/mozilla-central/rev/08362489086b10de96e7a199b267ea5504c01583/layout/generic/ReflowInput.cpp#2137

Differential Revision: https://phabricator.services.mozilla.com/D169084
2023-02-08 16:52:18 +00:00
Jens Stutte a5cf43833e Bug 1814603 - Change more ContentParent::IsDead checks to ContentParent::IsShuttingDown. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D168995
2023-02-07 18:07:19 +00:00
Greg Tatum a254222081 Bug 1805476 - Stub out an about:translations page with no real functionality; r=nordzilla
This page is hidden behind a pref, but not behind an ifdef. I chose to
do this in order to simplify the potential release of this feature. I
don't foresee issues with bloating the binary during the development,
so this doesn't feel like a risk to me.

Differential Revision: https://phabricator.services.mozilla.com/D164613
2023-02-06 21:56:37 +00:00
Jens Stutte 75a94959cb Bug 1813391 - Have ContentParent::IsShuttingDown and check it instead of IsAlive where appropriate. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D168225
2023-02-01 15:50:49 +00:00
Olli Pettay 2cc9c7eaf8 Bug 1810903, return early from LoadErrorPage if the docshell is going away, r=peterv
We'd return early anyhow later in nsDocShell::InternalLoad.
The patch is based on code inspection. If one is closing the window while printing, we could get to this state, among other cases.

Differential Revision: https://phabricator.services.mozilla.com/D168368
2023-01-31 13:47:50 +00:00
Gijs Kruitbosch c906d6f529 Bug 1795255 - manual fixes for tests that break after applying this lint rule, r=Standard8,necko-reviewers,extension-reviewers,credential-management-reviewers,sgalich,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D167802
2023-01-31 11:48:41 +00:00
Stanca Serban 373a25b201 Merge mozilla-central to autoland. CLOSED TREE 2023-01-25 11:48:07 +02:00
Stanca Serban e1b4aec181 Backed out changeset efdaaeb6ecf2 (bug 1804803) for causing Bug 1812257. a=backout 2023-01-25 11:41:08 +02:00
Gijs Kruitbosch 129735a58b Bug 1811854 - switch remaining tests to BrowserTestUtils.loadURIString from BrowserTestUtils.loadURI, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D167558
2023-01-24 13:19:11 +00:00
Peter Van der Beken 12f9eda269 Bug 1804803 - Hit MOZ_CRASH(DocumentLoadListener::Open for invalid history entry due to mismatch of 'Invalid LoadId'). r=smaug
When we start the load for a reload, check that the entry we're trying to
reload is still connected to session history.

Differential Revision: https://phabricator.services.mozilla.com/D165049
2023-01-24 11:11:26 +00:00
Emilio Cobos Álvarez 9e530f224a Bug 1811834 - Clean up nsWidgetInitData. r=cmartin,geckoview-reviewers,calu
Move it to the mozilla::widget namespace.

Use enum classes for transparency, popup type, popup level, etc.

Mostly automated with sed, but there were a few manual changes required
as well in windows code because they relied on Atomic<TransparencyMode>
working (which now doesn't because TransparencyMode is 1 byte instead of
4 bytes).

Differential Revision: https://phabricator.services.mozilla.com/D167537
2023-01-23 23:58:41 +00:00
Olli Pettay ee07926a1f Bug 1803628, initiate frameloader destroy asynchronously, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D166830
2023-01-20 16:39:39 +00:00
Gijs Kruitbosch cb015ad1d8 Bug 1810995 - update BrowserTestUtils.loadURI consumers to use loadURIString (automated) - dom and docshell - r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D167152
2023-01-19 20:16:41 +00:00
Cosmin Sabou 0869b4045d Backed out changeset 7e708c1c9d9d (bug 1805182) for causing SessionHistory related failures. 2023-01-19 19:37:59 +02:00
Sean Feng 930130580b Bug 1805182 - Fix the bug where postData is lost when the LoadingSessionHistoryEntry is replaced for redirect r=peterv
The postData should be carried over when we replace the
LoadingSessionHistoryEntry for the redirect.

Differential Revision: https://phabricator.services.mozilla.com/D166176
2023-01-19 15:34:47 +00:00
Emilio Cobos Álvarez 2a47aa3103 Bug 1569439 - Cleanup tooltip pref handling. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D166943
2023-01-19 10:28:28 +00:00
Adam Vandolder 1267f7d14f Bug 1509346 - Add support for <form rel>. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D166489
2023-01-18 16:41:04 +00:00
Edgar Chen b7397e64ea Bug 1794622; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161133
2023-01-17 20:22:16 +00:00
Butkovits Atila a7d3e99d52 Backed out changeset 704407d7ca31 (bug 1509346) for causing wpt failures at put-forwards.html. 2023-01-17 20:04:52 +02:00
Adam Vandolder 629f0f42e1 Bug 1509346 - Add support for <form rel>. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D166489
2023-01-17 16:11:06 +00:00
Artur Iunusov c4ec4d7309 Bug 1671548 - Remove fission experiment support code and prefs, r=smaug,
r=tritter

- backed out changesets: 1660057, 1667426, 1674214,
1669749, 1685801, 1667381
- fission.experiment support removed everywhere, including telemetry

Differential Revision: https://phabricator.services.mozilla.com/D165169
2023-01-17 10:05:36 +00:00
Sandor Molnar 06e631d4a6 Backed out changeset 5ad22146a015 (bug 1509346) for causing failures in docshell/base/nsDocShell.cpp 2023-01-17 03:16:20 +02:00
Adam Vandolder b2b544c7ed Bug 1509346 - Add support for <form rel>. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D166489
2023-01-16 21:32:19 +00:00
Mark Banner d691c51a0d Bug 1808173 - Convert prompts imports to direct ES imports. r=Gijs,webdriver-reviewers,necko-reviewers,application-update-reviewers,credential-management-reviewers,valentin,whimboo,dimi,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D165794
2023-01-16 13:32:20 +00:00
Nika Layzell 7955f931fa Bug 1808630 - Part 3: Handle cross-group system openers in BrowsingContext::FindWithName, r=smaug
This is possible in test situations, as a content document with a system
principal can call methods like window.open on a chrome document, which has a
different BCG. Treat these cross-group calls like they're coming from the
target document.

Differential Revision: https://phabricator.services.mozilla.com/D166120
2023-01-09 22:22:06 +00:00
Narcis Beleuzu 83d927b5f0 Backed out changeset 30d7636620f8 (bug 1804684) as req by smaug 2023-01-09 22:51:57 +02:00
Emilio Cobos Álvarez aedb1cbcd6 Bug 1808748 - Add a browsing context flag to force the top level chrome browsing context to remain active. r=nika
This will be useful for bug 1770429.

Differential Revision: https://phabricator.services.mozilla.com/D166105
2023-01-09 16:38:47 +00:00
lyavor b91a327df6 Bug 1804684 - Fragment navigation may change document URI scheme from https to http r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D165282
2023-01-05 21:26:43 +00:00
Sean Feng d3a8f2d77f Bug 1791083 - Unset the hover state when a page enters BFCache r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D165894
2023-01-04 22:53:07 +00:00
lyavor a1593f002b Bug 1802505 - Add disable next line for all docshell/test/mochitest and docshell/test/chrome r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D164229
2022-12-29 12:24:15 +00:00
Sylvestre Ledru 1f8d23143a Bug 1802288 - remove trailing whitespaces in idl/webidl files r=credential-management-reviewers,webidl,smaug,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D165559
2022-12-28 09:52:44 +00:00
Olli Pettay 2e25a827e0 Bug 1804295 - Remove the current use of favorPerformanceHint, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163964
2022-12-27 13:12:21 +00:00
Valentin Gosu df13492ee4 Bug 1596845 - Make DNSServices available as `Services.dns` r=necko-reviewers,webdriver-reviewers,kershaw
Depends on D164347

Differential Revision: https://phabricator.services.mozilla.com/D164856
2022-12-23 09:26:17 +00:00
Marian-Vasile Laza 56b22ee0ba Backed out 9 changesets (bug 1596845) for causing xpcshell failures on test_trr_enterprise_policy.js. CLOSED TREE
Backed out changeset 231acfc052bb (bug 1596845)
Backed out changeset 7d02dad4d720 (bug 1596845)
Backed out changeset b0449eec2671 (bug 1596845)
Backed out changeset 5cd033c9ef7c (bug 1596845)
Backed out changeset 98d583f1d19e (bug 1596845)
Backed out changeset b78bc0049605 (bug 1596845)
Backed out changeset 88919aaff89b (bug 1596845)
Backed out changeset f4adb3e7b8e1 (bug 1596845)
Backed out changeset b171f7ac0b40 (bug 1596845)
2022-12-23 09:21:39 +02:00
Valentin Gosu 6ca2987fe1 Bug 1596845 - Make DNSServices available as `Services.dns` r=necko-reviewers,webdriver-reviewers,kershaw
Depends on D164347

Differential Revision: https://phabricator.services.mozilla.com/D164856
2022-12-23 01:20:03 +00:00
Sandor Molnar 56d5efdcae Backed out 9 changesets (bug 1596845) for causing mochitest failures in browser/base/content/test/about/browser_aboutCertError_telemetry.js
Backed out changeset eb1e34c3041f (bug 1596845)
Backed out changeset af6d41439c60 (bug 1596845)
Backed out changeset f1447dd8df04 (bug 1596845)
Backed out changeset a383f2bbcaae (bug 1596845)
Backed out changeset 950c66dd6133 (bug 1596845)
Backed out changeset ab300239fd69 (bug 1596845)
Backed out changeset 8e1fe024b680 (bug 1596845)
Backed out changeset 80e5048d1f35 (bug 1596845)
Backed out changeset b14a4910d73b (bug 1596845)
2022-12-23 00:56:35 +02:00
Valentin Gosu ff04cde9bd Bug 1596845 - Make DNSServices available as `Services.dns` r=necko-reviewers,webdriver-reviewers,kershaw
Depends on D164347

Differential Revision: https://phabricator.services.mozilla.com/D164856
2022-12-22 21:16:07 +00:00
Andreas Farre 95de092629 Bug 1745645 - Set the value for HasActivePeerConnections early. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D165400
2022-12-22 16:53:54 +00:00
Norisz Fay acaf348a8b Backed out changeset 6b39ac73fb99 (bug 1804803) for causing build bustages CLOSED TREE 2022-12-21 14:37:39 +02:00
Peter Van der Beken 2e0e3168ab Bug 1804803 - Hit MOZ_CRASH(DocumentLoadListener::Open for invalid history entry due to mismatch of 'Invalid LoadId'). r=smaug
When we start the load for a reload, check that the entry we're trying to
reload is still connected to session history.

Differential Revision: https://phabricator.services.mozilla.com/D165049
2022-12-21 10:48:38 +00:00
lyavor b28d8cdf5f Bug 1731210 - pdf.js modal for unsaved data on a pdf page appears twice in private window r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D153612
2022-12-20 13:31:07 +00:00
Matthias Camenzind c341905d11 Bug 1786048 - Part 4: Remove cross process SizeShellTo. r=emilio
Because the parent process lacks information about the current shell
size, the child has to send both the current and the new shell size to
the parent. The parent then applies the delta to the window size. This
can produce different results for calls with the same arguments,
whenever a previous call did not have enough time to update the child
with its new size.

The implementation is replaced by applying the delta in the child.

Differential Revision: https://phabricator.services.mozilla.com/D160261
2022-12-15 23:13:01 +00:00
Matthias Camenzind c9300fab1e Bug 1786048 - Part 3: Merge nsIEmbeddingSiteWindow into nsIBaseWindow. r=emilio
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().

This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.

Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".

GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.

nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().

The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).

Differential Revision: https://phabricator.services.mozilla.com/D160260
2022-12-15 23:13:00 +00:00
Matthias Camenzind 5ca3ed6b88 Bug 1786048 - Part 2: Use layout device pixels for AppWindow primary content size. r=emilio
The getter used to return CSS pixels, while the setter expected layout
device pixels. The nsIDocShellTreeOwner documentation used to suggest that
CSS pixels are used for getters and setters of the primary content and
the root shell size. Only the getter for the primary content size
happend to match that documentation.

Differential Revision: https://phabricator.services.mozilla.com/D161944
2022-12-15 23:13:00 +00:00
Andrew McCreight ce28c41da0 Bug 1805931, part 2 - Automated removal of uses of ROOT and UNROOT CC macros. r=smaug
As of the prior patch, these are no longer needed. I removed
these with a script, then ran clang-format on the files, then
manually reverted a few unrelated changed from the formatter.

Differential Revision: https://phabricator.services.mozilla.com/D164829
2022-12-15 19:45:01 +00:00
Tom Schuster bf618bbc4a Bug 1774866 - Always allow cloning error stacks. r=nika,sfink,smaug
Differential Revision: https://phabricator.services.mozilla.com/D164577
2022-12-15 19:03:53 +00:00
Emilio Cobos Álvarez a14c746228 Bug 1805415 - Use activateItem() rather than click() to activate menuitems. r=Gijs,extension-reviewers,pip-reviewers,search-reviewers
Bug 1805414 will move menu event handling to the DOM.

With that change the current synthetic click behavior of XUL menuitems
breaks. On current central, we rely on nsMenuFrame::HandleEvent not
getting called at all for synthetic clicks, and instead we just fire a
command event synchronously here:

  https://searchfox.org/mozilla-central/rev/a0d4f8f112c5c792ae272bf6ce50763ddd23ffa2/dom/xul/nsXULElement.cpp#1071

After my patch the command event is fired properly (potentially
asynchronously too) by the regular menu activation machinery, which is
preferable.

 * They fire a command event synchronously (even though on some
   platforms like macOS activating a context menu item is async).

 * They use a totally different codepath from what a user does.

 * They don't deal with native menus, etc.

We have a proper API for this (activateItem) which takes a much more
closer codepath to what users do, requires that the menu is shown, etc.
Use that API instead for testing.

As a benefit, tests now do not need to close the context menu manually
when clicking on a menu item (because we trigger the same code path as
users clicking the menu).

Differential Revision: https://phabricator.services.mozilla.com/D164567
2022-12-15 03:11:55 +00:00
Cristian Tuns b638ccfac9 Backed out 2 changesets (bug 1805415) for causing dt failures on browser_net_telemetry_throttle_changed.js CLOSED TREE
Backed out changeset 5056d7df9f1e (bug 1805415)
Backed out changeset e13513500184 (bug 1805415)
2022-12-14 08:52:21 -05:00
Emilio Cobos Álvarez be1f057109 Bug 1805415 - Use activateItem() rather than click() to activate menuitems. r=Gijs,extension-reviewers,pip-reviewers,search-reviewers
Bug 1805414 will move menu event handling to the DOM.

With that change the current synthetic click behavior of XUL menuitems
breaks. On current central, we rely on nsMenuFrame::HandleEvent not
getting called at all for synthetic clicks, and instead we just fire a
command event synchronously here:

  https://searchfox.org/mozilla-central/rev/a0d4f8f112c5c792ae272bf6ce50763ddd23ffa2/dom/xul/nsXULElement.cpp#1071

After my patch the command event is fired properly (potentially
asynchronously too) by the regular menu activation machinery, which is
preferable.

 * They fire a command event synchronously (even though on some
   platforms like macOS activating a context menu item is async).

 * They use a totally different codepath from what a user does.

 * They don't deal with native menus, etc.

We have a proper API for this (activateItem) which takes a much more
closer codepath to what users do, requires that the menu is shown, etc.
Use that API instead for testing.

As a benefit, tests now do not need to close the context menu manually
when clicking on a menu item (because we trigger the same code path as
users clicking the menu).

Differential Revision: https://phabricator.services.mozilla.com/D164567
2022-12-14 10:25:17 +00:00
Adam Vandolder 78234d7b22 Bug 1402292 - Ignore form submission attempt to navigate from already navigated document. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D163723
2022-12-12 16:15:25 +00:00
lyavor eb81c040db Bug 1801843 - Add disable next line for all docshell/test/browser r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D162713
2022-12-08 12:41:59 +00:00
Gijs Kruitbosch ec920ad31c Bug 1804512 - convert SessionStoreFunctions.jsm to sys.mjs ES module, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D164117
2022-12-08 09:51:18 +00:00
Sandor Molnar a1e9c1d43b Backed out 4 changesets (bug 1786048) for causing multiple failures. CLOSED TREE
Backed out changeset ae94135e68ef (bug 1786048)
Backed out changeset f505df8a481a (bug 1786048)
Backed out changeset 999a18d6f33e (bug 1786048)
Backed out changeset e71e8644b8a9 (bug 1786048)
2022-12-02 20:30:07 +02:00
Matthias Camenzind 2d534f1a5a Bug 1786048 - Part 4: Remove cross process SizeShellTo. r=emilio
Because the parent process lacks information about the current shell
size, the child has to send both the current and the new shell size to
the parent. The parent then applies the delta to the window size. This
can produce different results for calls with the same arguments,
whenever a previous call did not have enough time to update the child
with its new size.

The implementation is replaced by applying the delta in the child.

Differential Revision: https://phabricator.services.mozilla.com/D160261
2022-12-02 16:47:46 +00:00
Matthias Camenzind 562af0a9b4 Bug 1786048 - Part 3: Merge nsIEmbeddingSiteWindow into nsIBaseWindow. r=emilio
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().

This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.

Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".

GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.

nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().

The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).

Differential Revision: https://phabricator.services.mozilla.com/D160260
2022-12-02 16:47:46 +00:00
Matthias Camenzind d5275b050e Bug 1786048 - Part 2: Use layout device pixels for AppWindow primary content size. r=emilio
The getter used to return CSS pixels, while the setter expected layout
device pixels. The nsIDocShellTreeOwner documentation used to suggest that
CSS pixels are used for getters and setters of the primary content and
the root shell size. Only the getter for the primary content size
happend to match that documentation.

Differential Revision: https://phabricator.services.mozilla.com/D161944
2022-12-02 16:47:45 +00:00
Manuel Bucher b7aff527da Bug 1771867 - Early Hints Phase 2 - Part 8: Add list of open channels from OngoingEarlyHints to RedirectToRealChannelArgs r=necko-reviewers,valentin,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D161179
2022-12-02 16:15:56 +00:00
Martin Robinson abb5044ca7 Bug 1803377 - Rename the values of the `IntrinsicDirty` enum r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163607
2022-12-02 12:27:31 +00:00
Csoregi Natalia 5a260d61a4 Backed out 13 changesets (bug 1771867) for causing CanonicalBrowsingContext crashes. CLOSED TREE
Backed out changeset 120838b58449 (bug 1771867)
Backed out changeset aea7ca0bbd17 (bug 1771867)
Backed out changeset 2fe2afdee09d (bug 1771867)
Backed out changeset 8bdb1f682d22 (bug 1771867)
Backed out changeset a9f3158ed688 (bug 1771867)
Backed out changeset 1177913e1edf (bug 1771867)
Backed out changeset d33ccbbf407d (bug 1771867)
Backed out changeset 110ac12e16f5 (bug 1771867)
Backed out changeset 7f20525f5e94 (bug 1771867)
Backed out changeset b3d65b1aa872 (bug 1771867)
Backed out changeset 7cdf3cef2773 (bug 1771867)
Backed out changeset 5090eae24a5c (bug 1771867)
Backed out changeset f8a03d226c73 (bug 1771867)
2022-12-02 13:44:55 +02:00
Manuel Bucher 95a28e77f3 Bug 1771867 - Early Hints Phase 2 - Part 8: Add list of open channels from OngoingEarlyHints to RedirectToRealChannelArgs r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161179
2022-12-02 09:45:27 +00:00
Nika Layzell bca0a6965b Bug 1793463 - Part 4: Generate static components entries for protocols, r=necko-reviewers,xpcom-reviewers,valentin,kmag
This adds a new set of options to static components.conf files to allow
specifying the protocol flags and default ports of a protocol handler, and
generates a separate table just for this purpose.

This will be used in the next part as part of replacing the existing protocol
handler lookup infrastructure.

Differential Revision: https://phabricator.services.mozilla.com/D162803
2022-12-01 15:43:19 +00:00
Kris Maglione d41332a044 Bug 1797219 - Bump the timeout limit of browser_onbeforeunload test again. r=nika
Splitting the test wasn't enough to prevent the frequent timeouts, and there really isn't a sensible way to split it any further.

Differential Revision: https://phabricator.services.mozilla.com/D163502
2022-11-30 21:12:10 +00:00
Marian-Vasile Laza bec56391bf Backed out 4 changesets (bug 1786048) for causing bc failures on browser_modal_resize.js. CLOSED TREE
Backed out changeset 318a2d2e6e39 (bug 1786048)
Backed out changeset 17a9990d6d19 (bug 1786048)
Backed out changeset 205f129c648a (bug 1786048)
Backed out changeset 0750c885a688 (bug 1786048)
2022-12-01 05:00:38 +02:00
Matthias Camenzind 1238151864 Bug 1786048 - Part 4: Remove cross process SizeShellTo. r=emilio
Because the parent process lacks information about the current shell
size, the child has to send both the current and the new shell size to
the parent. The parent then applies the delta to the window size. This
can produce different results for calls with the same arguments,
whenever a previous call did not have enough time to update the child
with its new size.

The implementation is replaced by applying the delta in the child.

Differential Revision: https://phabricator.services.mozilla.com/D160261
2022-11-30 19:37:17 +00:00
Matthias Camenzind 81ce314e5c Bug 1786048 - Part 3: Merge nsIEmbeddingSiteWindow into nsIBaseWindow. r=emilio
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().

This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.

Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".

GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.

nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().

The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).

Differential Revision: https://phabricator.services.mozilla.com/D160260
2022-11-30 19:37:16 +00:00
Matthias Camenzind 08f5c2d5b0 Bug 1786048 - Part 2: Use layout device pixels for AppWindow primary content size. r=emilio
The getter used to return CSS pixels, while the setter expected layout
device pixels. The nsIDocShellTreeOwner documentation used to suggest that
CSS pixels are used for getters and setters of the primary content and
the root shell size. Only the getter for the primary content size
happend to match that documentation.

Differential Revision: https://phabricator.services.mozilla.com/D161944
2022-11-30 19:37:16 +00:00
Marian-Vasile Laza 7492025127 Backed out 7 changesets (bug 1793463) for causing bustages on nsIOService.cpp. CLOSED TREE
Backed out changeset 47c3acb30de2 (bug 1793463)
Backed out changeset 71afe900eb17 (bug 1793463)
Backed out changeset d168599a269e (bug 1793463)
Backed out changeset d0f18d300818 (bug 1793463)
Backed out changeset a116e6f089f2 (bug 1793463)
Backed out changeset eba1123c8b56 (bug 1793463)
Backed out changeset 68a3eb8a3057 (bug 1793463)
2022-12-01 02:30:02 +02:00
Nika Layzell 90f7562d95 Bug 1793463 - Part 4: Generate static components entries for protocols, r=necko-reviewers,xpcom-reviewers,valentin,kmag
This adds a new set of options to static components.conf files to allow
specifying the protocol flags and default ports of a protocol handler, and
generates a separate table just for this purpose.

This will be used in the next part as part of replacing the existing protocol
handler lookup infrastructure.

Differential Revision: https://phabricator.services.mozilla.com/D162803
2022-11-30 18:13:42 +00:00
Olli Pettay c142ec355c Bug 1798780, ensure we don't evict the current frameloader, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D163391
2022-11-30 15:38:00 +00:00
Nika Layzell 39cfe43333 Bug 1538028 - Part 4: Pass TriggeringRemoteType through the frontend, r=Gijs,emilio
Propagate the ability to pass triggeringRemoteType through the desktop frontend
in various places, such that it is set when using the context menu or content
click handler.

Differential Revision: https://phabricator.services.mozilla.com/D161834
2022-11-29 20:41:46 +00:00
Nika Layzell 34e62a0d9c Bug 1538028 - Part 2: Track TriggeringRemoteType through nsDocShellLoadState and LoadInfo, r=smaug,ckerschb,necko-reviewers,valentin
This is done using slightly different mechanisms for each of LoadInfo and
nsDocShellLoadState, and will be used in the next part to validate document
loads based on the RemoteType responsible for the load.

For subresource loads, the TriggeringRemoteType is fairly straightforward - it
is the process which created the channel. We can handle this by getting the
current remote type when creating the channel, and then using the remote type
of the sending process when receiving the LoadInfo over IPC to either replace
the triggering remote type, or validate it.

For document loads, the situation is a bit more complex, as there are at least
3 (potentially-)different processes responsible for different parts of the
navigation:

 1. The "Triggering Process" is the process which provided the URI to load.
    This is also the process which provides the Triggering Principal. This is
    the process being tracked in this patch.

 2. The "Loading Process" is the process which actually creates the channel and
    starts the load. This may be the same as the triggering process, or may be
    a different process starting the navigation on behalf of the triggering
    process. In general this is the process hosting the current docshell,
    though it may be the parent process in the case of parent-initiated loads.

 3. The "Final Process" is the process which receives the response and renders
    the final document. This isn't known at channel creation time, and is
    determined by the result principal and process isolation policy.

This change uses a serializer and special field on nsDocShellLoadState to track
the "Triggering Process" for the load, even as the load state is serialized
between processes by tracking which loads were sent into which content
processes, and matching them up when the parent process sees them again. The
information is then copied into the LoadInfo before configuring the real
channel, so it can be used for security checks.

The "Triggering Process" is overridden to be the parent process for history
loads, as history loads are often started in processes which wouldn't normally
be able to navigate to those pages. This is OK thanks to the changes in part 1
which validate history loads against the real session history when SHIP is
enabled.

Differential Revision: https://phabricator.services.mozilla.com/D161198
2022-11-29 20:41:45 +00:00
Nika Layzell 03335b6d32 Bug 1538028 - Part 1: Validate SHIP history loads in DocumentLoadListener, r=smaug,necko-reviewers,valentin
With SHIP, we have a copy of the actual SessionHistoryEntry which is
responsible for a history load locally within the parent process. Using this,
we can validate any session history loads coming from the content process to
ensure that they correspond to actual outstanding history loads.

We can't do this for non-SHIP loads, as session history exists only within the
content process.

Differential Revision: https://phabricator.services.mozilla.com/D161197
2022-11-29 20:41:44 +00:00
Olli Pettay e9dd1d0c7b Bug 1803152, destroy nsFrameLoader asynchronously when destroyed from SessionHistoryEntry's/SHEntrySharedParentState's destructor. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D163344
2022-11-29 18:01:14 +00:00
Nika Layzell 3c3be46ec8 Bug 1798986 - Track UnstrippedURI in SessionHistory, r=smaug,timhuang
Previously, we tracked UnstrippedURI on the nsDocShellLoadState and LoadInfo,
and manually filled it in to match the previous load when doing a
LOAD_CMD_RELOAD in nsDocShell. It is more consistent with other load types to
instead store the information in the load state, allowing it to be handled
consistently for reloads and other history operations.

Unfortunately, this patch has some extra complexity right now, as it needs to
support both SHIP and non-SHIP session history. This should disappear in the
future when we switch to using exclusively SHIP.

Differential Revision: https://phabricator.services.mozilla.com/D161196
2022-11-25 22:09:46 +00:00
Greg Stoll 5265544a3f Bug 1793834 - part 1/12: adding a mostly-empty about:windows-messages page r=Gijs,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D161148
2022-11-22 03:44:51 +00:00
Cristian Tuns fc0780ef1b Backed out 10 changesets (bug 1793834, bug 1801724) for causing mochitest failures in browser_preferences_usage.js CLOSED TREE
Backed out changeset 89c9e4e1c3ad (bug 1801724)
Backed out changeset 9130ed00888e (bug 1793834)
Backed out changeset 34f582bdc341 (bug 1793834)
Backed out changeset c34df1dc8ff8 (bug 1793834)
Backed out changeset 2ae1429c886a (bug 1793834)
Backed out changeset a49eff0693ce (bug 1793834)
Backed out changeset 034466342a3b (bug 1793834)
Backed out changeset 2d19fa85af4e (bug 1793834)
Backed out changeset d16ff7dbd155 (bug 1793834)
Backed out changeset a39300a8ddff (bug 1793834)
2022-11-21 17:30:12 -05:00
Greg Stoll 0e9cbaa4d2 Bug 1793834 - part 1/12: adding a mostly-empty about:windows-messages page r=Gijs,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D161148
2022-11-21 19:15:53 +00:00
Mark Banner 7e3d560461 Bug 1791974 - Use setAsDefault* parameters where appropriate for consumers of SearchTestUtils.installSearchExtension. r=mcheang
Differential Revision: https://phabricator.services.mozilla.com/D161045
2022-11-18 14:30:27 +00:00
Mark Banner 7dbd48b340 Bug 1791974 - Add set as default (private) search engine options to SearchTestUtils.promiseNewSearchEngine. r=mcheang
Differential Revision: https://phabricator.services.mozilla.com/D161043
2022-11-18 14:30:26 +00:00
Mark Banner a9ec0b8434 Bug 1799314 - Convert consumers of testing modules to import ES modules direct (uriloader/ dom/ docshell/). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161909
2022-11-17 12:00:28 +00:00