Commit Graph
4545 Commits
Author SHA1 Message Date
Andreas Farre 91a14bd037 Bug 1991265 - Make push to replace load conversion follow spec. r=smaug
Make sure that navigations from Location and Window.open perform correct
conversion of history handling when passed "auto".

Differential Revision: https://phabricator.services.mozilla.com/D266519
2025-10-03 07:51:56 +00:00
Alexandru Marc 07a3bf3fb5 Revert "Bug 1991265 - Make push to replace load conversion follow spec. r=smaug" for causing multiple failures
This reverts commit 9dd79a9a56.
2025-10-02 23:54:32 +00:00
Andreas Farre 9dd79a9a56 Bug 1991265 - Make push to replace load conversion follow spec. r=smaug
Make sure that navigations from Location and Window.open perform correct
conversion of history handling when passed "auto".

Differential Revision: https://phabricator.services.mozilla.com/D266519
2025-10-02 22:36:01 +00:00
Jan-Niklas Jaeschke ca92e249b8 Bug 1991847 - Navigation API: Rename log module to "NavigationAPI". r=farre
Differential Revision: https://phabricator.services.mozilla.com/D266967
2025-10-01 08:39:01 +00:00
Adam Vandolder 71c8b086b9 Bug 1985937 - Always abort ongoing all navigations before firing navigate events. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D266364
2025-09-26 17:36:09 +00:00
Frédéric Wang 9a0ef0f5ea Bug 1986632 - Exempt (isolated) WebExtension content scripts from trusted types policies. r=smaug,webidl,robwu,dom-worker-reviewers,asuth
This is a follow-up of bug 1947732, covering the remaining Trusted Types checks:

- Document.write/writeln
- WorkerGlobalScope.importScripts
- eval and new Functions
- script enforcement
- pre-navigation check

Differential Revision: https://phabricator.services.mozilla.com/D263688
2025-09-26 17:34:04 +00:00
Adam Vandolder 61b0a7116b Bug 1988927 - Part 2: Use inherited principal URIs when performing same-origin checks for about:blank entries for the Navigation API. r=farre,smaug,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D265048
2025-09-24 13:25:25 +00:00
Maurice Dauer 70b9c571f2 Bug 1419501 - Part 4: Implement framebusting intervention, r=fluent-reviewers,desktop-theme-reviewers,tabbrowser-reviewers,bolsson,edgar,mstriemer,sfoster,sthompson,emz
Differential Revision: https://phabricator.services.mozilla.com/D254680
2025-09-10 11:18:40 +00:00
Jan-Niklas Jaeschke 02b345eb14 Bug 1959960, part 3 - Navigation API: Implement #performing-a-navigation-api-traversal. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D259215
2025-09-08 15:10:52 +00:00
Sandor Molnar 9769da1b4a Revert "Bug 1959960, part 4 - Navigation API: Update test expectations. r=farre" for causing bc failures
This reverts commit efa9033dd3.

Revert "Bug 1959960, part 3 - Navigation API: Implement #performing-a-navigation-api-traversal. r=smaug"

This reverts commit d6cb3b2867.

Revert "Bug 1959960, part 2 - Navigation API: Add log messages for navigation methods. r=farre"

This reverts commit 5b352fa6e0.

Revert "Bug 1959960, part 1 - Navigation API: Implement traversal methods. r=farre,dom-core,smaug"

This reverts commit f1667a9dd5.
2025-09-08 13:36:28 +00:00
Jan-Niklas Jaeschke d6cb3b2867 Bug 1959960, part 3 - Navigation API: Implement #performing-a-navigation-api-traversal. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D259215
2025-09-08 11:44:30 +00:00
Frédéric Wang 28019bcafa Bug 1986598 - Do not display load error for pre-navigation check failures. r=smaug
On Android this avoids redirection to a page with "Unknown" failures.

Differential Revision: https://phabricator.services.mozilla.com/D263868
2025-09-05 14:23:48 +00:00
Adam Vandolder e14ccda161 Bug 1985547 - Fix getting contiguous SHEs for traverse navigations. r=farre,jjaschke,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D262802
2025-09-03 01:11:09 +00:00
Andreas Farre 719cb70bf9 Bug 1985711 - Force navigation.navigate() to not be a replace load. r=jjaschke
When handling subframe history we will change push loads to be replace
loads while executing an onload handler. This shouldn't happen for
navigation.navigate().

Differential Revision: https://phabricator.services.mozilla.com/D262892
2025-08-28 12:38:00 +00:00
Atila Butkovits db7dd214e0 Revert "Bug 1985711 - Force navigation.navigate() to not be a replace load. r=jjaschke" for causing failures at nsDocShellLoadState.cpp.
This reverts commit fd99e98623.
2025-08-28 08:45:43 +00:00
Andreas Farre fd99e98623 Bug 1985711 - Force navigation.navigate() to not be a replace load. r=jjaschke
When handling subframe history we will change push loads to be replace
loads while executing an onload handler. This shouldn't happen for
navigation.navigate().

Differential Revision: https://phabricator.services.mozilla.com/D262892
2025-08-28 07:27:05 +00:00
Andreas Farre 66d0f29617 Bug 1959389 - Finish handling aborting/finishing navigations. r=jjaschke
Implement #inform-the-navigation-api-about-child-navigable-destruction.
Add the final calls to #set-the-ongoing-navigation and tweak some of the
existing ones to only happen during history traversals or only during
navigation.

Differential Revision: https://phabricator.services.mozilla.com/D262564
2025-08-27 07:43:27 +00:00
agoloman b5247f5ded Revert "Bug 1959389 - Finish handling aborting/finishing navigations. r=jjaschke" for causing test_load_history_entry.html.
This reverts commit 0ab5ef40be.
2025-08-26 14:46:28 +00:00
Andreas Farre 0ab5ef40be Bug 1959389 - Finish handling aborting/finishing navigations. r=jjaschke
Implement #inform-the-navigation-api-about-child-navigable-destruction.
Add the final calls to #set-the-ongoing-navigation and tweak some of the
existing ones to only happen during history traversals or only during
navigation.

Differential Revision: https://phabricator.services.mozilla.com/D262564
2025-08-26 13:34:32 +00:00
Tom Schuster 5279fec432 Bug 1982032 - Add LoadURIOption to force loading as a MediaDocument r=necko-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D260472
2025-08-25 14:00:23 +00:00
Jan-Niklas Jaeschke 21e4d07f86 Bug 1976017 - Navigation API: Check for same origin directly without creating principals. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D261550
2025-08-20 08:41:26 +00:00
Jan-Niklas Jaeschke 6361f7c48a Bug 1983786 - Navigation API: Compare session history infos by key, not by sharedId. r=farre
The `SharedId()` value is per top-level navigation, not per child navigation.

Differential Revision: https://phabricator.services.mozilla.com/D261549
2025-08-20 08:41:22 +00:00
Adam Vandolder 4861a19296 Bug 1896630 - Part 2: Create a NavigationActivation when initializing the navigation. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D260715
2025-08-19 20:42:17 +00:00
Serban Stanca bf2a7914c1 Revert "Bug 1896630, Bug 1982978 - Part 2: Create a NavigationActivation when initializing the navigation. r=farre" for causing build bustages in NavigationUtils.cpp.
This reverts commit 8fd2c382b2.

This reverts commit 9c5344ab7d.

This reverts commit 1ba55636f7.
2025-08-19 17:00:52 +00:00
Adam Vandolder 8fd2c382b2 Bug 1896630 - Part 2: Create a NavigationActivation when initializing the navigation. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D260715
2025-08-19 15:45:39 +00:00
Andreas Farre a9dce94db8 Bug 1983546 - Fire the navigate event correctly for history navigations. r=jjaschke
In the same manner as with beforeunload we track when we need to fire a
traverse navigate event for the top level window context. This is
required when: any event handlers are registered on the window's
navigation object or when there are any ongoing or upcoming method
trackers associated with a window's navigation object.

Also make sure to not fire a push/replace/reload navigate event when
only a traverse navigate event should be fired.

Differential Revision: https://phabricator.services.mozilla.com/D261408
2025-08-18 17:00:43 +00:00
agoloman fd52d60e8c Revert "Bug 1896630 - Part 2: Create a NavigationActivation when initializing the navigation. r=farre,dom-core" for causing build bustages @RefPtr.h.
This reverts commit 5ab4a68520.

Revert "Bug 1896630 - Part 1: Implement the fields of NavigationActivation. r=farre,dom-core"

This reverts commit 90a32b3f1d.
2025-08-14 00:39:41 +00:00
Adam Vandolder 5ab4a68520 Bug 1896630 - Part 2: Create a NavigationActivation when initializing the navigation. r=farre,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D260715
2025-08-13 23:46:50 +00:00
Andreas Farre be84ee4323 Bug 1981468 - Preemptively send contiguous entries for initial load r=avandolder,smaug
Differential Revision: https://phabricator.services.mozilla.com/D260139
2025-08-11 16:27:08 +00:00
Andreas Farre 974897256b Bug 1982009 - MaybeFireTraverseHistory should bail if browsing context is top. r=jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D260459
2025-08-11 06:09:52 +00:00
Andreas Farre daadf811fd Bug 1981494 - Use the correct origin comparison for firing navigate event. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D260154
2025-08-06 21:42:39 +00:00
Emilio Cobos Álvarez 8cd79d0bd4 Bug 1977581 - Cleanup nsIBaseWindow::GetMainWidget usage. r=smaug
AppWindow::GetMainWidget() is just mWindow. Add a helper to simplify
GetMainWidget() usage and use it across the tree, simplifying users.

Differential Revision: https://phabricator.services.mozilla.com/D258744
2025-08-05 09:19:20 +00:00
Tom Schuster 11aaf102b9 Bug 1978315 - Stop using the type attribute of HTML anchors as a content type hint. r=dom-core,edgar
Differential Revision: https://phabricator.services.mozilla.com/D258176
2025-07-23 09:03:23 +00:00
Jan-Niklas Jaeschke be58e08268 Bug 1959961, part 3 - Navigation API: Add flag to nsDocShell::Stop() whether to unset the ongoing navigation. r=farre,dom-core
`nsDocShell::Stop()` is called in `nsDocShell::InternalLoad()`, and would abort
ongoing navigations. Adding this flag to that specific call site
prevents this and keeps the intended behavior.

Differential Revision: https://phabricator.services.mozilla.com/D255144
2025-07-22 12:59:15 +00:00
Tom Schuster 1406694934 Bug 1974417 - Remove the dom.security.setdocumenturi preference. r=aiunusov
Differential Revision: https://phabricator.services.mozilla.com/D257223
2025-07-16 06:49:34 +00:00
Fatih Kilic eed44c4862 Bug 1968607 - Part 1: Replace CSP with PolicyContainer. r=tschuster,webidl,smaug
We are making changes to many files. Very huge chunk of the changes are just renaming CSP -> PolicyContainer. Part 1 and part 2 are solely separated as frontend and backend. The unfortunate thing is, I mistakenly placed IDL changes in part 1, and many of those IDL changes affect frontend code too. I'm sorry for this inconvinience and hard to review patch(es).

(FWIW before this rewrite we had another patch stack. It is 25 patches and I believe isn't as comprehensive as this one. It also didn't replace CSP's inheritance but was copied alongside with CSP, but we decided to change our method and make policy conttainer contain CSP and copy it around after some discussion and reviews)

Differential Revision: https://phabricator.services.mozilla.com/D249248
2025-07-11 05:39:17 +00:00
Florian Quèze f1db5f38c7 Bug 1960567 - Migrate histograms to use Glean APIs for PAGE_LOAD_ERROR, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D255544
2025-07-08 11:38:27 +00:00
Tim Huang b31768b095 Bug 1970169 - Stop commit partitionedPrincipal when doing SessionHistoryCommit. r=smaug,necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D255761
2025-07-08 09:01:15 +00:00
Andreas Farre 7cb502cd86 Bug 1965192 - Fire traverse navigation event. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D255834
2025-07-07 18:28:03 +00:00
Atila Butkovits a452d0c595 Revert "Bug 1965192 - Fire traverse navigation event. r=smaug" for causing failures at browser_bug1415918_beforeunload_options.js.
This reverts commit 0252f8d0c6.
2025-07-04 13:10:04 +00:00
Andreas Farre 0252f8d0c6 Bug 1965192 - Fire traverse navigation event. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D255834
2025-07-04 11:11:10 +00:00
Frédéric Wang be953ead58 Bug 1915629 - Implement Trusted Types support for the "pre-navigation check". r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D243819
2025-07-02 09:57:26 +00:00
Alexandru Marc 65c806031e Revert "Bug 1915629 - Implement Trusted Types support for the "pre-navigation check". r=smaug" for causing wpt failures @ trusted-types-navigation.html
This reverts commit bc9ae28a41.
2025-07-02 09:32:20 +00:00
Frédéric Wang bc9ae28a41 Bug 1915629 - Implement Trusted Types support for the "pre-navigation check". r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D243819
2025-07-02 07:35:32 +00:00
Alexandru Marc a5e6c398bd Revert "Bug 1915629 - Implement Trusted Types support for the "pre-navigation check". r=smaug" for causing build bustages @ nsDocShell.cpp
This reverts commit 1db2095b87.
2025-07-02 07:19:54 +00:00
Frédéric Wang 1db2095b87 Bug 1915629 - Implement Trusted Types support for the "pre-navigation check". r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D243819
2025-07-02 06:39:39 +00:00
Emilio Cobos Álvarez 000efad397 Bug 1971573 - Propagate the "css-specified" bit as well from nsDocShell::Embed. r=tnikkel,layout-reviewers
Not sure how to create a reduced test-case for this. This is not very
problematic in any case since the canvas bg will only last while the
presshell is not initialized.

Differential Revision: https://phabricator.services.mozilla.com/D255656
2025-07-02 06:10:05 +00:00
Atila Butkovits 1f3cbcb36c Revert "Bug 1915629 - Implement Trusted Types support for the "pre-navigation check". r=smaug" for causing failures at nsDocShell.cpp.
This reverts commit 13b8b00847.
2025-07-01 21:31:31 +00:00
Frédéric Wang 13b8b00847 Bug 1915629 - Implement Trusted Types support for the "pre-navigation check". r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D243819
2025-07-01 20:35:56 +00:00
agoloman ba849fe40a Revert "Bug 1959961, part 4 - Navigation API: Update test expectations. r=farre" for causing build bustages @Navigation.cpp.
This reverts commit 1c7513c5e5.

Revert "Bug 1959961, part 3 - Navigation API: Add flag to `nsIWebNavigation::Stop()` whether to unset the ongoing navigation. r=farre,dom-core"

This reverts commit 66456a158d.

Revert "Bug 1959961, part 2 - Navigation API: Implement #navigate. r=farre,dom-core"

This reverts commit a79033733d.

Revert "Bug 1959961, part 1 - Navigation API: Implement #dom-navigation-navigate. r=farre,dom-core"

This reverts commit f04b5a3c99.
2025-06-30 21:04:09 +00:00