Commit Graph

4320 Commits

Author SHA1 Message Date
Nika Layzell
7bfb0e8915 Bug 1971140 - Improve Content-Disposition: attachment handling for object/embed, r=smaug a=dmeehan
Differential Revision: https://phabricator.services.mozilla.com/D253075
2025-06-12 21:45:19 +00:00
Alexandru Marc
2b5b645133 Revert "Bug 1966658 - Populate the partitionedPrincipal to the SessionHistoryEntry in the parent process. r=smaug,sessionstore-reviewers,core-sessionstore-reviewers,farre"
This reverts commit 52c31c4da0.
2025-05-22 07:21:13 +00:00
Tim Huang
52c31c4da0 Bug 1966658 - Populate the partitionedPrincipal to the SessionHistoryEntry in the parent process. r=smaug,sessionstore-reviewers,core-sessionstore-reviewers,farre
In this patch, we populate the partitionedPrincipal when we commit
SessionHistory to the parent process. In addition, we remove the
serialization and deserialization of partitionedPrincipalToInherit in
sessionHistory.

Differential Revision: https://phabricator.services.mozilla.com/D250263
2025-05-22 02:06:53 +00:00
Tom Schuster
3f48655456 Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D250182
2025-05-21 15:21:52 +00:00
Serban Stanca
071240c3d9 Revert "Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw" for causing multiple failures.
This reverts commit b9a9491a35.
2025-05-21 13:34:54 +00:00
Tom Schuster
b9a9491a35 Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D250182
2025-05-21 12:24:10 +00:00
Andreas Farre
e10114d313 Bug 1962710 - Part 3: Fire NavigateEvent for regular navigations. r=smaug,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D249242
2025-05-19 09:03:54 +00:00
Andreas Farre
d2e41c93c1 Bug 1962710 - Part 2: Fire NavigateEvent for same document navigation. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D249241
2025-05-19 09:03:50 +00:00
Andreas Farre
b81eda9a8a Bug 1966349 - Make sure NavigateEvent is initialized correctly. r=jjaschke
Make sure the  properties downloadRequest and userInitiated get their
correct values.

Differential Revision: https://phabricator.services.mozilla.com/D249243
2025-05-14 15:39:26 +00:00
Andreas Farre
ff18eb8060 Bug 1964951 - Implement #inform-the-navigation-api-about-aborting-navigation. r=jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D248259
2025-05-07 15:45:01 +00:00
Andreas Farre
6ab0d18691 Bug 1964955 - Make sure NavigateEvent.intercept can execute. r=smaug
Intercept was prevented by four things:

1) the return value of FirePushReplaceReloadNavigateEvent for
   pushState was used inverted.
2) the event was created untrusted
3) the wrong flag was being checked to see if the event was in the
   process of being dispatched.
4) wrong uri equality method was used.

Differential Revision: https://phabricator.services.mozilla.com/D248222
2025-05-07 15:01:28 +00:00
Andreas Farre
d72145c63c Bug 1964671 - Fire download request navigate event. r=smaug
Download request navigate events are fired from
turn is called e.g from the activation behavior of a and area elements
in the case of a download attribute being present.

Also split nsContentUtils::TriggerLink into separate click and
mouse-over cases.

Differential Revision: https://phabricator.services.mozilla.com/D247903
2025-05-07 11:14:19 +00:00
Olli Pettay
5314cbddce Bug 1964782 - Restore loadType only when doing a page load, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D248108
2025-05-07 10:43:59 +00:00
Jan-Niklas Jaeschke
219b770510 Bug 1959959 - Navigation API: Implement navigation.reload(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D246587
2025-04-28 16:39:03 +00:00
Goloman Adrian
e16c16647c Backed out changeset f9641a70d2d6 (bug 1959959) for causing build bustages @nsDocShell.cpp. CLOSED TREE 2025-04-28 17:45:09 +03:00
Vincent Hilla
7f27d00f15 Bug 1962976 - Cancel lazy loading already in InternalLoad. r=sefeng,dom-core
According to the spec, canceling lazy loading should happen before
navigating to a fragment. If we cancel lazy loading in DoURILoad,
we won't cancel for same document navigation.

To my knowledge, this hasn't been an issue. But with sync-about-blank,
this would break wpt iframe-loading-lazy-nav-link-click-fragment.html.

Differential Revision: https://phabricator.services.mozilla.com/D234665
2025-04-28 14:25:52 +00:00
Jan-Niklas Jaeschke
d2f7141faf Bug 1959959 - Navigation API: Implement navigation.reload(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D246587
2025-04-28 13:58:38 +00:00
Andreas Farre
3c95e7d828 Bug 1948596 - Implement #can-have-its-url-rewritten. r=dom-core,edgar
This extracts common code from nsDocShell::AddState.

Differential Revision: https://phabricator.services.mozilla.com/D243069
2025-04-14 14:07:15 +00:00
Cristina Horotan
f37d6e55d5 Backed out changeset 24d97a7de216 (bug 1948596) for causing wpt failures at /the-history-interface/002.html. CLOSED TREE 2025-04-14 13:28:31 +03:00
Andreas Farre
1fb4036d4b Bug 1948596 - Implement #can-have-its-url-rewritten. r=dom-core,edgar
This extracts common code from nsDocShell::AddState.

Differential Revision: https://phabricator.services.mozilla.com/D243069
2025-04-14 09:12:44 +00:00
Cristina Horotan
1459daa033 Backed out changeset f1c03bf6c308 (bug 1948596) for causing wpt failures at the-history-interface/001.html CLOSED TREE 2025-04-11 23:15:55 +03:00
Andreas Farre
18f354fae7 Bug 1948596 - Implement #can-have-its-url-rewritten. r=dom-core,edgar
This extracts common code from nsDocShell::AddState.

Differential Revision: https://phabricator.services.mozilla.com/D243069
2025-04-11 15:59:27 +00:00
Stanca Serban
1e6954ca78 Backed out changeset 7f838c1e8e78 (bug 1948596) for causing multiple mochitests failures. CLOSED TREE 2025-04-11 10:24:03 +03:00
Andreas Farre
1de8bc2025 Bug 1948596 - Implement #can-have-its-url-rewritten. r=dom-core,edgar
This extracts common code from nsDocShell::AddState.

Differential Revision: https://phabricator.services.mozilla.com/D243069
2025-04-11 06:26:26 +00:00
Andreas Farre
fd007f974f Bug 1949204 - Implement #abort-the-ongoing-navigation. r=dom-core,sefeng
Differential Revision: https://phabricator.services.mozilla.com/D242954
2025-04-10 17:01:18 +00:00
Malte Jürgens
70681a65d0 Bug 1943577 - Consolidate IsHttpsOnlyModeEnabled and similar functions r=necko-reviewers,freddyb,simonf
Remove IsHttpsOnlyModeEnabled and IsHttpsFirstModeEnabled, and replace them with
GetUpgradeMode. With that, we are way more explicit about which mode is being
used right now, and have a clearer distinction between HTTPS-First and
schemeless HTTPS-First. We also eliminate the need to call
`loadInfo->GetOriginAttributes().IsPrivateBrowsing()` all the time.

Differential Revision: https://phabricator.services.mozilla.com/D233419
2025-04-09 16:47:50 +00:00
Cristina Horotan
88909b7d2a Backed out 4 changesets (bug 1948249, bug 1949204, bug 1897439, bug 1949499) for causign build bustage at NavigateEvent.h.
Backed out changeset 3d6f77552af3 (bug 1897439)
Backed out changeset a9843b92d309 (bug 1948249)
Backed out changeset cf1e6a0c7365 (bug 1949499)
Backed out changeset bd1a59a1dd98 (bug 1949204)
2025-04-09 18:22:09 +03:00
Andreas Farre
145bb770c9 Bug 1949204 - Implement #abort-the-ongoing-navigation. r=dom-core,sefeng
Differential Revision: https://phabricator.services.mozilla.com/D242954
2025-04-09 14:19:38 +00:00
Goloman Adrian
3c978e38e1 Backed out 2 changesets (bug 1943577) for causing xpc failures @test_trr.js. CLOSED TREE
Backed out changeset 419e96e0f9d4 (bug 1943577)
Backed out changeset 481ecd147fd0 (bug 1943577)
2025-04-08 18:26:30 +03:00
Malte Jürgens
f10f92c37d Bug 1943577 - Consolidate IsHttpsOnlyModeEnabled and similar functions r=necko-reviewers,freddyb,simonf
Remove IsHttpsOnlyModeEnabled and IsHttpsFirstModeEnabled, and replace them with
GetUpgradeMode. With that, we are way more explicit about which mode is being
used right now, and have a clearer distinction between HTTPS-First and
schemeless HTTPS-First. We also eliminate the need to call
`loadInfo->GetOriginAttributes().IsPrivateBrowsing()` all the time.

Differential Revision: https://phabricator.services.mozilla.com/D233419
2025-04-08 12:52:32 +00:00
kernp25
4d18975ff5 Bug 1945924 - Replace SchemeIsFoo functions with the inlined SchemeIs() call. r=valentin,emilio,necko-reviewers,geckoview-reviewers,anti-tracking-reviewers,core-sessionstore-reviewers,ohall,farre
No behavior change intended.

Differential Revision: https://phabricator.services.mozilla.com/D236756
2025-03-31 14:25:54 +00:00
Andreas Farre
e6dd45c1ae Bug 1948254 - Part 4: Implement #navigate-event-firing. r=webidl,smaug,jjaschke
This includes:

* #fire-a-traverse-navigate-event
* #fire-a-push/replace/reload-navigate-event
* #fire-a-download-request-navigate-event

which are all implemented in terms of #inner-navigate-event-firing-algorithm.

Actually calling any of the above is only added for History.pushState and
History.replaceState using #fire-a-push/replace/reload-navigate-event.

Differential Revision: https://phabricator.services.mozilla.com/D238786
2025-03-19 13:23:26 +00:00
Alexandru Marc
63b7a8e91a Backed out 4 changesets (bug 1948254) for causing hazard bustages @ Navigation.cpp CLOSED TREE
Backed out changeset 98ba043125fe (bug 1948254)
Backed out changeset 7061817d6823 (bug 1948254)
Backed out changeset 763b0331c48b (bug 1948254)
Backed out changeset de134481ec47 (bug 1948254)
2025-03-18 23:48:09 +02:00
Andreas Farre
a3594f5aec Bug 1948254 - Part 4: Implement #navigate-event-firing. r=webidl,smaug,jjaschke
This includes:

* #fire-a-traverse-navigate-event
* #fire-a-push/replace/reload-navigate-event
* #fire-a-download-request-navigate-event

which are all implemented in terms of #inner-navigate-event-firing-algorithm.

Actually calling any of the above is only added for History.pushState and
History.replaceState using #fire-a-push/replace/reload-navigate-event.

Differential Revision: https://phabricator.services.mozilla.com/D238786
2025-03-18 16:24:26 +00:00
Sandor Molnar
bfaffc7de8 Backed out 4 changesets (bug 1948254) for causing wpt & hazard failures @ Navigation.cpp / NavigateEvent CLOSED TREE
Backed out changeset f5ad49e89bc3 (bug 1948254)
Backed out changeset 640382d73264 (bug 1948254)
Backed out changeset a79c8bef5dc3 (bug 1948254)
Backed out changeset 4a26e79ce32e (bug 1948254)
2025-03-18 12:12:29 +02:00
Andreas Farre
f28fb7a59e Bug 1948254 - Part 4: Implement #navigate-event-firing. r=webidl,smaug
This includes:

* #fire-a-traverse-navigate-event
* #fire-a-push/replace/reload-navigate-event
* #fire-a-download-request-navigate-event

which are all implemented in terms of #inner-navigate-event-firing-algorithm.

Actually calling any of the above is only added for History.pushState and
History.replaceState using #fire-a-push/replace/reload-navigate-event.

Differential Revision: https://phabricator.services.mozilla.com/D238786
2025-03-18 08:17:44 +00:00
Norisz Fay
24465cfc3a Backed out 4 changesets (bug 1948254) for causing failure on idlharness.https.html CLOSED TREE
Backed out changeset 545c51e30bd9 (bug 1948254)
Backed out changeset 403e2c469af4 (bug 1948254)
Backed out changeset 05bbdc23154a (bug 1948254)
Backed out changeset 1f3acb6cf9cd (bug 1948254)
2025-03-17 22:15:33 +02:00
Andreas Farre
affa2a2beb Bug 1948254 - Part 4: Implement #navigate-event-firing. r=webidl,smaug
This includes:

* #fire-a-traverse-navigate-event
* #fire-a-push/replace/reload-navigate-event
* #fire-a-download-request-navigate-event

which are all implemented in terms of #inner-navigate-event-firing-algorithm.

Actually calling any of the above is only added for History.pushState and
History.replaceState using #fire-a-push/replace/reload-navigate-event.

Differential Revision: https://phabricator.services.mozilla.com/D238786
2025-03-17 16:28:56 +00:00
Alexandru Marc
e4fca80d91 Backed out 4 changesets (bug 1948254) for causing build bustages @ NavigateEvent.h
Backed out changeset 14269121caf3 (bug 1948254)
Backed out changeset e327d067c6a0 (bug 1948254)
Backed out changeset d13b8e53fb78 (bug 1948254)
Backed out changeset 3c4be02a9115 (bug 1948254)
2025-03-14 21:42:35 +02:00
Andreas Farre
a6acda2ef3 Bug 1948254 - Part 4: Implement #navigate-event-firing. r=webidl,smaug
This includes:

* #fire-a-traverse-navigate-event
* #fire-a-push/replace/reload-navigate-event
* #fire-a-download-request-navigate-event

which are all implemented in terms of #inner-navigate-event-firing-algorithm.

Actually calling any of the above is only added for History.pushState and
History.replaceState using #fire-a-push/replace/reload-navigate-event.

Differential Revision: https://phabricator.services.mozilla.com/D238786
2025-03-14 16:12:48 +00:00
Sean
dc7916e115 Bug 1937905 - Part 1: Add a neterror page for DOM indicating network errors due to invalid header values r=fluent-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D232846
2025-03-04 22:10:58 +00:00
Nika Layzell
085c732a5c Bug 1665474 - Part 9: Handle calls to browser.createAboutBlankDocumentViewer with http(s) principals, r=farre
It is possible for frontend JS to call this method on a browser element
with an http(s) principal. In this case, treat the new about:blank
document like it was created without a Origin-Agent-Cluster header, and
ensure the map is updated before the message to create the viewer is
sent into the content process.

Differential Revision: https://phabricator.services.mozilla.com/D238115
2025-03-03 22:51:30 +00:00
Edgar Chen
249820655d Bug 1937603 - Do not handle screen orientation on windowless browser; r=smaug
This patch reuses the existing but unused `mWindowless` flag. The flag is now
propagated to the BrowsingContext created under the windowless browser.

Differential Revision: https://phabricator.services.mozilla.com/D238584
2025-02-19 09:42:18 +00:00
Adam Vandolder
23e9c9915a Bug 1890747 - Track Navigation history entries. r=dom-core,farre
Differential Revision: https://phabricator.services.mozilla.com/D219007
2025-02-13 03:11:20 +00:00
Sean
c73aeda52c Bug 1325876 - Add a pref for showing internal error page for HTTP responses with error codes (4xx, 5xx) and Content-Length: 0 instead of blank page r=manuel,necko-reviewers,fluent-reviewers,jesup,bolsson,valentin,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D220193
2025-01-27 21:05:42 +00:00
Sean
11eae78bbe Bug 1763671 - Part 1: Add a preference to disable basic HTTP Auth r=necko-reviewers,fluent-reviewers,kershaw,valentin
Differential Revision: https://phabricator.services.mozilla.com/D225797
2025-01-27 16:19:31 +00:00
Florian Quèze
9bb52886b8 Bug 1935420 - Migrate histograms to use Glean APIs for BFCACHE_*, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D234182
2025-01-27 13:47:11 +00:00
Stanca Serban
149deaac25 Backed out 3 changesets (bug 1325876) for causing Linux related puppeteer failures. CLOSED TREE
Backed out changeset 2dcbd388c95f (bug 1325876)
Backed out changeset ba3a433729a6 (bug 1325876)
Backed out changeset 42f5ed6abce5 (bug 1325876)
2025-01-24 03:47:23 +02:00
Sean
5f773583d7 Bug 1325876 - Show internal error page for HTTP responses with error codes (4xx, 5xx) and Content-Length: 0 instead of blank page r=manuel,necko-reviewers,fluent-reviewers,jesup,bolsson,valentin,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D220193
2025-01-23 21:57:37 +00:00
Sean
3cbfca1937 Bug 1927594 - Part 1: Introduce better CORP headers aboutCertError messages r=necko-reviewers,fluent-reviewers,kershaw,valentin,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D228072
2025-01-21 19:46:52 +00:00