50 Commits

Author SHA1 Message Date
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
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
0f77a9c6c1 Bug 1963059 - Add helpers to get associated document. r=jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D247046
2025-04-29 09:33:18 +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
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
Jan-Niklas Jaeschke
ae4587e34f Bug 1959971 - Navigation API: Replaced JS::Value with JS::Handle<JS::Value>. r=tschuster
Differential Revision: https://phabricator.services.mozilla.com/D245234
2025-04-11 13:36:25 +00:00
Jan-Niklas Jaeschke
815536bfb7 Bug 1959379 - Navigation API: Implement #maybe-set-the-ongoing-non-traverse-api-method-tracker. r=farre,dom-core
This patch also implements `#add-an-upcoming-traverse-api-method-tracker`,
since the code is almost identical.

Differential Revision: https://phabricator.services.mozilla.com/D244907
2025-04-11 09:06:14 +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
0ca12ef4cb Bug 1959643 - Check if document is fully active. r=jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D245061
2025-04-10 17:01:19 +00:00
Andreas Farre
3ad1ffcc23 Bug 1948249 - Implement NavigateEvent.scroll. r=dom-core,jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D242702
2025-04-10 17:01:19 +00:00
Andreas Farre
d726fbee03 Bug 1949499 - Fire navigate error in #inner-navigate-event-firing-algorithm. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D243412
2025-04-10 17:01:18 +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
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
b407a6139e Bug 1948249 - Implement NavigateEvent.scroll. r=dom-core,jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D242702
2025-04-09 14:19:38 +00:00
Andreas Farre
d9c6378bb0 Bug 1949499 - Fire navigate error in #inner-navigate-event-firing-algorithm. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D243412
2025-04-09 14:19:38 +00: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
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
Andreas Farre
fedd7dee20 Bug 1948254 - Part 3: Fix DOMEventTargetHelper creation. r=smaug
Also fix getters protocol usage and add asserts when null returning
getters actually have been checked implicitly.

Also add spec links and shorten multipage to single page links.

Differential Revision: https://phabricator.services.mozilla.com/D239874
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
Andreas Farre
a9a50fd039 Bug 1948254 - Part 3: Fix DOMEventTargetHelper creation. r=smaug
Also fix getters protocol usage and add asserts when null returning
getters actually have been checked implicitly.

Also add spec links and shorten multipage to single page links.

Differential Revision: https://phabricator.services.mozilla.com/D239874
2025-03-18 16:24:25 +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
Andreas Farre
48bae6c36e Bug 1948254 - Part 3: Fix DOMEventTargetHelper creation. r=smaug
Also fix getters protocol usage and add asserts when null returning
getters actually have been checked implicitly.

Also add spec links and shorten multipage to single page links.

Differential Revision: https://phabricator.services.mozilla.com/D239874
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
Andreas Farre
de94bf84be Bug 1948254 - Part 3: Fix DOMEventTargetHelper creation. r=smaug
Also fix getters protocol usage and add asserts when null returning
getters actually have been checked implicitly.

Also add spec links and shorten multipage to single page links.

Differential Revision: https://phabricator.services.mozilla.com/D239874
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
Andreas Farre
6249dabd29 Bug 1948254 - Part 3: Fix DOMEventTargetHelper creation. r=smaug
Also fix getters protocol usage and add asserts when null returning
getters actually have been checked implicitly.

Also add spec links and shorten multipage to single page links.

Differential Revision: https://phabricator.services.mozilla.com/D239874
2025-03-14 16:12:47 +00:00
Andreas Farre
e799552132 Bug 1951592 - Initial about:blank with fragment should have entries disabled. r=avandolder
Differential Revision: https://phabricator.services.mozilla.com/D240291
2025-03-11 15:03:22 +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
Adam Vandolder
2007a1348b Bug 1895254 - Prototype the Navigation API WebIDL. r=farre,dom-core,peterv
Differential Revision: https://phabricator.services.mozilla.com/D210088
2024-07-24 04:56:35 +00:00
Stanca Serban
228aadad49 Backed out changeset c634fecd6270 (bug 1895254) for causing build bustages in Navigation.cpp. 2024-07-24 07:27:32 +03:00
Adam Vandolder
b6218e2851 Bug 1895254 - Prototype the Navigation API WebIDL. r=farre,dom-core,peterv
Differential Revision: https://phabricator.services.mozilla.com/D210088
2024-07-24 03:44:15 +00:00
Sandor Molnar
ea3243f101 Backed out changeset 455d12dff44e (bug 1895254) for causing android wpt crashes @ /html/dom/idlharness.https.html CLOSED TREE 2024-07-19 22:47:01 +03:00
Adam Vandolder
5850778c78 Bug 1895254 - Prototype the Navigation API WebIDL. r=farre,dom-core,peterv
Differential Revision: https://phabricator.services.mozilla.com/D210088
2024-07-19 15:16:40 +00:00
Cosmin Sabou
ef5a7d3fda Backed out changeset 1b14354719c0 (bug 1895254) for causing bustages on NavigationTransition. CLOSED TREE 2024-07-19 00:20:49 +03:00
Adam Vandolder
48629bb869 Bug 1895254 - Prototype the Navigation API WebIDL. r=farre,dom-core,peterv
Differential Revision: https://phabricator.services.mozilla.com/D210088
2024-07-18 18:10:40 +00:00
Stanca Serban
bb3aa3a009 Backed out changeset 04ca9845721e (bug 1895254) for causing multiple failures. CLOSED TREE 2024-07-17 23:10:14 +03:00
Adam Vandolder
8ead4811f0 Bug 1895254 - Prototype the Navigation API WebIDL. r=farre,dom-core,peterv
Differential Revision: https://phabricator.services.mozilla.com/D210088
2024-07-17 17:58:27 +00:00