Граф коммитов

9422 Коммитов

Автор SHA1 Сообщение Дата
Adam Vandolder 184bda843d Bug 1734181 - Part 4: Add tests for the backbutton intervention behaviour. r=jjaschke,peterv,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D216828
2024-08-20 14:21:29 +00:00
Adam Vandolder fc18484aec Bug 1734181 - Part 1: Carry hasUserInteraction over to newly-created SessionHistoryEntrys. r=jjaschke,peterv,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D209014
2024-08-20 14:21:28 +00:00
Florian Quèze 47b1992333 Bug 1913624 - Remove expired telemetry histograms ENCODING_OVERRIDE_SITUATION_TEXT and ENCODING_OVERRIDE_SITUATION_HTML, r=chutten.
Depends on D219442

Differential Revision: https://phabricator.services.mozilla.com/D219443
2024-08-20 10:26:52 +00:00
Peter Van der Beken 2ddc0f8713 Bug 1912083 - Switch url argument to UTF8 string. r=jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D218947
2024-08-20 07:56:25 +00:00
Nika Layzell 0b5dab40c6 Bug 1881037 - Part 2: Add a basic test for loading unknown protocols in a popup window, r=smaug
The console notification is only created when an error page would not
otherwise load, so allows us to detect the situation where the error
page is not going to be loaded.

Differential Revision: https://phabricator.services.mozilla.com/D218984
2024-08-15 10:19:49 +00:00
Nika Layzell 196fd4c78c Bug 1881037 - Part 1: Stop showing unknown protocol error pages for web-triggered loads, r=smaug,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D217495
2024-08-15 10:19:49 +00:00
Sean Feng 1b47ab6415 Bug 1863246 - Make the page that enters BFCache not asking the parent process to update the active browsing context r=peterv,dom-core
Currently, when a page enters BFCache, it updates the parent process
for the active BC; however, the page that is about to show will do the
same. These two operations are triggered in different processes with
different active id, they are racy and problematic.

This patch fixes the above issue by not updating the parent process
when a page enters BFCache.

This only applies to BFCacheInParent is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D215818
2024-08-14 19:48:17 +00:00
Henri Sivonen 4496b3ed9b Bug 1908759 - Don't use UTS 46 ToUnicode from nsDocShell::AttemptURIFixup. r=necko-reviewers,jesup,valentin
Differential Revision: https://phabricator.services.mozilla.com/D217009
2024-08-14 18:30:08 +00:00
Paul Zuehlcke 8fcf41c736 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
Norisz Fay d9198adc83 Backed out 3 changesets (bug 1881037) for causing mochitest failure on test_popup_unknown_protocol.html CLOSED TREE
Backed out changeset c948d8669436 (bug 1881037)
Backed out changeset 30866fb1a697 (bug 1881037)
Backed out changeset db0212e2c079 (bug 1881037)
2024-08-10 00:42:47 +03:00
Nika Layzell 7be530a459 Bug 1881037 - Part 2: Add a basic test for loading unknown protocols in a popup window, r=smaug
The console notification is only created when an error page would not
otherwise load, so allows us to detect the situation where the error
page is not going to be loaded.

Depends on D217495

Differential Revision: https://phabricator.services.mozilla.com/D218984
2024-08-09 20:26:12 +00:00
Nika Layzell a50af179d9 Bug 1881037 - Part 1: Stop showing unknown protocol error pages for web-triggered loads, r=smaug,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D217495
2024-08-09 20:26:11 +00:00
Nika Layzell 01fa25f4bd Bug 1911745 - Unify BrowsingContext flag coherency checks, r=mccr8
Previously these checks were largely diagnostic tools for finding bugs
in other code as it evolves. This unifies the checks a bit more and
makes them stronger for BrowsingContexts created over IPC, providing a
place for more coherency checks to be added in the future.

Differential Revision: https://phabricator.services.mozilla.com/D218860
2024-08-09 16:06:13 +00:00
Narcis Beleuzu c284a53117 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 6075555c76 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
Noemi Erli c02bd2b7ec Backed out changeset 437beb1efdd2 (bug 1882670) for causing web platform failures CLOSED TREE 2024-08-08 00:58:01 +03:00
Nika Layzell 22a4aacd26 Bug 1908725 - Part 4: Switch some basic uses of OtherPid over to OtherChildID, r=smaug
There are many other uses of OtherPid which could be switched over to
OtherChildID, but these were a couple of obvious low-hanging fruit use-cases
which will work better when using OtherChildID.

Differential Revision: https://phabricator.services.mozilla.com/D217120
2024-08-07 20:39:40 +00:00
Sean Feng 3b46fdadd1 Bug 1882670 - Cancel the loading=lazy iframe when it's load via a different way r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D218143
2024-08-07 20:32:19 +00:00
Sean 3799274f28 Bug 1890028 - Display Server Error message when server returns HTTP 500 and unusual content-type r=kershaw,fluent-reviewers,necko-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D216978
2024-08-07 13:31:02 +00:00
Fatih de4bc1fb04 Bug 1885101: Match screen and window properties with top window for ScreenRect, ScreenAvailRect and WindowOuterSize. r=timhuang,emilio
This patch removes test_iframe.html. We remove it because the newly introduced test covers the tests done in that test. The reason for removing it in the first place is now that screen properties are inherited/spoofed xorigin, we get a 4px difference. The reasosn for 4px difference is the test runner runs tests in an iframe with a 2px border on each side.

Differential Revision: https://phabricator.services.mozilla.com/D215509
2024-08-06 15:31:34 +00:00
Emilio Cobos Álvarez e1ad6294bf Bug 1910698 - Remove nsIScriptError.sourceLine. r=smaug,devtools-reviewers,webdriver-reviewers,necko-reviewers,nchevobbe,kershaw,jdescottes,credential-management-reviewers,dimi
Afaict the source lines are not exposed anywhere in the UI.

Differential Revision: https://phabricator.services.mozilla.com/D218115
2024-08-01 17:12:48 +00:00
Nika Layzell 22d1d975b2 Bug 1907269 - Part 1: Allow pop-up windows to load external URIs for first load, r=Gijs
Previously this load would be allowed due to the "web-controlled" check
failing to reject the load. This patch instead bases it on the
docshell.newWindowTarget flag, which is set for the first load in a new
DocShell due to a call to window.open or target=_blank.

This required making the external protocol channel be a property bag so
that the flag can be set on the channel. In the future we may want to
switch this flag to being set in a more generic way which is less
specific to the channel.

Differential Revision: https://phabricator.services.mozilla.com/D217484
2024-07-31 20:34:54 +00:00
Oliver Medhurst b3923ff723 Bug 1896672 - Check user activation for openBlocked popup blocker state r=smaug
Enabled behind new `dom.popup.experimental` pref, off by default.

Differential Revision: https://phabricator.services.mozilla.com/D215361
2024-07-31 12:19:01 +00:00
Christoph Kerschbaumer 1183b7f3a2 Bug 1910082: Further improve HTTPS Telemetry, r=kershaw,necko-reviewers,simonf
Differential Revision: https://phabricator.services.mozilla.com/D217815
2024-07-30 16:20:25 +00:00
Sandor Molnar 5ce501ee48 Backed out 2 changesets (bug 1907269) for causing bc failures @ browser_ftp_protocol_handlers.js CLOSED TREE
Backed out changeset 3270496f12d8 (bug 1907269)
Backed out changeset 218c98804a83 (bug 1907269)
2024-07-30 02:16:42 +03:00
Nika Layzell a5ec44308d Bug 1907269 - Part 1: Allow pop-up windows to load external URIs for first load, r=Gijs
Previously this load would be allowed due to the "web-controlled" check
failing to reject the load. This patch instead bases it on the
docshell.newWindowTarget flag, which is set for the first load in a new
DocShell due to a call to window.open or target=_blank.

This required making the external protocol channel be a property bag so
that the flag can be set on the channel. In the future we may want to
switch this flag to being set in a more generic way which is less
specific to the channel.

Differential Revision: https://phabricator.services.mozilla.com/D217484
2024-07-29 22:15:43 +00:00
Nika Layzell 56d4ea0812 Bug 1834864 - Select BCG more consistently during COOP+COEP process switches, r=smaug,tabbrowser-reviewers,mak
Previously it was possible to bypass specific BCG selection based on
cross-origin isolated status if the site was allowed to load file URIs
using enterprise policies, which could lead to a crash.

This patch changes the behaviour such that BCG selection now happens
correctly. The site will still not be cross-origin isolated due to being
loaded into a file content process.

Differential Revision: https://phabricator.services.mozilla.com/D217007
2024-07-19 14:38:20 +00:00
Tarek Ziadé 3b01b9a53e Bug 1885100 - add about:inference r=Mardak,fluent-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D215471
2024-07-18 10:30:59 +00:00
Henri Sivonen 010aa5c448 Bug 1753352 - Inherit principal into about:blank with query string. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D212093
2024-07-17 16:12:53 +00:00
Christoph Kerschbaumer ac08948cd2 Bug 1907590: Improve labels for https telemetry, r=freddyb,kershaw,necko-reviewers,maltejur
Differential Revision: https://phabricator.services.mozilla.com/D216675
2024-07-17 15:29:24 +00:00
Mark Banner 771e962b68 Bug 1907588 - In tests, only startup the Addon Manager when necessary, now that the search service doesn't require it all the time. r=search-reviewers,home-newtab-reviewers,jteow
We no longer need to start the add-on manager before the search service starts, so init it only when it is needed for installing add-ons.

Differential Revision: https://phabricator.services.mozilla.com/D216406
2024-07-17 11:20:20 +00:00
Sylvestre Ledru 45030f6970 Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato
This new version of clang 17 also slightly changed the formatting.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D215914
2024-07-17 11:15:31 +00:00
Moritz Beier efcf0083da Bug 1906875 - Remove the old search engine selector from the search service. r=Standard8,extension-reviewers,urlbar-reviewers,settings-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D216047
2024-07-15 11:15:22 +00:00
Henri Sivonen 3c60d406b9 Bug 1889536 - Migrate IDNA handling to ICU4X. r=necko-reviewers,geckoview-reviewers,credential-management-reviewers,home-newtab-reviewers,valentin,owlish,dimi,thecount,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D206579
2024-07-09 11:26:43 +00:00
Tamas Szentpeteri 18d527a83a Backed out 2 changesets (bug 1889536) for causing bpnu bustages on nsIDNService.cpp. CLOSED TREE
Backed out changeset 87d0e483dd8c (bug 1889536)
Backed out changeset c3d6429d8a59 (bug 1889536)
2024-07-09 14:08:25 +03:00
Henri Sivonen f4f0304e8c Bug 1889536 - Migrate IDNA handling to ICU4X. r=necko-reviewers,geckoview-reviewers,credential-management-reviewers,home-newtab-reviewers,valentin,owlish,dimi,thecount,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D206579
2024-07-09 09:50:38 +00:00
Jan-Niklas Jaeschke d844b3f9fc Bug 1901064, part 1 - Preserve user activation when Fission is disabled. r=edgar,dom-core,tabbrowser-reviewers,mak,geckoview-reviewers,ohall
The code path that was used for loading a document
with fission disabled did not take user activation into account.
This made almost all WPTs for Text Fragments fail,
since they depend on this flag to decide if
a text directive is allowed to be scrolled to.

This patch makes sure that the user activation is
also available for code paths that run through
`CanonicalBrowsingContext::FixupAndLoadURIString()`
to load a document.

This is done by adding a flag `hasValidUserGestureActivation`
to the `nsIOpenWindowInfo`, which carries it through
the JS stack for loading a document.

Differential Revision: https://phabricator.services.mozilla.com/D213401
2024-06-26 14:24:35 +00:00
Jan-Niklas Jaeschke 84ba155f2d Bug 1888756, part 5 - Text Fragments: Implemented user activation. r=edgar,dom-core
This commit implements the rules given in the spec [0]
to determine if a text directive is allowed to be scrolled to.

This includes checking and consuming the text directive user activation
which was introduced in the previous parts of this patch set.

Additionally, a number of checks given in [1] are implemented.
The newly added method is injected into our scroll-to-fragment
algorithms in `Document::ScrollToRef()` and `nsDocShell::ScrollToAnchor()`.

[0] https://wicg.github.io/scroll-to-text-fragment/#restricting-the-text-fragment
[1] https://wicg.github.io/scroll-to-text-fragment/#check-if-a-text-directive-can-be-scrolled

Differential Revision: https://phabricator.services.mozilla.com/D212820
2024-06-26 14:24:33 +00:00
Jan-Niklas Jaeschke 3a50a0c62b Bug 1888756, part 4 - Text Fragments: Add more logging to parsing/stripping the fragment directive. r=dom-core,edgar
This commit is a prerequisite for part 5 of this patch set
and does not introduce any changes in behavior.

Differential Revision: https://phabricator.services.mozilla.com/D212819
2024-06-26 14:24:33 +00:00
Jan-Niklas Jaeschke 091c1ba3aa Bug 1888756, part 3 - Text Fragments: Preserve information if a load is a same-document load in `nsILoadInfo`. r=farre,dom-core,necko-reviewers,kershaw,peterv
This commit is a prerequisite for part 5 of this patch set.

There is no changed behavior in this commit.

Differential Revision: https://phabricator.services.mozilla.com/D212818
2024-06-26 14:24:32 +00:00
Jan-Niklas Jaeschke 3b545a84ce Bug 1888756, part 2 - Text Fragments: Implement setting the `textDirectiveUserActivation` flag in the document loading algorithm. r=edgar,dom-core
This commit is a prerequisite for part 5 of this patch set.

This flag is set in the docshell, based on `user gesture activation`.
This is not necessarily sufficient,
as the text fragments spec bases the value of
this flag also on User Involvement, which is not
implemented in Gecko yet.

The flag is then plumbed through the parent process
(`DocumentLoadListener::CreateDocumentLoadInfo()`)
to the document, where it can be consumed.
This includes client-side redirects as described in [0].

There is no changed behavior in this commit.

[0] https://wicg.github.io/scroll-to-text-fragment/#restricting-the-text-fragment

Differential Revision: https://phabricator.services.mozilla.com/D212817
2024-06-26 14:24:32 +00:00
Jan-Niklas Jaeschke 0221e167ca Bug 1888756, part 1 - Text Fragments: Introduce `textDirectiveUserActivation` flag. r=edgar,dom-core
This commit is a prerequisite for part 5 of this patch set
and introduces the `text directive user activation` flag
as well as the necessary boilerplate to transport the value
through process boundaries in `nsDocShellLoadState` and `LoadInfo`.

There is no changed behavior in this commit.

Differential Revision: https://phabricator.services.mozilla.com/D212816
2024-06-26 14:24:31 +00:00
Nika Layzell d6e6375a87 Bug 1728331 - Part 4: Make ContentParent KeepAlives explicit with RAII references, r=smaug,dom-worker-reviewers,asuth
This is a fairly significant patch, however it would be difficult to break it
down into smaller patches:

1) The various mechanisms used to manage ContentParent lifecycles have been
   merged together into a common "KeepAlive" system. A process will
   begin shutdown when its keepalive count reaches 0. (though it will
   still wait for all BrowserParents to also be dead before sending the
   actual shutdown message as before).

   This replaces a number of bespoke systems for tracking BrowserParent
   instances in different lifecycle states, remote workers, ongoing
   process switches, and preallocated processes.

2) KeepAlives are now managed automatically by a UniquePtr variant
   (Unique[Threadsafe]ContentParentKeepAlive). This makes the hand-off
   over KeepAlive lifecycles explicit, even for workers.

3) All KeepAlives are now keyed by a BrowserId, which will be 0 for keepalives
   not associated with a specific tab. This allows the new process
   selection logic to count all tabs other than the one being navigated
   when deciding which process to use.

4) The process switching logic now tracks it's KeepAlive with a BrowserId,
   meaning that ongoing process switches are considered when performing
   process selection, even if the BrowserParent hasn't been created yet.

Differential Revision: https://phabricator.services.mozilla.com/D213338
2024-06-24 23:19:28 +00:00
Christoph Kerschbaumer 811a0a736d Bug 1883954: Update, improve and unify HTTPS Telemetry, r=freddyb,kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D212661
2024-06-24 12:56:31 +00:00
Tom Schuster 6613ec7689 Bug 1904004 - Use OriginAttributes::IsPrivateBrowsing instead of open coding PBM checks. r=timhuang,cookie-reviewers,anti-tracking-reviewers,profiler-reviewers,necko-reviewers,kershaw,dom-storage-reviewers,janv,canaltinova,dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D214532
2024-06-24 11:06:18 +00:00
Aron Cseh e186db8177 Merge mozilla-central to autoland on a CLOSED TREE 2024-06-22 01:05:28 +03:00
Aron Cseh a18d79db16 Backed out 9 changesets (bug 1901851, bug 1728331) for causing remote worker crashes. a=backout
Backed out changeset 30bbda0eb197 (bug 1728331)
Backed out changeset dabd7d6836c8 (bug 1728331)
Backed out changeset 9e04f49c926e (bug 1728331)
Backed out changeset 779ac735736c (bug 1728331)
Backed out changeset 1d413fe340a0 (bug 1728331)
Backed out changeset 15608efcbeb6 (bug 1901851)
Backed out changeset f711bbec11b2 (bug 1901851)
Backed out changeset 8bb1d267d08f (bug 1901851)
Backed out changeset b29282956a04 (bug 1901851)
2024-06-22 00:52:24 +03:00
Malte Juergens 125cfda4b2 Bug 1835983 - Fix remaining tests failing with HTTPS-First r=freddyb,extension-reviewers,anti-tracking-reviewers,android-reviewers,geckoview-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D213017
2024-06-21 17:21:42 +00:00
Sebastian Hengst 7f7ea528f7 Backed out 7 changesets (bug 1888756) for potentially causing Session History crashes. a=backout
Backed out changeset 85022f2e4129 (bug 1888756)
Backed out changeset 1458ad53d229 (bug 1888756)
Backed out changeset a84d886d8753 (bug 1888756)
Backed out changeset efff3e5e95c2 (bug 1888756)
Backed out changeset 400a8ff57ae4 (bug 1888756)
Backed out changeset 04180e2fb99d (bug 1888756)
Backed out changeset 0eb8b13b0717 (bug 1888756)
2024-06-21 12:08:58 +02:00
Sebastian Hengst b4a4ad57a9 Backed out 2 changesets (bug 1901064) for blocking the backout of bug 1888756
Backed out changeset 0e582d262ca8 (bug 1901064)
Backed out changeset 992a876144a0 (bug 1901064)
2024-06-21 12:07:33 +02:00