Commit Graph

9481 Commits

Author SHA1 Message Date
Andreas Farre
e98ce4b44b Bug 1926456 - Skip discarded contexts when setting synced field. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D226769
2024-10-24 12:47:34 +00:00
Florian Quèze
9c9981f0e3 Bug 1923028 - Migrate scalars to use Glean APIs for dom.*, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D226688
2024-10-24 10:52:57 +00:00
serge-sans-paille
53068cdf31 Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 09:06:01 +00:00
Alexandru Marc
83543f20f2 Backed out changeset 448597bce69d (bug 1922838) for causing build bustages. CLOSED TREE 2024-10-24 11:37:49 +03:00
serge-sans-paille
c7a369b29a Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 07:38:30 +00:00
Niklas Baumgardner
5319e76bba Bug 1873514 - Update about:neterror appearance and strings. r=Gijs,fluent-reviewers,desktop-theme-reviewers,bolsson,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D217621
2024-10-24 01:19:45 +00:00
Norisz Fay
7522822681 Backed out changeset 8ca46d175b64 (bug 1873514) for causing failures on browser_bug431826.js CLOSED TREE 2024-10-23 21:39:13 +03:00
Niklas Baumgardner
2ff5841fcc Bug 1873514 - Update about:neterror appearance and strings. r=Gijs,fluent-reviewers,desktop-theme-reviewers,bolsson,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D217621
2024-10-23 16:04:06 +00:00
Zach Hoffman
2396e77cb6 Bug 1544428 - Do not dispatch popstate or hashchange when hasRef changes. r=jjaschke,dom-core,sessionstore-reviewers,dao,farre
This behavior was already agreed upon in
<https://github.com/whatwg/html/issues/7386>, but bug 1544428 was an
implementation edge case needing to be fixed.

An exception is when the fragment contains a directive, in which case a
difference in `hasRef` is sufficient, to retain existing behavior WRT
directives.

Although bug 1544428 is about popstate, hashchange was erroneously being
dispatched, as well, which this patch fixes.

Some tests that depended on the old behavior are updated.

Differential Revision: https://phabricator.services.mozilla.com/D225567
2024-10-23 14:59:04 +00:00
Paul Zuehlcke
b2b283dc13 Bug 1921464 - Run RecordStatefulBounces on extended navigation end due to tab close. r=nika,anti-tracking-reviewers,manuel
Differential Revision: https://phabricator.services.mozilla.com/D226546
2024-10-23 14:07:25 +00:00
Emilio Cobos Álvarez
8c9a334e20 Bug 1925409 - Allow creating windows for printing even with coop. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D226466
2024-10-22 19:00:49 +00:00
Sandor Molnar
35bf70514b Backed out changeset a1f85b45abdf (bug 1873514) for causing bc failures @ browser_addCertException.js CLOSED TREE 2024-10-22 02:58:12 +03:00
Niklas Baumgardner
57431e5ed9 Bug 1873514 - Update about:neterror appearance and strings. r=Gijs,fluent-reviewers,desktop-theme-reviewers,bolsson,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D217621
2024-10-21 21:07:01 +00:00
Nika Layzell
460fbf9a53 Bug 1925653 - Don't restore from BFCache if navigated-from document has auxiliary BrowsingContexts, r=smaug
To implement BFCache in Gecko, we complete loads in new
BrowsingContextGroups when it would be invisible to the site. This
allows us to suspend the previous document and its entire
BrowsingContextGroup and restore it when navigating back through
history.

Unfortunately the current logic does not catch one web-visible case,
which is when a document is put into the BFCache, and then the next page
opens a named pop-up window. After navigating back to the previous page,
we switch back to the previous BrowsingContextGroup, and opening the
same named window will create a distinct pop-up.

This patch proposes avoiding this by not restoring a session history
entry from the BFCache when the navigating BrowsingContext has auxiliary
BrowsingContexts. This is done lazily, so if the pop-up is closed before
the back navigation (e.g. due to it being used for an oauth flow), it
will not invalidate the BFCache entry.

Differential Revision: https://phabricator.services.mozilla.com/D226184
2024-10-21 17:15:54 +00:00
Adi
fecccd7c3f Backed out 3 changesets (bug 1921810) for causing build bustages in AntiTrackingUtils.cpp. CLOSED TREE
Backed out changeset 823808ae582a (bug 1921810)
Backed out changeset 71de8c527b8b (bug 1921810)
Backed out changeset c7417d8d7fde (bug 1921810)
2024-10-17 16:44:30 +03:00
Tim Huang
3e41df3c19 Bug 1921810 - Part 2: Exposing UsingStorageAccess flag on WindowContext. r=nika
Depends on D224205

Differential Revision: https://phabricator.services.mozilla.com/D224206
2024-10-17 12:54:20 +00:00
Olli Pettay
651655bf7e Bug 1801586, bring back the old behavior when session-history-in-parent isn't enabled, r=peterv
bug 1717765 changed the behavior for non-SHIP too, and https://searchfox.org/mozilla-central/rev/d0c13bb2a9c3a9ab6f5eb5a23230161928b079d9/docshell/base/nsDocShell.cpp#6922
seems to rely on the old behavior. We need to have DocumentViewer always when restoring from bfcache, and non-SHIP doesn't deal with failure cases well.

No test for this (at least not yet).

Differential Revision: https://phabricator.services.mozilla.com/D225409
2024-10-16 13:14:50 +00:00
Andreas Farre
e3152c73f3 Bug 1903105 - Use waitForNewTab to await load completion. r=dom-core,sfarre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D225629
2024-10-16 09:43:41 +00:00
Emilio Cobos Álvarez
aa5bfc17fe Bug 1920357 - Ignore viewport meta tag when we're in RDM and we also force desktop viewport. r=devtools-reviewers,jdescottes
Currently DevTools doesn't do it, but it feels like the right API and is
already there. This allows fixing this on the devtools side however you
want :)

Differential Revision: https://phabricator.services.mozilla.com/D223627
2024-10-09 22:34:40 +00:00
Tamas Szentpeteri
8be45dd280 Backed out changeset 4b1409597101 (bug 1920718) for causing bp bustages on rapl.cpp. 2024-10-08 23:27:18 +03:00
serge-sans-paille
069a97307f Bug 1920718 - Annotate all global variable with runtime initialization as MOZ_RUNINIT r=application-update-reviewers,media-playback-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,gfx-reviewers,aosmond,lina,nalexander,aabh
This annotation is only understood by our clang-tidy plugin. It has no
effect on regular compilation.

Differential Revision: https://phabricator.services.mozilla.com/D223341
2024-10-08 16:49:51 +00:00
Emilio Cobos Álvarez
9a77da4bfc Bug 1922956 - Further clean-up widget creation code-paths. r=win-reviewers,mac-reviewers,geckoview-reviewers,mstange,rkraesig,m_kato
This is all super-hacky (see a lot of the XXXcjones comments).

Simplify it... We never create widgets with a bare native parent but no
nsIWidget parent. Pass nsIWidgets and deal with things correctly.

There were also things that were dealing with stuff that can't happen,
like top level popups, children of PuppetWidgets, or such.

Instead of overriding Create(), let's just teach nsBaseWidget about
non-native (headless/puppet) widgets.

Remove lots of old APIs for the native window stuff that are unused
and/or unimplemented.

Differential Revision: https://phabricator.services.mozilla.com/D224613
2024-10-07 16:43:53 +00:00
Timothy Nikkel
07fd87a61c Bug 1922983. Avoid useless QI in nsDocShell::Get/SetWindowDraggingAllowed on every paint in content process. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D224671
2024-10-07 10:27:11 +00:00
Iulian Moraru
b546e74055 Backed out changeset 4888b2f651bc (bug 1921972) for causing multiple failures. CLOSED TREE 2024-10-06 23:50:12 +03:00
Emilio Cobos Álvarez
48b17848c6 Bug 1921972 - Don't add external protocol navigations to the loadgroup. r=smaug,necko-reviewers
Much like we do with downloads (bug 1656925), these don't unload the
current document.

This prevents them from having mismatched flags, which asserts, see the
test-case.

Differential Revision: https://phabricator.services.mozilla.com/D224606
2024-10-06 19:33:02 +00:00
Peter Van der Beken
3fe6a7a9b7 Bug 1920960 - Simplify nsDocShellLoadState::CalculateChannelLoadFlags argument. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D223499
2024-10-02 12:26:40 +00:00
Sean Feng
151f98f073 Bug 1889406 - Notify the focus/active BC to content process for subframes when BrowserParent is first created r=dom-core,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D221534
2024-09-19 17:10:51 +00:00
William Wen
be5526492f Bug 1913000 - Add more rate limiting to History interface. r=webidl,smaug,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D221255
2024-09-19 16:09:02 +00:00
Noemi Erli
b0877dbd19 Backed out changeset 1f04fc7b4c57 (bug 1889406) for causing build bustages CLOSED TREE 2024-09-19 18:00:59 +03:00
Sean Feng
e1837680c4 Bug 1889406 - Notify the focus/active BC to content process for subframes when BrowserParent is first created r=dom-core,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D221534
2024-09-19 13:36:42 +00:00
Andreas Farre
c9273c1acb Bug 1919704 - Only test for url hash when checking text directive. r=dom-core,jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D222745
2024-09-19 08:52:24 +00:00
Andreas Farre
10a07d73c7 Bug 1909022 - Allow more recursive load checks. r=smaug,necko-reviewers,valentin
Don't limit recursive checks to only happen for original src
loads. They're very likely to be loads of 'about:blank' and later
followed by the actual load. Make sure to check the following loads as
well.

Differential Revision: https://phabricator.services.mozilla.com/D222485
2024-09-18 09:46:55 +00:00
Andreas Farre
ff63578440 Bug 1909698 - Use URI from session history when coming out from bfcache. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D222118
2024-09-17 12:17:38 +00:00
Nicolas Chevobbe
6cc15139bc Bug 1916589 - Add forcedColorsOverride flag to BrowsingContext. r=emilio.
Depends on D221773

Differential Revision: https://phabricator.services.mozilla.com/D221334
2024-09-17 10:17:57 +00:00
Iulian Moraru
f88a40ddc9 Backed out changeset 05fceb07f800 (bug 1909698) for causing wpt crashes/assertions. CLOSED TREE 2024-09-16 23:28:38 +03:00
Andreas Farre
8e0af05cc0 Bug 1909698 - Use URI from session history when coming out from bfcache. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D222118
2024-09-16 17:38:10 +00:00
keithamus
d1ae47b9d6 Bug 1888729 - Implement CloseWatcher interface r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D206169
2024-09-16 17:08:53 +00:00
Adam Vandolder
fbac3f82fa Bug 1917369 - Track user interaction state in docshell's active entry. r=dom-core,peterv
Differential Revision: https://phabricator.services.mozilla.com/D221389
2024-09-12 13:12:58 +00:00
Andreas Farre
5189f36e6f Bug 1916559 - Only store pending uninvoked directives for same document navigation. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D221637
2024-09-12 06:02:24 +00:00
Emilio Cobos Álvarez
60fad39eb9 Bug 1911977 - Don't abort networking activity on external protocol navigations. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D221029
2024-09-10 15:22:04 +00:00
Emilio Cobos Álvarez
69d03391c0 Bug 1911977 - Minor clean-ups in nsDocShell::InternalLoad. r=smaug
Use const and the same style for download and JS checks.

Differential Revision: https://phabricator.services.mozilla.com/D221028
2024-09-05 17:08:39 +00:00
Butkovits Atila
90dc3743ea Backed out 2 changesets (bug 1911977) for causing failures at browser_thumbnails_bg_bad_url.js. CLOSED TREE
Backed out changeset 564fe3a44acf (bug 1911977)
Backed out changeset d142c4f64ae7 (bug 1911977)
2024-09-05 04:19:21 +03:00
Emilio Cobos Álvarez
7dbf811c63 Bug 1911977 - Don't abort networking activity on external protocol navigations. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D221029
2024-09-04 20:18:55 +00:00
Emilio Cobos Álvarez
a2778c9033 Bug 1911977 - Minor clean-ups in nsDocShell::InternalLoad. r=smaug
Use const and the same style for download and JS checks.

Differential Revision: https://phabricator.services.mozilla.com/D221028
2024-09-04 20:18:55 +00:00
Sean Feng
c1347b2cbe Bug 1882670 - Cancel the loading=lazy iframe when it's load via a different way r=emilio,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D218143
2024-09-04 14:06:47 +00:00
Cristina Horotan
219dd93d86 Backed out changeset d232f991af6a (bug 1882670) for causing cdp failures at frame.spec.js CLOSED TREE 2024-09-04 02:35:14 +03:00
Sean Feng
93b336b8f9 Bug 1882670 - Cancel the loading=lazy iframe when it's load via a different way r=emilio,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D218143
2024-09-03 19:34:36 +00:00
Nika Layzell
793f001a6e Bug 1914594 - Move docshell.newWindowTarget to be on LoadInfo, r=necko-reviewers,kershaw
Previously, this was passed around using the nsHashPropertyBag base
class on HTTP channels. In bug 1907269, this base was added to
nsExtProtocolChannel to support reading this property for external
protocols.

This unfortunately ended up not working when a HTTP channel redirects to
an external protocol, as the hash property propagation logic in
nsHttpChannel happens after the check that the target channel is a HTTP
channel, so the property was lost when redirecting to an external
protocol.

Rather than refactoring HTTP redirect logic, this patch simplifies by
moving the property onto the LoadInfo where it will be trivially
preserved across redirects, and available in the places which need it.

Because the nsHashPropertyBag base is no longer required for
nsExtProtocolChannel, it is also removed.

Differential Revision: https://phabricator.services.mozilla.com/D220744
2024-09-03 16:00:23 +00:00
Valentin Gosu
458409e041 Bug 1888494 - Make CanonicalBrowsingContext::FixupAndLoadURIString check set the correct TRR mode r=nika
It would seem sometimes in Firefox 77 we regressed the ability to set the TRR
mode for a browsing context when opening a new tab.
I confirmed that this bug didn't happen in Fx 77 when setting the
`browser.tabs.documentchannel.parent-initiated` pref to `false`.

The nsIWebNavigation::LOAD_FLAGS_DISABLE_TRR is correctly passed into
CanonicalBrowsingContext, but it doesn't end up getting used.

This sets the appropriate DefaultLoadFlags for BrowsingContext
when the LOAD_FLAGS_DISABLE_TRR or LOAD_TRR_ONLY_MODE flags are present
in nsDocShellLoadState::LoadFlags()

Differential Revision: https://phabricator.services.mozilla.com/D220550
2024-09-03 13:07:59 +00:00
Olli Pettay
e1fad67026 Bug 1914513 - Add a pref to disable mutation events, r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D219934
2024-09-02 13:29:57 +00:00