Commit Graph
46 Commits
Author SHA1 Message Date
Manuel Bucher 475066ef88 Bug 1994681 - Reduce Page Protection: Module allowing for temporary disabling tracking-protection for current tab r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D274316
2026-03-13 12:48:34 +00:00
Andreea Silaghi 83d1a08db4 Revert "Bug 1994681 - Reduce Page Protection: Module allowing for temporary disabling tracking-protection for current tab r=timhuang"
This reverts commit 0d948a1318.
2026-03-03 09:50:27 +00:00
Andreea Silaghi a6128b3d4c Revert "Bug 1994682 - Reduce Page Protection: Adjust Tracking-Protection to decide whether it is active upon module r=timhuang"
This reverts commit 64b61baebd.
2026-03-03 09:50:25 +00:00
Manuel Bucher 64b61baebd Bug 1994682 - Reduce Page Protection: Adjust Tracking-Protection to decide whether it is active upon module r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D276217
2026-03-02 11:02:51 +00:00
Manuel Bucher 0d948a1318 Bug 1994681 - Reduce Page Protection: Module allowing for temporary disabling tracking-protection for current tab r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D274316
2026-03-02 11:02:49 +00:00
Emma Zuehlcke b662cc331f Bug 2008805 - Drop BounceTrackingState reference when BrowsingContext is discarded. r=manuel
Differential Revision: https://phabricator.services.mozilla.com/D280070
2026-02-10 16:42:49 +00:00
Andrew McCreight afedcd2019 Bug 1980712 - Change WebProgress Ignored NS_WARNINGs into BCWebProgress MOZ_LOG. r=nika
"no longer current window global" is the secondmost common NS_WARNING (at least on MacOS)
and "BrowsingContext is null or discarded" is the thirdmost, so change them to MOZ_LOG.
Also change the third one, for consistency.

Differential Revision: https://phabricator.services.mozilla.com/D263974
2025-09-07 20:45:18 +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
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 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
Paul Zuehlcke 961791e712 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
Paul Zuehlcke 6d4789b415 Bug 1894040 - Support for enabling or disabling BounceTrackingProtection during runtime. r=anti-tracking-reviewers,bvandersloot
This patch switches the main logic from a boolean pref to an integer with different feature modes.
See nsIBounceTrackingProtection for the new modes supported. Dry-run mode has been merged into the mode
pref.

A new state is introduced MODE_ENABLED_STANDBY in which BTP still collects user activation signals, but
does not classify or purge bounce trackers. This new mode should be used when it's expected that the
feature may be toggled on/off after rollout. Collecting user activation even in the "disabled" state
ensures that when the feature gets re-enabled the user activation map is already warmed up and sites
important to the user are not classified + purged.

The BounceTrackingProtection singleton listens for changes on the mode pref and inits / tears down accordingly.
However it never shuts down fully. To fully disable the feature a restart is required.

Differential Revision: https://phabricator.services.mozilla.com/D217848
2024-08-13 12:38:26 +00:00
Narcis Beleuzu 14b319c8a2 Backed out 3 changesets (bug 1844558, bug 1894040) for causing build bustages on BounceTrackingProtection.cpp . CLOSED TREE
Backed out changeset 00cce862553d (bug 1844558)
Backed out changeset 3fcb5ea142fd (bug 1894040)
Backed out changeset aa731ff97ebd (bug 1894040)
2024-08-09 17:03:12 +03:00
Paul Zuehlcke d6022d4c23 Bug 1894040 - Support for enabling or disabling BounceTrackingProtection during runtime. r=anti-tracking-reviewers,bvandersloot
This patch switches the main logic from a boolean pref to an integer with different feature modes.
See nsIBounceTrackingProtection for the new modes supported. Dry-run mode has been merged into the mode
pref.

A new state is introduced MODE_ENABLED_STANDBY in which BTP still collects user activation signals, but
does not classify or purge bounce trackers. This new mode should be used when it's expected that the
feature may be toggled on/off after rollout. Collecting user activation even in the "disabled" state
ensures that when the feature gets re-enabled the user activation map is already warmed up and sites
important to the user are not classified + purged.

The BounceTrackingProtection singleton listens for changes on the mode pref and inits / tears down accordingly.
However it never shuts down fully. To fully disable the feature a restart is required.

Differential Revision: https://phabricator.services.mozilla.com/D217848
2024-08-09 10:46:21 +00:00
Paul Zuehlcke fd682138db Bug 1848406 - Detect stateful bounces for window associated storages. r=bvandersloot,asuth
Differential Revision: https://phabricator.services.mozilla.com/D203607
2024-04-17 20:29:04 +00:00
Norisz Fay 7cdea11ce1 Backed out 15 changesets (bug 1843308, bug 1889444, bug 1888504, bug 1890546, bug 1888500, bug 1848406, bug 1890782) for causing bustage on BounceTrackingProtection.h CLOSED TREE
Backed out changeset 09168636f92e (bug 1890782)
Backed out changeset 45c9c902f35f (bug 1889444)
Backed out changeset 7cd441010547 (bug 1889444)
Backed out changeset 692d3fb54e2c (bug 1890546)
Backed out changeset 4c476414499a (bug 1843308)
Backed out changeset fc70ef415bfe (bug 1888504)
Backed out changeset e400fe8e13ac (bug 1888500)
Backed out changeset 336738f93085 (bug 1888500)
Backed out changeset 40fdfaf3cc32 (bug 1848406)
Backed out changeset 6a3ec1f62811 (bug 1848406)
Backed out changeset 5ea32ea95f62 (bug 1848406)
Backed out changeset df982722bc0a (bug 1848406)
Backed out changeset 6808ec37fa93 (bug 1848406)
Backed out changeset 36b8e78cc27e (bug 1848406)
Backed out changeset d63358e762de (bug 1848406)
2024-04-11 23:07:40 +03:00
Paul Zuehlcke f895782096 Bug 1848406 - Detect stateful bounces for window associated storages. r=bvandersloot,asuth
Differential Revision: https://phabricator.services.mozilla.com/D203607
2024-04-11 19:03:15 +00:00
Sandor Molnar e7bdbd80c9 Backed out 12 changesets (bug 1843308, bug 1848406, bug 1888500, bug 1888504, bug 1890546) for causing AddressSanitizer @ xpcom/base/nsISupportsImpl.cpp & bc failures @ toolkit/components/antitracking/bouncetrackingprotection/test/browser/<...> CLOSED TREE
Backed out changeset 4537591cca64 (bug 1890546)
Backed out changeset b29ebdf1439e (bug 1843308)
Backed out changeset 7c22cf88677f (bug 1888504)
Backed out changeset b85173dc6c16 (bug 1888500)
Backed out changeset 02d68d4511c7 (bug 1888500)
Backed out changeset 42ab5bd4b856 (bug 1848406)
Backed out changeset 6ce0fba99d02 (bug 1848406)
Backed out changeset affbf180e519 (bug 1848406)
Backed out changeset 80365ce68377 (bug 1848406)
Backed out changeset d75faab0301f (bug 1848406)
Backed out changeset 940c5fd39d25 (bug 1848406)
Backed out changeset 31016e129e99 (bug 1848406)
2024-04-10 22:10:33 +03:00
Paul Zuehlcke 263481b845 Bug 1848406 - Detect stateful bounces for window associated storages. r=bvandersloot,asuth
Differential Revision: https://phabricator.services.mozilla.com/D203607
2024-04-10 14:12:38 +00:00
Paul Zuehlcke ed21ff485f Bug 1839916 - Update BrowsingContextWebProgress to hold BounceTrackingState objects. r=bvandersloot,nika
Differential Revision: https://phabricator.services.mozilla.com/D182342
2023-07-18 08:26:22 +00:00
Cristina Horotan 4ae17ad51d Backed out 5 changesets (bug 1839916) for causing build bustage at BounceTrackingState.cpp CLOSED TREE
Backed out changeset 97b7c9d34869 (bug 1839916)
Backed out changeset c4068176e8e1 (bug 1839916)
Backed out changeset 815021dbe6fe (bug 1839916)
Backed out changeset aeab1abeef2f (bug 1839916)
Backed out changeset 1c459fb2b051 (bug 1839916)
2023-07-17 21:58:40 +03:00
Paul Zuehlcke a5337a9269 Bug 1839916 - Update BrowsingContextWebProgress to hold BounceTrackingState objects. r=bvandersloot,nika
Differential Revision: https://phabricator.services.mozilla.com/D182342
2023-07-17 17:54:50 +00:00
Cristian Tuns e02bff0790 Backed out 5 changesets (bug 1839916) for causing build bustages in BounceTrackingRecord.cpp CLOSED TREE
Backed out changeset 062039e3c9ca (bug 1839916)
Backed out changeset 3713d0250e5e (bug 1839916)
Backed out changeset 39cbf84f51b7 (bug 1839916)
Backed out changeset 44f32df69c08 (bug 1839916)
Backed out changeset fce071d0f22b (bug 1839916)
2023-07-17 10:29:33 -04:00
Paul Zuehlcke f8f358aedb Bug 1839916 - Update BrowsingContextWebProgress to hold BounceTrackingState objects. r=bvandersloot,nika
Differential Revision: https://phabricator.services.mozilla.com/D182342
2023-07-17 12:58:35 +00:00
Nika Layzell dfbd1e6f04 Bug 1767838 - Fix incorrect log message in BrowsingContextWebProgress, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D145479
2022-05-04 22:12:38 +00:00
Olli Pettay 0072c0e2fe Bug 1752413, add nsIWebProgress.documentRequest to let one to access the request for the document, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D137212
2022-02-01 15:46:32 +00:00
Andi-Bogdan Postelnicu 4bbf229571 Bug 1725145 - header files fixes in the hybrid build env. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D122343
2021-08-22 10:21:55 +00:00
Alexandre Poirot f9547901e6 Bug 1720304 - Implement WebProgress.browsingContext r=nika
This helps knowing which particular BrowsingContext is navigating.

Differential Revision: https://phabricator.services.mozilla.com/D119647
2021-07-19 08:28:19 +00:00
Nika Layzell db45ab92dc Bug 1709346 - Part 1: Track BrowsingContextWebProgress for subframes, r=mattwoodrow,kmag,necko-reviewers
This allows loads to be tracked as they are ongoing on a per-context basis in
the parent process, and for events to be generated for each subframe as it is
destroyed.

This patch also stops sending the `IsLoadingDocument` flag on the request to
the main process and removes RemoteWebProgress, as they are no longer necessary
due to being tracked directly.

Finally this patch also adds some logging to BrowsingContextWebProgress
to make it easier to diagnose this type of issue in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115706
2021-06-03 16:59:32 +00:00
Csoregi Natalia fa6df99402 Backed out 2 changesets (bug 1709346) for causing XPCConvert crashes. CLOSED TREE
Backed out changeset 7c1e15680741 (bug 1709346)
Backed out changeset 34eff3430674 (bug 1709346)
2021-05-26 00:32:25 +03:00
Nika Layzell 8eda0bc707 Bug 1709346 - Part 1: Track BrowsingContextWebProgress for subframes, r=mattwoodrow,kmag,necko-reviewers
This allows loads to be tracked as they are ongoing on a per-context basis in
the parent process, and for events to be generated for each subframe as it is
destroyed.

This patch also stops sending the `IsLoadingDocument` flag on the request to
the main process and removes RemoteWebProgress, as they are no longer necessary
due to being tracked directly.

Finally this patch also adds some logging to BrowsingContextWebProgress
to make it easier to diagnose this type of issue in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115706
2021-05-25 17:31:53 +00:00
Butkovits Atila 983e9d0fd1 Backed out 2 changesets (bug 1709346) for causing failures on browser_bug1709346.js. CLOSED TREE
Backed out changeset 19df1a8bfacc (bug 1709346)
Backed out changeset 602a7b4a41de (bug 1709346)
2021-05-25 19:52:49 +03:00
Nika Layzell 431beb8c3b Bug 1709346 - Part 1: Track BrowsingContextWebProgress for subframes, r=mattwoodrow,kmag,necko-reviewers
This allows loads to be tracked as they are ongoing on a per-context basis in
the parent process, and for events to be generated for each subframe as it is
destroyed.

This patch also stops sending the `IsLoadingDocument` flag on the request to
the main process and removes RemoteWebProgress, as they are no longer necessary
due to being tracked directly.

Finally this patch also adds some logging to BrowsingContextWebProgress
to make it easier to diagnose this type of issue in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115706
2021-05-25 15:54:48 +00:00
Emilio Cobos Álvarez aa08289a45 Bug 1704651 - Trigger stop notification on discard if waiting for it. r=nika
This is enough to fix the leak though perhaps the other patch also makes
sense.

Differential Revision: https://phabricator.services.mozilla.com/D112419
2021-04-16 23:16:41 +00:00
Anny Gakhokidze 9e9bd89661 Bug 1661833 - Fix duplicate OnStateChange events during process switches, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D96228
2020-11-19 23:21:04 +00:00
Matt Woodrow 4e3aee5045 Bug 1646582 - Remove DOM(Inner)WindowID from nsIWebProgress. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D80128
2020-06-24 19:58:15 +00:00
Dorel Luca cbf0f75a5d Backed out 4 changesets (bug 1646582) for Browser-chrome failures on nsIWebProgress.addProgressListener. CLOSED TREE
Backed out changeset 2111dd0d6dc0 (bug 1646582)
Backed out changeset e6c496c5a4b1 (bug 1646582)
Backed out changeset 49b4ae8c8be0 (bug 1646582)
Backed out changeset 9d42ec89240c (bug 1646582)
2020-06-24 07:50:07 +03:00
Matt Woodrow 038d20016f Bug 1646582 - Remove DOM(Inner)WindowID from nsIWebProgress. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D80128
2020-06-24 03:24:21 +00:00
Narcis Beleuzu 80ce4752a3 Backed out 4 changesets (bug 1646582) for mochitest failures on test_ext_tabs_create.html . CLOSED TREE
Backed out changeset ce5cdfc5d7cf (bug 1646582)
Backed out changeset 2ac69a2b6708 (bug 1646582)
Backed out changeset 74d89cb24414 (bug 1646582)
Backed out changeset 7de0ff1af560 (bug 1646582)
2020-06-23 06:30:03 +03:00
Matt Woodrow 8fc48d47cb Bug 1646582 - Remove DOM(Inner)WindowID from nsIWebProgress. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D80128
2020-06-23 01:23:57 +00:00
Matt Woodrow 216c7f598e Bug 1644943 - Create single webprogress for CanonicalBrowsingContext, regardless of process the browser element contents are in. r=nika,kmag,Gijs
I think at this point we can remove all of RemoteWebProgressManager, some/all of the TabProgressListener recreations, and probably a bunch more.

Differential Revision: https://phabricator.services.mozilla.com/D79240
2020-06-17 02:59:29 +00:00
Razvan Maries f3accf16d2 Backed out changeset f56d5efc5e43 (bug 1644943) for build bustages on nsFrameLoaderOwner.cpp. CLOSED TREE 2020-06-17 02:55:01 +03:00
Matt Woodrow 643b32a784 Bug 1644943 - Create single webprogress for CanonicalBrowsingContext, regardless of process the browser element contents are in. r=nika,kmag,Gijs
I think at this point we can remove all of RemoteWebProgressManager, some/all of the TabProgressListener recreations, and probably a bunch more.

Differential Revision: https://phabricator.services.mozilla.com/D79240
2020-06-16 23:24:49 +00:00
Bogdan Tara 01729dc302 Backed out changeset 26231891f004 (bug 1644943) for browser_backforward_userinteraction.js and browser_sessionHistory.js failures CLOSED TREE 2020-06-16 02:46:15 +03:00
Matt Woodrow 396f3259ce Bug 1644943 - Create single webprogress for CanonicalBrowsingContext, regardless of process the browser element contents are in. r=nika,kmag,Gijs
I think at this point we can remove all of RemoteWebProgressManager, some/all of the TabProgressListener recreations, and probably a bunch more.

Differential Revision: https://phabricator.services.mozilla.com/D79240
2020-06-15 22:01:34 +00:00