Commit Graph

9516 Commits

Author SHA1 Message Date
Andrew McCreight
67817a936e Bug 1931877, part 2 - Replace 2 arg MOZ_DIAGNOSTIC_ASSERT(false) with MOZ_DIAGNOSTIC_CRASH. r=necko-reviewers,win-reviewers,glandium,rkraesig,valentin
Differential Revision: https://phabricator.services.mozilla.com/D229361
2024-11-20 16:37:50 +00:00
Andreas Farre
b0a345167c Bug 1931418 - Test that navigation isn't blocked due to recursive iframes. r=jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D229586
2024-11-20 12:11:46 +00:00
Andreas Farre
b9d8dbcb9e Bug 1931418 - Reduce the amount of recursion checks. r=dom-core,sefeng
Modify the frame recursion check to only happen when a load is triggered
from a src or data attribute (depending on if it's an iframe, embed or
an object element). This prevents recursion checks from blocking
ordinary navigations and navigations with a target.

Differential Revision: https://phabricator.services.mozilla.com/D229503
2024-11-20 12:11:46 +00:00
Peter Van der Beken
11b2d4633a Bug 1927517 - Assertion failure: !(result & nsContentUtils::eParseHTMLInteger_ErrorOverflow), at /builds/worker/checkouts/gecko/docshell/base/nsDocShell.cpp:5231. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D227520
2024-11-20 09:58:50 +00:00
Oliver Medhurst
474755f54b Bug 1879820 - Consume user activation when clicking link opens a new window; r=smaug,zcorpan
Differential Revision: https://phabricator.services.mozilla.com/D201373
2024-11-19 08:19:04 +00:00
John Bieling
9f26ffa179 Bug 1921426 - Restore tabs.onUpdated event for missing protocol handler pages. r=robwu,smaug
Differential Revision: https://phabricator.services.mozilla.com/D224214
2024-11-18 21:15:08 +00:00
Jonathan Watt
94330c8368 Bug 1931496. Some missed contentViewer to documentViewer renames. r=baku DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D229104
2024-11-15 11:01:18 +00:00
Zach Hoffman
b7416c0ecc Bug 266554 - Send Referer header on refresh. r=peterv,ckerschb,dom-core,smaug
This applies for refreshes resulting from either a `<meta>` refresh or
the Refresh header. Referrer Policy is honored.

Because exposing the referrer in a new place could have privacy
implications, this behavior is gated behind a disabled pref until
anti-tracking has been considered in bug 1928294.

Some WPTs that D227450 touches are cleaned up a bit.

Differential Revision: https://phabricator.services.mozilla.com/D227450
2024-11-14 16:27:34 +00:00
Zach Hoffman
316ab8d1b7 Bug 266554 - Use document ReferrerInfo for refreshes. r=peterv,ckerschb,dom-core,smaug
When ReferrerInfo is exposed later in the patch set, using the document
referrer info instead of mReferrerInfo will matter, but for now,
behavior should be unchanged.

Optional argument aSendReferrer for the ReferrerInfo constructor is
added. Because the existing behavior of InitWithDocument setting
mSendReferrer to true is acceptable in all other cases, the
aSendReferrer argument is not passed to InitWithDocument and
nsIReferrerInfo.idl is unchanged.

Unused method ReferrerInfo::CloneWithNewSendReferrer is removed.

Differential Revision: https://phabricator.services.mozilla.com/D227449
2024-11-14 15:53:26 +00:00
Zach Hoffman
a8c6d8f284 Bug 266554 - Ensure document is non-null in nsDocShell::ForceRefreshURI. r=peterv,dom-core,smaug
This should be safe to do because Refreshes are applied only to
documents and not to subresources.

Differential Revision: https://phabricator.services.mozilla.com/D227448
2024-11-14 03:56:29 +00:00
Butkovits Atila
8bcc60af69 Backed out 3 changesets (bug 266554) for causing failures at subresource.any.worker.html. CLOSED TREE
Backed out changeset 4df11a91b7ce (bug 266554)
Backed out changeset 20e57705bd19 (bug 266554)
Backed out changeset 031663eb54ba (bug 266554)
2024-11-14 05:33:02 +02:00
Zach Hoffman
9d26826a63 Bug 266554 - Send Referer header on refresh. r=peterv,ckerschb,dom-core,smaug
This applies for refreshes resulting from either a `<meta>` refresh or
the Refresh header. Referrer Policy is honored.

Because exposing the referrer in a new place could have privacy
implications, this behavior is gated behind a disabled pref until
anti-tracking has been considered in bug 1928294.

Some WPTs that D227450 touches are cleaned up a bit.

Differential Revision: https://phabricator.services.mozilla.com/D227450
2024-11-14 02:09:02 +00:00
Zach Hoffman
39159ab795 Bug 266554 - Use document ReferrerInfo for refreshes. r=peterv,ckerschb,dom-core,smaug
When ReferrerInfo is exposed later in the patch set, using the document
referrer info instead of mReferrerInfo will matter, but for now,
behavior should be unchanged.

Optional argument aSendReferrer for the ReferrerInfo constructor is
added. Because the existing behavior of InitWithDocument setting
mSendReferrer to true is acceptable in all other cases, the
aSendReferrer argument is not passed to InitWithDocument and
nsIReferrerInfo.idl is unchanged.

Unused method ReferrerInfo::CloneWithNewSendReferrer is removed.

Differential Revision: https://phabricator.services.mozilla.com/D227449
2024-11-14 02:09:02 +00:00
Zach Hoffman
f3a2e4ff74 Bug 266554 - Ensure document is non-null in nsDocShell::ForceRefreshURI. r=peterv,dom-core,smaug
This should be safe to do because Refreshes are applied only to
documents and not to subresources.

Differential Revision: https://phabricator.services.mozilla.com/D227448
2024-11-14 02:09:01 +00:00
Simon Friedberger
ee24230231 Bug 1919544 - Do not HTTPS-First upgrade URLs with http:// scheme r=mak,necko-reviewers,urlbar-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228588
2024-11-13 17:15:57 +00:00
Sandor Molnar
f796cfe131 Backed out changeset c4dfee1f9194 (bug 1919544) for causing bc failures @ browser_UrlbarInput_formatValue.js CLOSED TREE 2024-11-13 15:20:39 +02:00
Simon Friedberger
3f59148693 Bug 1919544 - Do not HTTPS-First upgrade URLs with http:// scheme r=mak,necko-reviewers,urlbar-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228588
2024-11-13 11:44:43 +00:00
Emilio Cobos Álvarez
7f6f3db9dc Bug 1930425 - Dump JS stack when trying to incorrectly set activeness. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D228615
2024-11-12 15:41:41 +00:00
Emilio Cobos Álvarez
73ba109df2 Bug 1927967 - Use typed units for nsDocumentViewer bounds. r=hiro,dholbert
SVG is fine because it always uses an effective DPI of 1. The rest
already use and assume layout pixels.

Differential Revision: https://phabricator.services.mozilla.com/D228120
2024-11-06 12:37:39 +00:00
Iulian Moraru
3e09eabd4e Backed out 10 changesets (bug 1928672, bug 1922020) for causing mochitest-plain failures on test_different_domain_in_hierarchy.html. CLOSED TREE
Backed out changeset c7c93c34f516 (bug 1928672)
Backed out changeset 4e6a8bea3574 (bug 1922020)
Backed out changeset 11718a55e298 (bug 1922020)
Backed out changeset ff0655d8a6a9 (bug 1922020)
Backed out changeset cabd41ab53e4 (bug 1922020)
Backed out changeset 88eac74dbe86 (bug 1922020)
Backed out changeset ea5096fafb29 (bug 1922020)
Backed out changeset 852d8a2132c8 (bug 1922020)
Backed out changeset e66184701c85 (bug 1922020)
Backed out changeset f52eb9bf4d08 (bug 1922020)
2024-11-05 01:46:32 +02:00
Benjamin VanderSloot
5d5153ea5c Bug 1928672 - Enable xorigin BroadcastChannel in docshell/test/mochitest/test_form_restoration.html so it doesn't rely on heuristics - r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D227670
2024-11-04 20:38:41 +00:00
Tim Huang
b44205e450 Bug 1921810 - Part 2: Exposing UsingStorageAccess flag on WindowContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D224206
2024-11-04 14:52:15 +00:00
Goloman Adrian
4373312425 Backed out 10 changesets (bug 1928672, bug 1922020) for causing bc failures @browser_permissionPropagation.js. CLOSED TREE
Backed out changeset 48e75896365c (bug 1928672)
Backed out changeset efa4047d526e (bug 1922020)
Backed out changeset 3df5f4781f39 (bug 1922020)
Backed out changeset 23e201efd3b8 (bug 1922020)
Backed out changeset 4c05fa56cf47 (bug 1922020)
Backed out changeset 43f97ae7eb6f (bug 1922020)
Backed out changeset 5e14c27894de (bug 1922020)
Backed out changeset cf506f71a542 (bug 1922020)
Backed out changeset e034708dee92 (bug 1922020)
Backed out changeset 787a649b70b8 (bug 1922020)
2024-11-04 18:11:34 +02:00
Benjamin VanderSloot
b8983f191f Bug 1928672 - Enable xorigin BroadcastChannel in docshell/test/mochitest/test_form_restoration.html so it doesn't rely on heuristics - r=smaug
Depends on D224821

Differential Revision: https://phabricator.services.mozilla.com/D227670
2024-11-04 13:04:43 +00:00
serge-sans-paille
8a0a0f7524 Bug 1920718 - Annotate all global variable with runtime initialization attributes r=glandium,application-update-reviewers,media-playback-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,gfx-reviewers,aosmond,lina,nalexander,aabh,geckoview-reviewers,win-reviewers,gstoll,m_kato
MOZ_RUNINIT => initialized at runtime
MOZ_CONSTINIT => initialized at compile time
MOZ_GLOBINIT => initialized either at runtime or compile time, depending on template parameter, macro parameter etc
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-30 11:05:24 +00:00
Emilio Cobos Álvarez
6692e2b99f Bug 1927255 - More subtly deal with preserveLayers in inactive tabs. r=mconley
PreserveLayers is propagated to child frames, and it'd be nice if it
could be used just the same way it's used for the top level tab, to
avoid discarding the resources.

For the top level, if you call preserveLayers() you also need to have
renderLayers = true.

It'd be better long-term, perhaps, to have renderLayers and
preserveLayers in the parent BC. Happy to work on that refactoring if
you agree.

Testing wise, I don't think this is easily testable...

Differential Revision: https://phabricator.services.mozilla.com/D227000
2024-10-30 00:42:23 +00:00
Emilio Cobos Álvarez
f0c2b606ee Bug 1927219 - Set consistent opener policy for printing. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D226964
2024-10-30 00:25:37 +00:00
Adi
b216b75013 Backed out changeset 816825f333b7 (bug 1909110) for causing bc failures @ browser_bug575561.js. CLOSED TREE 2024-10-29 16:27:31 +02:00
Tom Schuster
bc6cb08955 Bug 1909110 - Apply CSP to media that would be loaded as a MediaDocument. r=necko-reviewers,nika,freddyb
Differential Revision: https://phabricator.services.mozilla.com/D221326
2024-10-29 13:05:25 +00:00
Benjamin VanderSloot
1c9da3ee9e Bug 1922020, part 3 - Remove reliance on window.opener storage access heuristic in user.js from docshell/test/navigation - r=smaug
The helper function here is derived from code you helped design when we were first enabling TCP in xorigin mochitests

Differential Revision: https://phabricator.services.mozilla.com/D224808
2024-10-29 11:47:34 +00:00
Benjamin VanderSloot
3b345a9b6d Bug 1922020, part 2 - Remove reliance on window.opener storage access heuristic in user.js from docshell/test/mochitest - r=smaug
The helper function here is derived from code you helped design when we were first enabling TCP in xorigin mochitests

Differential Revision: https://phabricator.services.mozilla.com/D224807
2024-10-29 11:47:33 +00:00
Norisz Fay
5b88f50ed1 Backed out changeset 5b4cea7ea948 (bug 1924861) for causing mochitest failures on test_ext_tabs_goBack_goForward.html, test_bug1300461.html CLOSED TREE 2024-10-29 04:57:43 +02:00
Adam Vandolder
262a8eb2f9 Bug 1924861 - Only show the first history entry if it has user interaction. r=dom-core,omc-reviewers,sessionstore-reviewers,dao,peterv,tabbrowser-reviewers,mviar,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D221390
2024-10-29 00:27:19 +00:00
serge-sans-paille
e54774d573 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-28 08:21:19 +00:00
Alexandru Marc
191ccbe7fe Backed out changeset d92f391b3b0c (bug 1922838) for backing out bug 1915351 2024-10-25 16:42:33 +03:00
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