Commit Graph
4354 Commits
Author SHA1 Message Date
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
Jan-Niklas Jaeschke 66456a158d Bug 1959961, part 3 - Navigation API: Add flag to nsIWebNavigation::Stop() whether to unset the ongoing navigation. r=farre,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D255144
2025-06-30 20:03:34 +00:00
Andreas Farre 24b6ece4cd Bug 1974197 - Abort ongoing navigate events when setting location.href. r=jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D255105
2025-06-26 12:11:21 +00:00
Andreas Farre 13847887d6 Bug 1973716 - Abort ongoing navigate events from #shared-history-push/replace-state-steps. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D254810
2025-06-25 08:29:29 +00:00
Tim Huang 464ccfa020 Bug 1968644 - Part 4: Populate triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags for loads. r=smaug,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D252445
2025-06-17 20:28:18 +00:00
agoloman a48b34690b Revert "Bug 1968644 - Part 10: Store JSCallingLocation and set the JSCallingLocation fallback for Media loads. r=emilio" for causing valgrid failures.
This reverts commit efd9a5ba48.

Revert "Bug 1968644 - Part 9: Add more tests for loads triggered by tracking scripts. r=valentin,anti-tracking-reviewers,emz"

This reverts commit 7d5c3e1c1c.

Revert "Bug 1968644 - Part 8: Populate the triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags for WebSocket requests. r=valentin,necko-reviewers"

This reverts commit 53a783a51e.

Revert "Bug 1968644 - Part 7: Add tests. r=necko-reviewers,anti-tracking-reviewers,emz,valentin"

This reverts commit e52f034955.

Revert "Bug 1968644 - Part 6: Populate triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags during channel creation. r=necko-reviewers,kershaw"

This reverts commit f564c21b37.

Revert "Bug 1968644 - Part 5: Populate triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags for CSS loads. r=emilio"

This reverts commit 8a8fd7bacc.

Revert "Bug 1968644 - Part 4: Populate triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags for loads. r=smaug,necko-reviewers"

This reverts commit 7b3ba3b668.

Revert "Bug 1968644 - Part 3: Populate the triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags for fetch requests. r=valentin,smaug"

This reverts commit 08f090244f.

Revert "Bug 1968644 - Part 2: Intorduce the ClassificationFlags to nsIClassifiedChannel.idl. r=dimi,necko-reviewers,valentin"

This reverts commit b8c01cd77c.

Revert "Bug 1968644 - Part 1: Introduce triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags to LoadInfo. r=necko-reviewers,kershaw"

This reverts commit a7619a72b4.
2025-06-17 14:27:29 +00:00
Tim Huang 7b3ba3b668 Bug 1968644 - Part 4: Populate triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags for loads. r=smaug,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D252445
2025-06-17 09:24:42 +00:00
Andreas Farre af8576d124 Bug 1971696 - Refactor nsDocShell::Reload. r=jjaschke,smaug
This inverts the relationship between nsDocShell::Reload and
nsDocShell::ReloadNavigable, making nsDocShell::Reload be exclusively
a UI operation and really only a thin wrapper around
nsDocShell::ReloadNavigable. Also change Location.reload to use
nsDocShell::ReloadNavigable.

Differential Revision: https://phabricator.services.mozilla.com/D253465
2025-06-17 09:10:10 +00:00
Nika Layzell 126f2e57eb Bug 1971630 - Skip subresource OnStateChange notifications for BCWebProgress, r=smaug
The changes from the previous patch to re-throttle OnStatusChange and
OnProgressChange appear to have not been enough. It appears that we are
also seeing a substantial amount of IPC overhead due to sending
OnStateChange notifications to the parent process for subresources, such
as images.

This re-adds some filtering (though it is still more relaxed than the
filtering was before bug 1963189) to OnStateChange notifications, so
that only notifications relevant to primary document loads will be sent
over IPC.

This particular filtering is done in the OnStateChange listener, as
listeners in the parent process may care about
STATE_IS_REDIRECTED_DOCUMENT, which cannot be filtered for at
registration time.

Differential Revision: https://phabricator.services.mozilla.com/D253411
2025-06-12 15:57:58 +00:00
Nika Layzell 283226060d Bug 1971140 - Improve Content-Disposition: attachment handling for object/embed, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D253075
2025-06-10 19:18:05 +00:00
Vincent Hilla 93b7c007a9 Bug 1971272 - Rename nsISHEntry.persist to transient and use it consistently. r=smaug,farre,dom-core,sessionstore-reviewers,core-sessionstore-reviewers
A transient entry will be replaced if a new entry is added on top.

This patch achieves multiple goals
- nsISHEntry.persist is renamed to transient and defined more precisely.
- aPersist is removed as argument to several methods.
  - Instead, we call SetTransient() directly on the entry.
  - These methods mostly forwarded aPersist to nsSHistory::AddEntry, if they
    called it. But that meant that passing false for aPersist didn't always
    result in transient entries.
- We create the infrastructure for transient child entries to be replaced too.
  - Previously, the persistence flag was ignored on child entries
  - At the state of this patch, child entries shouldn't become transient. But
    they will once we always replace the initial about:blank entry.

Differential Revision: https://phabricator.services.mozilla.com/D250233
2025-06-10 16:57:39 +00:00
Nika Layzell 015e0bffd4 Bug 1970073 - Throttle On{Progress,State}Change for BCWebProgress, r=smaug
This is a very inelegant solution, which involves re-introducing the
hacky nsBrowserStatusFilter type as an intermediate listener between the
nsDocShell and the BCWebProgress.

A more elegant solution would be directly integrated into nsDocLoader,
which already holds all of the relevant state which is used to populate
status/progress change events on demand. However, this would be a more
substantial change, and this approach allows us to fix the performance
regression more quickly while also roughly keeping the old behaviour.

We could potentially fix this in a more elegant way as part of also
tracking progress for loads in out-of-progress iframes.

Differential Revision: https://phabricator.services.mozilla.com/D252586
2025-06-09 17:34:24 +00:00
Andreas Farre 785d92a96c Bug 1968511 - Implement #set-the-ongoing-navigation. r=jjaschke,smaug
Differential Revision: https://phabricator.services.mozilla.com/D252337
2025-06-06 06:42:34 +00:00
Andreas Farre 34bf574739 Bug 1968194 - Part 1: Make sure to fire navigate event when History.go is called. r=smaug,jjaschke
A smallish re-factor aligning us more with spec allows us to use our new
reload path, which also aligns us more with spec. Also fixes issues
around event cancellability.

Differential Revision: https://phabricator.services.mozilla.com/D250902
2025-06-03 13:18:40 +00:00
Alexandru Marc dccf549113 Revert "Bug 1968194 - Part 1: Make sure to fire navigate event when History.go is called. r=smaug,jjaschke" for causing Bug 1969858
This reverts commit 8c164ce3e4.
2025-06-02 14:58:44 +00:00
Andreas Farre 8c164ce3e4 Bug 1968194 - Part 1: Make sure to fire navigate event when History.go is called. r=smaug,jjaschke
A smallish re-factor aligning us more with spec allows us to use our new
reload path, which also aligns us more with spec. Also fixes issues
around event cancellability.

Differential Revision: https://phabricator.services.mozilla.com/D250902
2025-06-02 07:00:46 +00:00
Julian Descottes f2c35072a5 Bug 1963189 - Forward WebProgress events directly from nsDocShell to BrowsingContextWebProgress, r=smaug,webdriver-reviewers,extension-reviewers,robwu,jdescottes
Prior to this change, all web progress events fired by nsDocLoader
were bubbled to the toplevel in-process nsDocShell instance, then
captured by web progress listener. This listener would filter the
notifications (using nsBrowserStatusFilter), then send them either
directly to the BrowsingContextWebProgress, or via. PBrowser to the
BrowsingContextWebProgress.

Unfortunately, these events are modified as they are bubbled (e.g.
changing the progress flags to remove STATE_IS_NETWORK), which combined
with the filtering from nsBrowserStatusFilter led to some strange
behaviour in the notifications.

This change skips the in-content bubbling by directly propagating events
from the nsDocShell they were fired on to the corresponding
BrowsingContextWebProgress, and then performing the bubbling within the
parent process.

The one major exception to this is OnProgressChange, which relies on
nsDocLoader's handling on aCurTotalProgress and aMaxTotalProgress.
Because of that, these listeners continue to capture progress
notifications exclusively on the toplevel BrowsingContext, and do not
handle out-of-process iframes.

Differential Revision: https://phabricator.services.mozilla.com/D249651
2025-05-29 21:43:41 +00:00
Serban Stanca e949b15190 Revert "Bug 1968194 - Part 3: Update test expectations. r=jjaschke" for causing wpt failures in navigate-form-requestSubmit.html.
This reverts commit b259a46858.

This reverts commit d5c3423975.

This reverts commit 6415811fb8.
2025-05-28 20:35:13 +00:00
Serban Stanca 5d41f6ffd5 Revert "Bug 1963189 - Forward WebProgress events directly from nsDocShell to BrowsingContextWebProgress, r=smaug,webdriver-reviewers,extension-reviewers,robwu,jdescottes" for causing webdriver failures in navigation_failed.py.
This reverts commit a6f912be7b.
2025-05-28 20:14:53 +00:00
Julian Descottes a6f912be7b Bug 1963189 - Forward WebProgress events directly from nsDocShell to BrowsingContextWebProgress, r=smaug,webdriver-reviewers,extension-reviewers,robwu,jdescottes
Prior to this change, all web progress events fired by nsDocLoader
were bubbled to the toplevel in-process nsDocShell instance, then
captured by web progress listener. This listener would filter the
notifications (using nsBrowserStatusFilter), then send them either
directly to the BrowsingContextWebProgress, or via. PBrowser to the
BrowsingContextWebProgress.

Unfortunately, these events are modified as they are bubbled (e.g.
changing the progress flags to remove STATE_IS_NETWORK), which combined
with the filtering from nsBrowserStatusFilter led to some strange
behaviour in the notifications.

This change skips the in-content bubbling by directly propagating events
from the nsDocShell they were fired on to the corresponding
BrowsingContextWebProgress, and then performing the bubbling within the
parent process.

The one major exception to this is OnProgressChange, which relies on
nsDocLoader's handling on aCurTotalProgress and aMaxTotalProgress.
Because of that, these listeners continue to capture progress
notifications exclusively on the toplevel BrowsingContext, and do not
handle out-of-process iframes.

Differential Revision: https://phabricator.services.mozilla.com/D249651
2025-05-28 18:01:24 +00:00
Andreas Farre 6415811fb8 Bug 1968194 - Part 1: Make sure to fire navigate event when History.go is called. r=smaug,jjaschke
A smallish re-factor aligning us more with spec allows us to use our new
reload path, which also aligns us more with spec. Also fixes issues
around event cancellability.

Differential Revision: https://phabricator.services.mozilla.com/D250902
2025-05-28 16:16:15 +00:00
Daisuke Akatsuka 86a4d21616 Bug 1954604: Make nsIFaviconService.copyFavicons() returns Promise r=mak
Differential Revision: https://phabricator.services.mozilla.com/D244551
2025-05-28 12:09:32 +00:00
Cristina Horotan 95e5eae5f7 Revert "Bug 1954604: Make nsIFaviconService.copyFavicons() returns Promise r=mak" for causing build bustages at nsFaviconService.cpp
This reverts commit 3ff3677585.
2025-05-28 07:03:28 +00:00
Daisuke Akatsuka 3ff3677585 Bug 1954604: Make nsIFaviconService.copyFavicons() returns Promise r=mak
Differential Revision: https://phabricator.services.mozilla.com/D244551
2025-05-28 06:09:15 +00:00
Tim Huang 88b0c23938 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-27 18:47:42 +00:00
Cristina Horotan 35b096a0cb Revert "Bug 1968194 - Make sure to fire navigate event when History.go is called. r=smaug" for causing multiple failures
This reverts commit 11c63a48cc.
2025-05-26 19:57:55 +00:00
Andreas Farre 11c63a48cc Bug 1968194 - Make sure to fire navigate event when History.go is called. r=smaug
A smallish re-factor aligning us more with spec allows us to use our new
reload path, which also aligns us more with spec. Also fixes issues
around event cancellability.

Differential Revision: https://phabricator.services.mozilla.com/D250902
2025-05-26 18:14:45 +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