Commit Graph

7332 Commits

Author SHA1 Message Date
Butkovits Atila
a16da946fd Backed out 2 changesets (bug 1911977) for causing failures at browser_thumbnails_bg_bad_url.js. CLOSED TREE
Backed out changeset 564fe3a44acf (bug 1911977)
Backed out changeset d142c4f64ae7 (bug 1911977)
2024-09-05 04:19:21 +03:00
Emilio Cobos Álvarez
ae7187bdd7 Bug 1911977 - Don't abort networking activity on external protocol navigations. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D221029
2024-09-04 20:18:55 +00:00
Emilio Cobos Álvarez
9f46207409 Bug 1911977 - Minor clean-ups in nsDocShell::InternalLoad. r=smaug
Use const and the same style for download and JS checks.

Differential Revision: https://phabricator.services.mozilla.com/D221028
2024-09-04 20:18:55 +00:00
Sean Feng
fde536a9dd Bug 1882670 - Cancel the loading=lazy iframe when it's load via a different way r=emilio,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D218143
2024-09-04 14:06:47 +00:00
Cristina Horotan
24065fbb66 Backed out changeset d232f991af6a (bug 1882670) for causing cdp failures at frame.spec.js CLOSED TREE 2024-09-04 02:35:14 +03:00
Sean Feng
66cda424bd Bug 1882670 - Cancel the loading=lazy iframe when it's load via a different way r=emilio,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D218143
2024-09-03 19:34:36 +00:00
Nika Layzell
771e757ee4 Bug 1914594 - Move docshell.newWindowTarget to be on LoadInfo, r=necko-reviewers,kershaw
Previously, this was passed around using the nsHashPropertyBag base
class on HTTP channels. In bug 1907269, this base was added to
nsExtProtocolChannel to support reading this property for external
protocols.

This unfortunately ended up not working when a HTTP channel redirects to
an external protocol, as the hash property propagation logic in
nsHttpChannel happens after the check that the target channel is a HTTP
channel, so the property was lost when redirecting to an external
protocol.

Rather than refactoring HTTP redirect logic, this patch simplifies by
moving the property onto the LoadInfo where it will be trivially
preserved across redirects, and available in the places which need it.

Because the nsHashPropertyBag base is no longer required for
nsExtProtocolChannel, it is also removed.

Differential Revision: https://phabricator.services.mozilla.com/D220744
2024-09-03 16:00:23 +00:00
Valentin Gosu
5083ae5be8 Bug 1888494 - Make CanonicalBrowsingContext::FixupAndLoadURIString check set the correct TRR mode r=nika
It would seem sometimes in Firefox 77 we regressed the ability to set the TRR
mode for a browsing context when opening a new tab.
I confirmed that this bug didn't happen in Fx 77 when setting the
`browser.tabs.documentchannel.parent-initiated` pref to `false`.

The nsIWebNavigation::LOAD_FLAGS_DISABLE_TRR is correctly passed into
CanonicalBrowsingContext, but it doesn't end up getting used.

This sets the appropriate DefaultLoadFlags for BrowsingContext
when the LOAD_FLAGS_DISABLE_TRR or LOAD_TRR_ONLY_MODE flags are present
in nsDocShellLoadState::LoadFlags()

Differential Revision: https://phabricator.services.mozilla.com/D220550
2024-09-03 13:07:59 +00:00
Olli Pettay
25c3ef03e5 Bug 1914513 - Add a pref to disable mutation events, r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D219934
2024-09-02 13:29:57 +00:00
Emilio Cobos Álvarez
60ca3ff493 Bug 1914149 - Propagate zoom to new browsing contexts unconditionally. r=nika
Your patch looks good to me. Not sure if there's a non-racy way of
testing the internal full-zoom value here...

But in general, assuming consistent zoom lacking other sources of
information seems like the right thing to do.

I agree that eventually we want to probably move the site-specific zoom
impl into Gecko (if only because Android is also going to want that, see
bug 1547181, where I added a comment).

Co-authored-by: Nika Layzell <nika@thelayzells.com>

Differential Revision: https://phabricator.services.mozilla.com/D220277
2024-09-02 11:28:05 +00:00
Butkovits Atila
e58f119acf Backed out changeset 6c62047559a6 (bug 1882670) for causing failures at iframe-loading-lazy-reload-location-reload.html. CLOSED TREE 2024-08-28 19:42:11 +03:00
Sean Feng
3923e9990b Bug 1882670 - Cancel the loading=lazy iframe when it's load via a different way r=emilio,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D218143
2024-08-28 15:11:55 +00:00
Sandor Molnar
ca978e2606 Backed out changeset 65b82edb2b88 (bug 1888729) for causing build bustages @ CloseWatcherManager.h CLOSED TREE 2024-08-21 19:01:23 +03:00
keithamus
cee439094e Bug 1888729 - Implement CloseWatcher interface r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D206169
2024-08-21 13:49:38 +00:00
Florian Quèze
cf888920da 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
210c536413 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
454d9e08eb 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
Henri Sivonen
52ee691148 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
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
Norisz Fay
66de804dac 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
4a09bbc478 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
e7de59b3da 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
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
Noemi Erli
0f7c979555 Backed out changeset 437beb1efdd2 (bug 1882670) for causing web platform failures CLOSED TREE 2024-08-08 00:58:01 +03:00
Nika Layzell
112fcb23c7 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
e98d0bcded 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
17f89e2207 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
e3dce50ad3 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
77c40caac6 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
6e919ecc09 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
ab626b71a4 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
3a801e6bc8 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
84c538e41e 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
6ad52aa799 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
0c56f81d86 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é
775214aded 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
7d94c50478 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
3063e2ccd1 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
Sylvestre Ledru
a3ea006705 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
Henri Sivonen
41b363d50d 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
c1ca326517 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
057d6de297 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
914d043b7d 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
86e1256748 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
7ace8811e4 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
103b0fae16 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
4835874f4b 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
04c0ffe9aa 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
279b50ebe8 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