Commit Graph

9481 Commits

Author SHA1 Message Date
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
Nika Layzell
09128e7d16 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-20 19:24:51 +00:00
Jan-Niklas Jaeschke
ec9dac7aa2 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-20 15:00:31 +00:00
Andreas Farre
02ca49e84a Bug 1890748 - Move responsibility of FeaturePolicy initialization to nsILoadInfo. r=freddyb,necko-reviewers,jesup,dom-core,sefeng
Differential Revision: https://phabricator.services.mozilla.com/D207140
2024-06-20 13:22:41 +00:00
Jan-Niklas Jaeschke
04cc402b1d 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-20 10:24:27 +00:00
Jan-Niklas Jaeschke
2a9daaae9e 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-20 10:24:27 +00:00
Jan-Niklas Jaeschke
238a3af84d Bug 1888756, part 3 - Text Fragments: Add a flag in the DocShell to keep the information if a load was same-document. r=farre,dom-core,edgar
This commit is a prerequisite for part 5 of this patch set.

The idea is to keep the information whether the last
load done by the doc shell was a same-document navigation.
The value is reset for every navigation, therefore it
should always be correct.

There is no changed behavior in this commit.

Differential Revision: https://phabricator.services.mozilla.com/D212818
2024-06-20 10:24:26 +00:00
Jan-Niklas Jaeschke
4410f19989 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-20 10:24:26 +00:00
Jan-Niklas Jaeschke
bf4be2e041 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-20 10:24:25 +00:00
Stanca Serban
92d2016aa1 Backed out 2 changesets (bug 1883954) for causing mochitests failures in browser_schemeless.js. CLOSED TREE
Backed out changeset 790cb078bb3b (bug 1883954)
Backed out changeset 6d1d98d0e69c (bug 1883954)
2024-06-20 12:23:53 +03:00
Christoph Kerschbaumer
5d2889b7ba Bug 1883954: Update, improve and unify HTTPS Telemetry, r=freddyb,kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D212661
2024-06-20 07:12:47 +00:00
Cristian Tuns
535119812a Backed out 8 changesets (bug 1901851, bug 1728331) for causing bc failures in browser_docshell_type_editor.js CLOSED TREE
Backed out changeset 2cf5cad90099 (bug 1728331)
Backed out changeset d920c2d72d00 (bug 1728331)
Backed out changeset 9e5bd0186aa6 (bug 1728331)
Backed out changeset 45735575df21 (bug 1728331)
Backed out changeset fbafea1663e3 (bug 1901851)
Backed out changeset 30bdf88d3bb7 (bug 1901851)
Backed out changeset 1d994915bd71 (bug 1901851)
Backed out changeset 0b3249432b9c (bug 1901851)
2024-06-19 20:51:53 -04:00
Nika Layzell
4603f2d33b 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-19 20:14:50 +00:00
Jan-Niklas Jaeschke
e7796d03ee Bug 1897956 - Text Fragments: Set text fragment as :target. r=farre,dom-core
This patch makes some adjustments to follow the spec more strictly by
separating highlighting a text fragment (ie. adding the ranges to a `eTargetText` Selection)
from scrolling to it.

Scrolling to the text fragment now follows the steps given in [0] more closely,
in particular now the closest common ancestor of the target range is being used
as `:target` element.

This change also sets the focus to the start of the first text fragment, as indicated by the spec.
This resets the normal selection on the page.
The wpt test in /css/css-pseudo/target-text-005.html is based on the idea of having a same-doc
text fragment navigation with a selection.
This test fails with this patch applied, because the selection is reset.
It is currently unclear what behavior is correct here, thus the test is kept for now.

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

Differential Revision: https://phabricator.services.mozilla.com/D211025
2024-06-19 17:16:39 +00:00
Andreas Farre
e548ff16d6 Bug 1886222 - Start reload by calling reload in the parent. r=Gijs,canadahonk,smaug
Differential Revision: https://phabricator.services.mozilla.com/D211519
2024-06-19 05:49:45 +00:00
Andreas Farre
a3f4873c38 Bug 1891670 - Expose crossGroupOpener on CanonicalBrowsingContext. r=dom-core,tabbrowser-reviewers,peterv
Differential Revision: https://phabricator.services.mozilla.com/D212677
2024-06-17 14:16:23 +00:00
Iulian Moraru
cea834bdf3 Backed out 4 changesets (bug 1898321, bug 1897942, bug 1897956) for causing multiple failures.
Backed out changeset ec3fcdcbfbd7 (bug 1897942)
Backed out changeset 279025d15551 (bug 1898321)
Backed out changeset a239855b02ea (bug 1897942)
Backed out changeset aab98ffe0ee9 (bug 1897956)
2024-06-14 18:43:03 +03:00
Jan-Niklas Jaeschke
2b673eb789 Bug 1897956 - Text Fragments: Set text fragment as :target. r=farre,dom-core
This patch makes some adjustments to follow the spec more strictly by
separating highlighting a text fragment (ie. adding the ranges to a `eTargetText` Selection)
from scrolling to it.

Scrolling to the text fragment now follows the steps given in [0] more closely,
in particular now the closest common ancestor of the target range is being used
as `:target` element.

This change also sets the focus to the start of the first text fragment, as indicated by the spec.
This resets the normal selection on the page.
The wpt test in /css/css-pseudo/target-text-005.html is based on the idea of having a same-doc
text fragment navigation with a selection.
This test fails with this patch applied, because the selection is reset.
It is currently unclear what behavior is correct here, thus the test is kept for now.

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

Differential Revision: https://phabricator.services.mozilla.com/D211025
2024-06-14 12:20:47 +00:00
Manuel Bucher
ca28980109 Bug 1747230 - Fix IsUpgradeDowngradeEndlessLoop blocking legitimate redirects when redirecting to different query parameters r=necko-reviewers,kershaw,simonf,maltejur
This changes where the IsUpgradeDowngradeEndlessLoop check triggers.
Before this patch, it triggered during the redirect caused by the https
upgrade. With this patch, it triggers during the downgrade for http
redirects. META and JS redirect are still detected during upgrade.
This should be fixed as a follow up (See Bug 1896691).
Downgrade in this context means same url, except with the scheme http
instead of https.

Different query parameters normally lead to different responses by web servers.
Don't consider the '#ref' part of the uri, because it doesn't get send to
the server and therefore can't change the server response.

We can't use the redirect chain anymore, because the query parameters
are trimmed since Bug 1715785.

This also removes the config option dom.security.https_only_check_path_upgrade_downgrade_endless_loop,
because it adds unnecessary complexity. Removing it for this patch is
easier.

https-only, https-first and httpssvc_https_upgrade tests had to be
modified, because they depended on the incorrect handling of query
strings in loop detection.

Differential Revision: https://phabricator.services.mozilla.com/D193672
2024-06-10 17:09:57 +00:00
Tamas Szentpeteri
c650eff9ee Backed out changeset b234ba179483 (bug 1747230) for causing mochitest failures on browser_target_blank.js. CLOSED TREE 2024-06-06 19:51:33 +03:00
Manuel Bucher
db9b007290 Bug 1747230 - Fix IsUpgradeDowngradeEndlessLoop blocking legitimate redirects when redirecting to different query parameters r=necko-reviewers,kershaw,simonf,maltejur
This changes where the IsUpgradeDowngradeEndlessLoop check triggers.
Before this patch, it triggered during the redirect caused by the https
upgrade. With this patch, it triggers during the downgrade for http
redirects. META and JS redirect are still detected during upgrade.
This should be fixed as a follow up (See Bug 1896691).
Downgrade in this context means same url, except with the scheme http
instead of https.

Different query parameters normally lead to different responses by web servers.
Don't consider the '#ref' part of the uri, because it doesn't get send to
the server and therefore can't change the server response.

We can't use the redirect chain anymore, because the query parameters
are trimmed since Bug 1715785.

This also removes the config option dom.security.https_only_check_path_upgrade_downgrade_endless_loop,
because it adds unnecessary complexity. Removing it for this patch is
easier.

https-only, https-first and httpssvc_https_upgrade tests had to be
modified, because they depended on the incorrect handling of query
strings in loop detection.

Differential Revision: https://phabricator.services.mozilla.com/D193672
2024-06-06 15:04:47 +00:00
Dana Keeler
6d1611afa2 Bug 1900132 - attempt to redirect www.example.com to example.com to avoid certificate domain name mismatch errors r=jschanck,smaug
Differential Revision: https://phabricator.services.mozilla.com/D212329
2024-06-05 23:58:03 +00:00
Tom Ritter
360396dcbe Bug 1894958: Let's name this page more accurately r=timhuang
The purpose of this page is to improve the fingerprinting protections
in Firefox.

Differential Revision: https://phabricator.services.mozilla.com/D209599
2024-06-05 02:04:40 +00:00
Nika Layzell
524e4f032a Bug 1681457 - Allow non-auxiliary BrowsingContexts created by script to close themselves, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D211792
2024-06-05 00:06:48 +00:00
Nika Layzell
855d5761c0 Bug 196078 - Part 2: Support displaying arbitrary text/* MIME types as plain text, r=smaug,necko-reviewers,valentin
This patch refactors how we check for text formats when deciding how to handle
resources, such that more text MIME types will be rendered in-browser, rather
than downloaded.

This change requires us to move more away from using the Gecko-Content-Viewers
category in the category manager for this decision, as we need to handle an
unlimited number of MIME types behind the scenes.

Support for Gecko-Content-Viewers was left in for both the in-tree use for
application/http-index-format and dynamically determining whether image/avif
and image/jxl are supported, as well as for the message/rfc822 type used by
Thunderbird.

Differential Revision: https://phabricator.services.mozilla.com/D212078
2024-06-05 00:05:58 +00:00
Cosmin Sabou
14bfc537ab Backed out 7 changesets (bug 1894958) for causing bc failures on browser_usercharacteristics_gamepads. CLOSED TREE
Backed out changeset 2d6a773b1cfe (bug 1894958)
Backed out changeset 64fa5abd15b1 (bug 1894958)
Backed out changeset 73017dc41a54 (bug 1894958)
Backed out changeset 99498fc1e89c (bug 1894958)
Backed out changeset 4ef86875b1c2 (bug 1894958)
Backed out changeset 31e1c5284927 (bug 1894958)
Backed out changeset 29545556fe0b (bug 1894958)
2024-06-05 01:20:05 +03:00
Tom Ritter
71b7d5ccb5 Bug 1894958: Let's name this page more accurately r=timhuang
The purpose of this page is to improve the fingerprinting protections
in Firefox.

Differential Revision: https://phabricator.services.mozilla.com/D209599
2024-06-04 21:24:00 +00:00
Sandor Molnar
cc6a87da40 Backed out 7 changesets (bug 1894958) for causing bc failures @ browser_usercharacteristics.js CLOSED TREE
Backed out changeset f0b3873afbbf (bug 1894958)
Backed out changeset 0163ab00de90 (bug 1894958)
Backed out changeset dc5209d0115f (bug 1894958)
Backed out changeset c7c58e406791 (bug 1894958)
Backed out changeset 1ff86ac5480e (bug 1894958)
Backed out changeset 862f163cf35c (bug 1894958)
Backed out changeset 4ad50fcd042b (bug 1894958)
2024-06-05 00:07:37 +03:00
Tom Ritter
e26694557f Bug 1894958: Let's name this page more accurately r=timhuang
The purpose of this page is to improve the fingerprinting protections
in Firefox.

Differential Revision: https://phabricator.services.mozilla.com/D209599
2024-06-04 20:02:26 +00:00
Sean Burke
9b0f0d66e0 Bug 1900392 - Isolate x-moz-ews URI scheme to parent process. r=nika,jesup,smaug
Thunderbird architecture does not currently allow for redirecting channels to
child processes, so new schemes need to be isolated to the parent process.
`x-moz-ews` was selected to clearly designate that the scheme is private and
restricted to Mozilla/MZLA code. It doesn't follow the RFC 7595 recommendation
to use a registered domain as a namespace, but this was felt to be unwieldy.

Differential Revision: https://phabricator.services.mozilla.com/D212439
2024-06-03 21:04:18 +00:00
Norisz Fay
f31e183290 Backed out 3 changesets (bug 1718673, bug 196078) for causing wpt failures on report-frame-ancestors-with-x-frame-options.sub.html CLOSED TREE
Backed out changeset 6a54aa5039e7 (bug 196078)
Backed out changeset 0582d2fa1401 (bug 196078)
Backed out changeset d8d9a0fe366b (bug 1718673)
2024-06-01 03:33:07 +03:00
Norisz Fay
b8a048f1f4 Backed out changeset 1034029ae9ed (bug 1681457) for causing failures on test_window_close.html CLOSED TREE 2024-06-01 00:10:26 +03:00
Nika Layzell
58ee355a1b Bug 196078 - Part 2: Support displaying arbitrary text/* MIME types as plain text, r=smaug,necko-reviewers,valentin
This patch refactors how we check for text formats when deciding how to handle
resources, such that more text MIME types will be rendered in-browser, rather
than downloaded.

This change requires us to move more away from using the Gecko-Content-Viewers
category in the category manager for this decision, as we need to handle an
unlimited number of MIME types behind the scenes.

Support for Gecko-Content-Viewers was left in for both the in-tree use for
application/http-index-format and dynamically determining whether image/avif
and image/jxl are supported, as well as for the message/rfc822 type used by
Thunderbird.

Differential Revision: https://phabricator.services.mozilla.com/D212078
2024-05-31 17:30:23 +00:00
Nika Layzell
a562668089 Bug 1681457 - Allow non-auxiliary BrowsingContexts created by script to close themselves, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D211792
2024-05-31 17:27:15 +00:00
Artur Iunusov
871e121bb5 Bug 1819862: Reduce warnings from Msg_CleanupPendingLoadState about "actor cannot send", r=jstutte
Differential Revision: https://phabricator.services.mozilla.com/D172196
2024-05-31 09:37:35 +00:00
Ting-Yu Lin
6306934820 Bug 1896516 Part 7 - Remove PresShell::GetRootScrollFrameAsScrollable(). r=layout-reviewers,emilio
`PresShell::GetRootScrollFrameAsScrollable()` is equivalent to
`PresShell::GetRootScrollContainerFrame()`.

In ScrollContainerFrame.h, `DecideScrollableLayer()` has two versions, one has
four parameters, and the other has five parameters with the fifth parameter
`aDirtyRectHasBeenOverriden` having a default value `nullptr`. When we switch
the caller from `nsIScrollableFrame` to `ScrollContainerFrame`, we need to
remove the default value for the fifth parameter to avoid ambiguity.

Differential Revision: https://phabricator.services.mozilla.com/D211494
2024-05-30 06:32:20 +00:00
Ting-Yu Lin
f13f5fc5d4 Bug 1896516 Part 1 - Rename PresShell::GetRootScrollFrame(), and make it return ScrollContainerFrame. r=layout-reviewers,emilio
In theory, changing the return type from `nsIFrame*` to `ScrollContainerFrame*`
exposes `ScrollContainerFrame` to the callers who might not needed, but almost
all of the callers in cpp files are already exposed to `nsIScrollableFrame`, as
demonstrated in this patch via replacing the #include from
"nsIScrollableFrame.h" to "ScrollContainerFrame.h", so this is OK.

Some callers can be simplified since we no longer need `do_QueryFrame` to
`nsIScrollableFrame`.

Differential Revision: https://phabricator.services.mozilla.com/D211488
2024-05-30 06:32:17 +00:00
Oliver Medhurst
eab0a3a5ea Bug 1867545 - Remove popup state propagation for link click event handler r=dom-core,edgar
Differential Revision: https://phabricator.services.mozilla.com/D203780
2024-05-29 12:03:45 +00:00
Sebastian Hengst
ccb101be8f Backed out 15 changesets (bug 1896516) for causing scrolling crashes on macOS. a=backout
Backed out changeset fd6904338812 (bug 1896516)
Backed out changeset 2977ff81a23e (bug 1896516)
Backed out changeset c8a6b0e526d6 (bug 1896516)
Backed out changeset 3c06f22da72b (bug 1896516)
Backed out changeset f63b0c4335fe (bug 1896516)
Backed out changeset 6f7ab8adfa6e (bug 1896516)
Backed out changeset 997c9249dbed (bug 1896516)
Backed out changeset c964fccd5180 (bug 1896516)
Backed out changeset 7b481b747b7a (bug 1896516)
Backed out changeset 42e1bbe0ecb6 (bug 1896516)
Backed out changeset 717dac08b607 (bug 1896516)
Backed out changeset 2f0817331dbe (bug 1896516)
Backed out changeset b765169a7a8f (bug 1896516)
Backed out changeset a2d37b98273c (bug 1896516)
Backed out changeset ea9ecb543e66 (bug 1896516)
2024-05-29 11:22:52 +02:00
Ting-Yu Lin
9ab65dbb68 Bug 1896516 Part 7 - Remove PresShell::GetRootScrollFrameAsScrollable(). r=layout-reviewers,emilio
`PresShell::GetRootScrollFrameAsScrollable()` is equivalent to
`PresShell::GetRootScrollContainerFrame()`.

In ScrollContainerFrame.h, `DecideScrollableLayer()` has two versions, one has
four parameters, and the other has five parameters with the fifth parameter
`aDirtyRectHasBeenOverriden` having a default value `nullptr`. When we switch
the caller from `nsIScrollableFrame` to `ScrollContainerFrame`, we need to
remove the default value for the fifth parameter to avoid ambiguity.

Differential Revision: https://phabricator.services.mozilla.com/D211494
2024-05-28 04:46:19 +00:00
Ting-Yu Lin
8dc0807324 Bug 1896516 Part 1 - Rename PresShell::GetRootScrollFrame(), and make it return ScrollContainerFrame. r=layout-reviewers,emilio
In theory, changing the return type from `nsIFrame*` to `ScrollContainerFrame*`
exposes `ScrollContainerFrame` to the callers who might not needed, but almost
all of the callers in cpp files are already exposed to `nsIScrollableFrame`, as
demonstrated in this patch via replacing the #include from
"nsIScrollableFrame.h" to "ScrollContainerFrame.h", so this is OK.

Some callers can be simplified since we no longer need `do_QueryFrame` to
`nsIScrollableFrame`.

Differential Revision: https://phabricator.services.mozilla.com/D211488
2024-05-28 04:46:16 +00:00
Cristian Tuns
fc392b89ab Backed out changeset 9b708a1dc402 (bug 1890748) for causing bc failures in browser_permission_delegate_geo.js CLOSED TREE 2024-05-27 12:25:10 -04:00
Malte Juergens
6a1787e9e9 Bug 1885893 - Only collect HTTPS-First telemetry on successful request r=freddyb
This patch addresses the problem that we currently collect HTTPS-First telemetry
for sites that are not reachable at all, be it through always causing a error or
through always timing out.

- On a downgrade, do not collect telemetry instantly, but instead save the
  telemetry data in the load state for the downgraded request
- That telemetry data will then be copied over into the document load listener
  of the new request
- On a successful request, if we have downgrade data in the load listener, we
  collect the downgrade telemetry, as the downgrade seems to have been
  successful
- Similar to the downgrade case, we only count the upgrade metric once we
  encounter a successful request annotated with the information that it was
  upgraded by HTTPS-First, instead of counting it instantly on the decision to
  upgrade. This also means the upgrade metric will not include loads that are
  downgraded again anymore
- Add a testcase for a site which is neither reachable via HTTP nor HTTPS, and
  ensure no telemetry is collected

Differential Revision: https://phabricator.services.mozilla.com/D210792
2024-05-27 14:20:11 +00:00
Andreas Farre
ec8d5be38a Bug 1890748 - Move responsibility of FeaturePolicy initialization to nsILoadInfo. r=freddyb,necko-reviewers,jesup,dom-core,sefeng
Differential Revision: https://phabricator.services.mozilla.com/D207140
2024-05-27 10:06:58 +00:00
Butkovits Atila
f967675ec8 Backed out changeset a710fd347db2 (bug 1890748) for causing bustages at Document.cpp. CLOSED TREE 2024-05-24 18:06:30 +03:00
Andreas Farre
031a90d97c Bug 1890748 - Move responsibility of FeaturePolicy initialization to nsILoadInfo. r=freddyb,necko-reviewers,jesup,dom-core,sefeng
Differential Revision: https://phabricator.services.mozilla.com/D207140
2024-05-24 14:28:47 +00:00
ujas.thakkar
f8c049e130 Bug 1874917 - Rename SearchTestUtils.promiseNewSearchEngine to SearchTestUtils.installOpenSearchEngine r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D211309
2024-05-23 16:17:00 +00:00
tannal
68b73e7337 Bug 1853548 - Remove dom.no_unknown_protocol_error.enabled pref r=gregp,smaug
Differential Revision: https://phabricator.services.mozilla.com/D210862
2024-05-23 10:22:24 +00:00
Iulian Moraru
3d5936348b Backed out changeset 9a295c851c2e (bug 1895232) for causing multiple failures. CLOSED TREE 2024-05-22 21:03:20 +03:00
Sean
3cbf13bd8f Bug 1895232 - Convert do_GetService to using components::*::service in netwerk/ r=valentin,cookie-reviewers,places-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D209747
2024-05-22 17:13:29 +00:00
Jan-Niklas Jaeschke
8726853107 Bug 1895555 - Text Fragments: Implement same-document navigation. r=farre,dom-core
Same-document navigation follows a different code path than normal navigation
and was therefore not covered in the initial implementation for text fragments.
Same-document navigation does not set a URI in the `Document`, which
is the way cross-document navigation would parse text directives from the URL.

Instead, `nsDocShell::ScrollToAnchor()` is called via
`nsDocShell::InternalLoad()`-> `nsDocShell::HandleSameDocumentNavigation()`.
This code path needs to parse and remove the fragment directive from the new
fragment to be able to find text fragments and to allow for element-id fallback.
`nsDocShell::ScrollToAnchor()` needs to start an attempt to scroll to the text fragment
if it exists. It must not, however, clear the uninvoked text directives,  because a
same-document navigation could happen before the document is fully loaded,
hence the target text might not be part of the DOM tree.

As per spec, a second attempt to scroll to the text fragment is done after the load
is completed. This is done by `Document::ScrollToRef()`, which is called by
`nsDocumentViewer::LoadComplete()` after the load has finished.
This call will clear the uninvoked directives.

Differential Revision: https://phabricator.services.mozilla.com/D209726
2024-05-17 12:16:00 +00:00
Valentin Gosu
7cdfe9baad Bug 1784496 - The necko consumers should use the priority's incremental flag r=necko-reviewers,kershaw
This patch sets the incremental flag on document and image channels

Differential Revision: https://phabricator.services.mozilla.com/D209235
2024-05-15 08:18:42 +00:00
Emilio Cobos Álvarez
4f25d1180d Bug 1895229 - Remove nsIWebBrowserChromeFocus. r=hsivonen,dom-core
It's only implemented by BrowserChild, we can do this more directly.

Differential Revision: https://phabricator.services.mozilla.com/D209534
2024-05-06 11:30:34 +00:00
kycn
c34f4a5022 Bug 1677190 - Introduce SessionStoreFunctions for GeckoView package and move the existing SessionStoreFunctions from toolkit to the browser package. r=geckoview-reviewers,farre,nika,owlish
This change utilizes components.conf to distinguish between the contract implementations of nsISessionStoreFunctions per platform.

Differential Revision: https://phabricator.services.mozilla.com/D206904
2024-04-30 11:17:55 +00:00
Nika Layzell
b3f3e9a04a Bug 1892481 - More consistently enforce noscript and builtinclass in xpidl, r=xpcom-reviewers,necko-reviewers,valentin,media-playback-reviewers,mccr8,padenot
These properties were previously being checked much later, during xptcodegen,
and causing methods to be treated as noscript implicitly.

This change enforces the noscript requirements earlier when possible in
xpidl.py, to produce better errors, and adds addiitonal checks to ensure that
types which need to be builtinclass are marked as such.

This required some changes to interfaces in order to satisfy the new checks.

Differential Revision: https://phabricator.services.mozilla.com/D207804
2024-04-22 18:19:58 +00:00
Paul Zuehlcke
ba487d8c6e 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
Yi Xiong Wong
615598bb11 Bug 1880914 - Move BrowserForceEncodingDetection. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D207108
2024-04-15 10:22:45 +00:00
Norisz Fay
189fed6949 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
611a348f53 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
29d972749f 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
8ad0c8b248 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
Greg Stoll
b32aa334d7 Bug 1875481 - Part 3: Add content analysis support to printing operations r=handyman,spohl,fluent-reviewers,kpatenio,smaug,emilio
Differential Revision: https://phabricator.services.mozilla.com/D200979
2024-04-10 00:15:47 +00:00
Stanca Serban
9879879814 Backed out 3 changesets (bug 1875481) for basicWindowDotPrintTest related junit failures.
Backed out changeset cd024cb2768e (bug 1875481)
Backed out changeset 6b7be15cd017 (bug 1875481)
Backed out changeset d1da53c0673b (bug 1875481)
2024-04-09 05:56:47 +03:00
Greg Stoll
5626f7b60c Bug 1875481 - Part 3: Add content analysis support to printing operations r=handyman,spohl,fluent-reviewers,kpatenio,smaug,emilio
Differential Revision: https://phabricator.services.mozilla.com/D200979
2024-04-08 23:53:58 +00:00
Nika Layzell
a48079cd72 Bug 1881863 - Part 1: Standardize on boolean over bool in xpidl, r=xpcom-reviewers,necko-reviewers,valentin,extension-reviewers,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,search-reviewers,anti-tracking-reviewers,places-reviewers,nalexander,emilio,zombie,sgalich,karlt,lina,Standard8
Previously the `boolean` type was also declared using a `bool` typedef in
xpidl, meaning that both were used in various places. This patch standardizes
on the built-in `boolean` type, removing the typedef.

Differential Revision: https://phabricator.services.mozilla.com/D206382
2024-04-04 18:45:21 +00:00
Tom Ritter
c816dcfce3 Bug 1882422: Use a local testing page to return complex data and make use of it in C++-land r=peterv
- Create a local page we will access via an about: URL
- In that page, demonstrate how to do some stuff, then fire a custom event
  indicating its stuff is done _and_ return complex data in that event.
  console.log() didn't seem to be visible in the HiddenWindow, so I also
  piped out debug strings for development purposes, so they can be
  console.logged in the Service, where we can see them.
- Instead of listening for DOMContentLoaded/pageshow, instead listen for
  the new CustomEvent.
- In UserCharacteristicsPageService, receive the data from the page and
  populate the appropriate Glean metrics
- Refactor the calling of nsUserCharacteristics::PopulateData() and
  SubmitPing().  Now we call PopulateDataAndEventuallySubmit() which will
  eventually call SubmitPing after our promise is resolved.
- To make it a little cleaner (so ContentPageStuff() isn't calling
  SubmitPing()) we return the promise out of ContentPageStuff() that
  PopulateDataAndEventuallySubmit() will await and then call SubmitPing()
  when that promise resolves

Differential Revision: https://phabricator.services.mozilla.com/D203055
2024-04-03 23:43:17 +00:00
Emilio Cobos Álvarez
31ce421403 Bug 1689705 - Remove marquee events. r=smaug
After bug 306344 this is the last remaining incompatibility with
<marquee>. I think we should be able to drop it. Use counters for
"finish" are relatively high (>0.1%), but I'm pretty sure that's because
that event name is shared with web animations. "bounce" is a more
realistic measure, and that's 0.003%, which is more expected.

Differential Revision: https://phabricator.services.mozilla.com/D206387
2024-04-03 17:40:44 +00:00
Emilio Cobos Álvarez
8d73fd209e Bug 1888242 - Simplify viewport handling in RDM. r=bradwerth,devtools-reviewers,ochameau
In particular:

 * Always handle meta viewport in RDM. This fixes bug 1625999 too by
   making touch simulation enabled and disabled consistent.

 * Restore the resolution to 1 when toggling RDM. This is just simpler,
   and we're not keeping around the visual viewport offsets anyways
   so...

 * Deal with the change more easily, at the same point we switch
   scrollbars etc.

Differential Revision: https://phabricator.services.mozilla.com/D206266
2024-04-02 15:21:04 +00:00
Yi Xiong Wong
955c9df070 Bug 1880914 - Move all reload functions. r=Gijs,devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D205527
2024-03-28 17:05:01 +00:00
Peter Van der Beken
7298d91b7f Bug 1875028 - With Fission enabled "onbeforeunload" prompts are automatically accepted for cross-origin navigations. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D204880
2024-03-26 07:42:58 +00:00
Tom Ritter
b8555f5d7d Bug 1885598: Assert on a passed remoteTypeOverride to avoid footguns r=nika
Differential Revision: https://phabricator.services.mozilla.com/D204791
2024-03-25 18:57:07 +00:00
aiunusov
fe9f006639 Bug 1883860 - nsDocShell::HandleSameDocumentNavigation() cause crash in SetDocumentURI, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D204611
2024-03-22 12:27:38 +00:00
Sandor Molnar
72c98c7f24 Backed out changeset 7b83373f7a9e (bug 1883860) for causing build bustages @ caps/tests/gtest/TestScriptSecurityManager.cpp CLOSED TREE 2024-03-22 02:35:03 +02:00
aiunusov
b201b63e61 Bug 1883860 - nsDocShell::HandleSameDocumentNavigation() cause crash in SetDocumentURI, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D204611
2024-03-22 00:07:27 +00:00
Gijs Kruitbosch
07aa4af286 Bug 1885189 - remove some test-only uses of prompts.contentPromptSubDialog, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D204533
2024-03-13 22:19:58 +00:00
Emilio Cobos Álvarez
d7f3627404 Bug 1873833 - Make tooltips work on anonymous content / UA widgets. r=smaug,Gijs
We also simplify the tooltip text provider loop, and make it work better
now that e.g. the anonymous button in file inputs can be targeted.

Differential Revision: https://phabricator.services.mozilla.com/D203759
2024-03-13 11:30:57 +00:00
Peter Van der Beken
108dd29bbc Bug 1883279 - Check browser.navigation.requireUserInteraction before skipping entries based on user interaction. r=farre
We don't want to start skipping entries just because callers passed in
aRequireUserInteraction, since the feature is not ready and the flag in the
entries might not be correct.

Differential Revision: https://phabricator.services.mozilla.com/D203376
2024-03-13 10:56:33 +00:00
Peter Van der Beken
80aa10467a Bug 1883278 - Force-enable platform collection code of session store when SHIP is enabled. r=farre,geckoview-reviewers,sessionstore-reviewers
If session history in the parent is enabled then session store only works
correctly if the platform collection code is turned on.

Differential Revision: https://phabricator.services.mozilla.com/D203375
2024-03-13 10:56:33 +00:00
Peter Van der Beken
30b363a85d Bug 1883278 - Remove browser.sessionstore.collect_session_storage and browser.sessionstore.collect_zoom. r=farre,sessionstore-reviewers
These prefs don't do anything unless browser.sessionstore.platform_collection is
enabled, but we don't need the granularity that they provide. Let's just use
have the one  browser.sessionstore.platform_collection pref control everything.

Differential Revision: https://phabricator.services.mozilla.com/D203374
2024-03-13 10:56:32 +00:00
aiunusov
ff56ddd0fc Bug 1870611 - CreateAboutBlankDocumentViewer: added profiler marker, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D198696
2024-03-12 16:44:19 +00:00
Thomas Wisniewski
1c49e08e91 Bug 1784831 - set messageManagerGroups on the docshell test helper's actor to prevent getting events from system addon event pages; r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D204146
2024-03-11 23:52:42 +00:00
Sandor Molnar
9ed09f3a97 Backed out changeset 6de5c18af91b (bug 1784831) for causing mochitest perma failures in docshell/test/chrome/test_bug298622.xhtml CLOSED TREE 2024-03-11 23:34:10 +02:00
Nika Layzell
7fb185e583 Bug 1868001 - Part 1: Ignore Content-Disposition if DONT_RETARGET is set, r=smaug
This patch modifies the behaviour of loads when the DONT_RETARGET
nsIURILoader flag is set, making them ignore the Content-Disposition
header. This means that loads which cannot trigger downloads will
attempt to display handleable content which would otherwise be
downloaded.

This keeps overall behaviour of object/embed elements more similar to
their behaviour pre-Fission, while allowing them to load attachment PDFs
and Images as-if they were being displayed by a plugin.

This patch does not change the existing behaviour around
unknown/unhandleable resource types in object/embed elements.
In Gecko, object/embed elements are prevented from triggering downloads
or external protocol handlers during their initial load. Other browser
engines can trigger a download for an unknown resource type (or
sometimes an attachment resource).

The new pref dom.navigation.object_embed.allow_retargeting can be
enabled to instead trigger a download when loading these resources
within an object/embed element.

Differential Revision: https://phabricator.services.mozilla.com/D201645
2024-03-11 20:17:41 +00:00
Sandor Molnar
742fd6aa4d Backed out changeset 61e803f1a869 (bug 1873833) for causing bc failures @ browser_delay_autoplay_silentAudioTrack_media CLOSED TREE 2024-03-11 21:34:20 +02:00
Thomas Wisniewski
e981a4f47e Bug 1784831 - set messageManagerGroups on the docshell test helper's actor to prevent getting events from system addon event pages; r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D204146
2024-03-11 18:17:47 +00:00
Emilio Cobos Álvarez
ce179a801b Bug 1873833 - Make tooltips work on anonymous content / UA widgets. r=smaug,Gijs
We also simplify the tooltip text provider loop, and make it work better
now that e.g. the anonymous button in file inputs can be targeted.

Differential Revision: https://phabricator.services.mozilla.com/D203759
2024-03-11 17:27:21 +00:00
mcheang
00f0ac69d1 Bug 1870685 - Ensure mochi browser chrome tests pass with search-config-v2 enabled. r=Standard8
Depends on D202637

Differential Revision: https://phabricator.services.mozilla.com/D204133
2024-03-11 17:07:13 +00:00
Daisuke Akatsuka
fd39068188 Bug 130327: Use exposable URL when updating history r=mak
Differential Revision: https://phabricator.services.mozilla.com/D193271
2024-03-07 05:11:51 +00:00
Sandor Molnar
f620faa5e5 Backed out 3 changesets (bug 130327) for causing build bustages @ toolkit/components/places/nsFaviconService.cpp
Backed out changeset 23d5336f3a16 (bug 130327)
Backed out changeset 7303defc69b0 (bug 130327)
Backed out changeset 7f3eb4071a8c (bug 130327)
2024-03-07 02:28:35 +02:00
Daisuke Akatsuka
9d9d8f080d Bug 130327: Use exposable URL when updating history r=mak
Differential Revision: https://phabricator.services.mozilla.com/D193271
2024-03-06 23:56:37 +00:00
Natalia Csoregi
f456a722ed Bug 1807880 - Disabled docshell/test/mochitest/test_bug511449.html on all platforms for causing frequent failures. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D203383
2024-03-06 12:02:16 +00:00
Joel Maher
2a0bfb5827 Bug 1881925 - standardize on more manifest conditions. r=aryx,credential-management-reviewers,devtools-reviewers,dom-storage-reviewers,omc-reviewers,nchevobbe,janv,issammani
Differential Revision: https://phabricator.services.mozilla.com/D202663
2024-03-05 02:14:17 +00:00
Gabriele Svelto
aa43fa218e Bug 1831092 - Use the new pull-based API for all crash annotations and remove the global annotations table r=jgilbert,necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,padenot,handyman,afranchuk,valentin,alwu,sotaro
This changes comes with several different refactorings all rolled into one,
unfotunately I couldn't find a way to pull them apart:
- First of all annotations now can either recorded (that is, we copy the value
  and have the crash reporting code own the copy) or registered. Several
  annotations are changed to use this functionality so that we don't need to
  update them as their value change.
- The code in the exception handler is modified to read the annotations from
  the mozannotation_client crate. This has the unfortunate side-effect that
  we need three different bits of code to serialize them: one for annotations
  read from a child process, one for reading annotations from the main process
  outside of the exception handler and one for reading annotations from the
  main process within the exception handler. As we move to fully
  out-of-process crash reporting the last two methods will go away.
- The mozannotation_client crate now doesn't record annotation types anymore.
  I realized as I was working on this that storing types at runtime has two
  issues: the first one is that buggy code might change the type of an
  annotation (that is record it under two different types at two different
  moments), the second issue is that types might become corrupt during a
  crash, so better enforce them at annotation-writing time. The end result is
  that the mozannotation_* crates now only store byte buffers, track the
  format the data is stored in (null-terminated string, fixed size buffer,
  etc...) but not the type of data each annotation is supposed to contain.
- Which brings us to the next change: concrete types for annotations are now
  enforced when they're written out. If an annotation doesn't match the
  expected type it's skipped. Storing an annotation with the wrong type will
  also trigger an assertion in debug builds.

Differential Revision: https://phabricator.services.mozilla.com/D195248
2024-03-04 10:24:43 +00:00
Dave Townsend
7577e9eda1 Bug 1864896: Autofix unused function arguments (docshell). r=nika
Differential Revision: https://phabricator.services.mozilla.com/D202961
2024-03-02 15:26:00 +00:00
Peter Van der Beken
2c8bf85445 Bug 1640839 - Add IPC serializer for WebIDL enums. r=mccr8,jgilbert,media-playback-reviewers,dom-storage-reviewers,janv,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201339
2024-03-02 07:50:22 +00:00
Natalia Csoregi
8c2521e9d5 Backed out 13 changesets (bug 1640839) for causing bustage on Element.cpp CLOSED TREE
Backed out changeset 179ceb82c9e5 (bug 1640839)
Backed out changeset 73f498a821f0 (bug 1640839)
Backed out changeset dc2d3d0e0365 (bug 1640839)
Backed out changeset ddc989ac0509 (bug 1640839)
Backed out changeset e595bb3feea8 (bug 1640839)
Backed out changeset c85aca04e27f (bug 1640839)
Backed out changeset 98e8e3a4047a (bug 1640839)
Backed out changeset 59ef180517db (bug 1640839)
Backed out changeset af2f5e293662 (bug 1640839)
Backed out changeset 89aa6d9dc598 (bug 1640839)
Backed out changeset 67b722a722f9 (bug 1640839)
Backed out changeset 24a9665c6ced (bug 1640839)
Backed out changeset d93f199385e9 (bug 1640839)
2024-03-01 18:23:08 +02:00
Peter Van der Beken
a0448e7053 Bug 1640839 - Add IPC serializer for WebIDL enums. r=mccr8,jgilbert,media-playback-reviewers,dom-storage-reviewers,janv,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201339
2024-03-01 14:31:12 +00:00
Cristian Tuns
633ccd1c45 Backed out changeset 4099afcff2be (bug 1881925) for causing gecko decision task failures in browser.toml CLOSED TREE 2024-02-29 16:49:46 -05:00
Joel Maher
63ecc826a4 Bug 1881925 - standardize on more manifest conditions. r=aryx,credential-management-reviewers,devtools-reviewers,dom-storage-reviewers,omc-reviewers,nchevobbe,janv,issammani
Differential Revision: https://phabricator.services.mozilla.com/D202663
2024-02-29 21:25:17 +00:00
Malte Juergens
686328e490 Bug 761152 - Copy referrer info to new session history entry on history.pushState r=freddyb
Per spec [1], we should copy over the complete document state [2], which
includes the referrer info. Bug 1773192 has already added this for the
"replace" case when the session history is in parent (almost always the case),
but it is still missing for the "push" case, and the "replace" case when the
session history is not in parent.

[1] https://html.spec.whatwg.org/multipage/browsing-the-web.html#url-and-history-update-steps
[2] https://html.spec.whatwg.org/multipage/browsing-the-web.html#document-state

Differential Revision: https://phabricator.services.mozilla.com/D200684
2024-02-22 14:29:06 +00:00
Emilio Cobos Álvarez
a56f40eee5 Bug 1881488 - Use a static pref for tooltip delay. r=masayuki,dom-core
It's 500 everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D202419
2024-02-22 12:59:41 +00:00
Sandor Molnar
b1d213acb7 Backed out changeset 8e21fdfc60f0 (bug 1868001) for causing mochitest failures at dom/tests/mochitest/general/test_resource_timing_cross_origin.html CLOSED TREE 2024-02-20 20:36:30 +02:00
Nika Layzell
ec657d1c80 Bug 1868001 - Ignore Content-Disposition if DONT_RETARGET is set, r=smaug
This patch modifies the behaviour of loads when the DONT_RETARGET
nsIURILoader flag is set, making them ignore the Content-Disposition
header. This means that loads which cannot trigger downloads will
attempt to display handleable content which would otherwise be
downloaded.

This keeps overall behaviour of object/embed elements more similar to
their behaviour pre-Fission, while allowing them to load attachment PDFs
and Images as-if they were being displayed by a plugin.

This patch does not change the existing behaviour around
unknown/unhandleable resource types in object/embed elements.
In Gecko, object/embed elements are prevented from triggering downloads
or external protocol handlers during their initial load. Other browser
engines can trigger a download for an unknown resource type (or
sometimes an attachment resource).

The new pref dom.navigation.object_embed.allow_retargeting can be
enabled to instead trigger a download when loading these resources
within an object/embed element.

Differential Revision: https://phabricator.services.mozilla.com/D201645
2024-02-20 17:33:57 +00:00
Gijs Kruitbosch
ff17e7fc68 Bug 1780071 - Manual fixes/disabling of no-comparison-or-assignment-inside-ok for exceptional cases, r=Standard8,devtools-reviewers,anti-tracking-reviewers,places-reviewers,dom-storage-reviewers,pbz,asuth,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D198979
2024-02-19 23:30:40 +00:00
Iulian Moraru
3c429990cb Backed out 2 changesets (bug 1875040) for causing performance regression - Bug 1877481. CLOSED TREE
Backed out changeset 8af7503ecb57 (bug 1875040)
Backed out changeset 0e77ff8e2bfc (bug 1875040)
2024-02-15 17:40:41 +02:00
Chris H-C
73e530d7dd Bug 1877842 - Migrate performance GVST probes r=perry.mcmanis,denispal
Most are brought over straightforwardly, their Telemetry callsites reworded
to use Glean, with mirroring to the Telemetry probes taken care of by the Glean
Interface For Firefox Telemetry (see the telemetry_mirror property).

There were two special cases: PERF_DOM_CONTENT_LOADED_FROM_RESPONSESTART_MS,
and PERF_DOM_CONTENT_LOADED_MS. Both were removed as they were unused.

Differential Revision: https://phabricator.services.mozilla.com/D200867
2024-02-09 21:11:05 +00:00
Emilio Cobos Álvarez
2971047c81 Bug 1875100 - Propagate top level activeness automatically to top descendants. r=nika,tabbrowser-reviewers,mconley,extension-reviewers,robwu,geckoview-reviewers,owlish,kaya
For that, opt in tabbrowser and the shopping sidebar to manual
activeness management.

Differential Revision: https://phabricator.services.mozilla.com/D198942
2024-02-07 10:58:15 +00:00
Cristian Tuns
2d66624de2 Backed out changeset ecd780688279 (bug 1875100) for causing mochitest failures in test_suspend_media_by_inactive_docshell.html 2024-02-07 01:25:21 -05:00
Emilio Cobos Álvarez
e68568b511 Bug 1875100 - Propagate top level activeness automatically to top descendants. r=nika,tabbrowser-reviewers,mconley,extension-reviewers,robwu,geckoview-reviewers,owlish
For that, opt in tabbrowser and the shopping sidebar to manual
activeness management.

Differential Revision: https://phabricator.services.mozilla.com/D198942
2024-02-06 21:47:37 +00:00
Gregory Pappas
6ce8dcf31c Bug 1878530 - Run test_subframe_stop_after_parent_error.js on Android r=nika
It doesn't fail on try, so we should try to enable this.

Differential Revision: https://phabricator.services.mozilla.com/D200575
2024-02-05 18:42:10 +00:00
zcanceling
cd8a3ca314 Bug 1876311 - Remove TODO comment from fixed bug 1561706 r=emilio DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D200594
2024-02-04 21:30:42 +00:00
Gregory Pappas
9f654f22ea Bug 1876942 - Run docshell/test/unit/test_subframe_stop_after_parent_error.js with E10S enabled r=nika
The goal of these modifications	is to avoid this assertion when	the test
is run with E10S enabled
https://searchfox.org/mozilla-central/rev/f5f63e51c6b91038d6d9fb0e635cad516fc403e6/netwerk/ipc/ParentProcessDocumentChannel.cpp#66-70

Differential Revision: https://phabricator.services.mozilla.com/D199805
2024-02-02 20:54:49 +00:00
Malte Juergens
bf96ecb63a Bug 1750706 - Copy referrer info to new session history entry during fragment navigation r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D199746
2024-02-01 10:28:32 +00:00
Marc Seibert
9cf6a2cfc5 Bug 1841869 - entering "abc @xyz.[TLD]" in address bar opens a prompt regarding loading "xyz.[TLD]" instead of searching for "abc @xyz.[TLD]" on the default search engine.r=adw
Differential Revision: https://phabricator.services.mozilla.com/D198196
2024-01-31 19:07:57 +00:00
Tom Schuster
d9047629b5 Bug 1876276 - Remove dead nsIDocShell allowPlugins code. r=emilio,sessionstore-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D199491
2024-01-31 13:23:52 +00:00
Iulian Moraru
448769c125 Backed out changeset 4871c819b21e (bug 1876276) for causing multiple bc failures. CLOSED TREE 2024-01-31 14:25:42 +02:00
Tom Schuster
ab34543442 Bug 1876276 - Remove dead nsIDocShell allowPlugins code. r=emilio,sessionstore-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D199491
2024-01-31 09:36:36 +00:00
Emilio Cobos Álvarez
f26fefccfa Bug 1877242 - Use a FunctionRef in CanonicalBrowsingContext::CallOnAllTopDescendants. r=nika
This should be marginally more efficient, in theory, so do it drive-by.

Differential Revision: https://phabricator.services.mozilla.com/D199902
2024-01-30 23:24:44 +00:00
Emilio Cobos Álvarez
cce5bdd802 Bug 1877242 - Avoid some unnecessary refcounting churn when accessing parent-cross-chrome-boundary. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D199901
2024-01-30 23:24:43 +00:00
Tom Marble
3c78905f47 Bug 1868866 - adds ManifestParser TOML linter r=jmaher,linter-reviewers,ahal,webdriver-reviewers,settings-reviewers,search-reviewers,devtools-reviewers,fxview-reviewers,cookie-reviewers,sessionstore-reviewers,places-reviewers,dom-storage-reviewers,translations-reviewers,valentin,whimboo,Standard8,sclements,jesup
Differential Revision: https://phabricator.services.mozilla.com/D199054
2024-01-29 17:30:48 +00:00
Sandor Molnar
51bb77759a Backed out changeset 2be67d91cf16 (bug 1868866) for causing Mn failures at toolkit/xre/test/marionette/test_exitcode.py CLOSED TREE 2024-01-27 00:15:22 +02:00
Tom Marble
2434015dc5 Bug 1868866 - adds ManifestParser TOML linter r=jmaher,linter-reviewers,ahal,webdriver-reviewers,settings-reviewers,search-reviewers,devtools-reviewers,fxview-reviewers,cookie-reviewers,sessionstore-reviewers,places-reviewers,dom-storage-reviewers,translations-reviewers,valentin,whimboo,Standard8,sclements,jesup
Differential Revision: https://phabricator.services.mozilla.com/D199054
2024-01-26 20:06:56 +00:00
Joel Maher
3ad5072cf1 Bug 1873732 - remove outdated manifest conditions and use consistent conditions. r=aryx,necko-reviewers,jgilbert,settings-reviewers,credential-management-reviewers,devtools-reviewers,sessionstore-reviewers,dom-storage-reviewers,sgalich,kershaw,nchevobbe,janv,dao
Differential Revision: https://phabricator.services.mozilla.com/D198082
2024-01-25 00:27:05 +00:00
Daisuke Akatsuka
c051aa567d Bug 1849866: Rename moz-anno:favicon protocol to cached-favicon r=necko-reviewers,places-reviewers,valentin,mak
Differential Revision: https://phabricator.services.mozilla.com/D198130
2024-01-24 22:05:42 +00:00
Stanca Serban
221d7acc5b Backed out changeset 54462970f797 (bug 1873732) for causing web platform tests failures. 2024-01-24 21:08:19 +02:00
Joel Maher
807575f8e1 Bug 1873732 - remove outdated manifest conditions and use consistent conditions. r=aryx,necko-reviewers,jgilbert,settings-reviewers,credential-management-reviewers,devtools-reviewers,sessionstore-reviewers,dom-storage-reviewers,sgalich,kershaw,nchevobbe,janv,dao
Differential Revision: https://phabricator.services.mozilla.com/D198082
2024-01-24 16:35:54 +00:00
Andreas Farre
b51bf27f13 Bug 1875040 - Use GetExtantDocument instead of GetDocument. r=smaug
Avoids accidentally creating a document when checking if a document's
presentation can be saved.

Differential Revision: https://phabricator.services.mozilla.com/D198781
2024-01-23 08:04:51 +00:00
Tom Schuster
40de2c94b3 Bug 1875466 - Remove nsContentUtils::ShouldHideObjectOrEmbedImageDocument. r=emilio
Depends on D199114

Differential Revision: https://phabricator.services.mozilla.com/D199115
2024-01-22 14:26:10 +00:00
Gregory Pappas
b3e0fd295c Bug 1724089 - Remove browser.tabs.remote.autostart pref r=webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jgraham,extension-reviewers,mossop,sparky,robwu,owlish,necko-reviewers,jmaher,valentin
Differential Revision: https://phabricator.services.mozilla.com/D192136
2024-01-22 09:52:53 +00:00
Iulian Moraru
b643962356 Backed out changeset da092d881d44 (bug 1724089) for causing valgrind build bustages. 2024-01-18 22:12:44 +02:00
Gregory Pappas
c2ed911bfb Bug 1724089 - Remove browser.tabs.remote.autostart pref r=webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jgraham,extension-reviewers,mossop,sparky,robwu,owlish,necko-reviewers,jmaher,valentin
Differential Revision: https://phabricator.services.mozilla.com/D192136
2024-01-18 16:25:47 +00:00
Noemi Erli
623ef8a876 Backed out changeset be072303feaf (bug 1724089) for causing xpc failures in test_headless.js 2024-01-18 16:44:10 +02:00
Gregory Pappas
68e8f55749 Bug 1724089 - Remove browser.tabs.remote.autostart pref r=webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jgraham,extension-reviewers,mossop,sparky,robwu,owlish,necko-reviewers,jmaher,valentin
Differential Revision: https://phabricator.services.mozilla.com/D192136
2024-01-18 11:51:13 +00:00
Emilio Cobos Álvarez
7bf069df3a Bug 1840762 - Don't throttle postMessage for pdf.js. r=smaug
This should be safe to uplift.

Differential Revision: https://phabricator.services.mozilla.com/D198829
2024-01-17 21:49:34 +00:00
Emilio Cobos Álvarez
a94d5c59e6 Bug 1874701 - Convert aboutNetError to an html page. r=Gijs,valentin
While I'm looking at this / bug 1866884, this it probably makes sense,
wdyt?

Differential Revision: https://phabricator.services.mozilla.com/D198571
2024-01-15 15:03:19 +00:00
Emilio Cobos Álvarez
ec149cc5de Bug 1866884 - Make browser_alternate_fixup_middle_click_link.js wait for error page properly. r=Gijs
Depends on D198571

Differential Revision: https://phabricator.services.mozilla.com/D198574
2024-01-15 15:01:51 +00:00
Tooru Fujisawa
da72302e92 Bug 1873330 - Part 4: Add UserActivation::Modifiers getters. r=smaug
In order to use the modifiers in nsGlobalWindowOuter::OpenInternal, add accessor
methods to BrowsingContext, Document, and WindowContext.
Those accessors behave in the same way as ConsumeTransientUserGestureActivation
and RevisePopupAbuseLevel, except for checking the PopupBlocker state.

Differential Revision: https://phabricator.services.mozilla.com/D197862
2024-01-11 17:24:02 +00:00
Tooru Fujisawa
1eb9eb9c1a Bug 1873330 - Part 3: Store modifiers for user activation with input event. r=smaug
Depends on D197860

Differential Revision: https://phabricator.services.mozilla.com/D197861
2024-01-11 17:24:02 +00:00
Tooru Fujisawa
aeb2eac8f0 Bug 1873330 - Part 2: Add UserActivation::Modifiers and UserActivation::StateAndModifiers. r=smaug
Associate modifier keys to user activation, in order to use the modifiers
in `window.open` initiated by the user activation.

Depends on D197859

Differential Revision: https://phabricator.services.mozilla.com/D197860
2024-01-11 17:24:01 +00:00
Cristian Tuns
31c5852d57 Backed out changeset 1313a6a0c641 (bug 1669453) for causing wpt failures in history_pushstate_url_rewriting.html CLOSED TREE 2024-01-10 21:16:11 -05:00
David
096f34a11c Bug 1669453 - Get user passwords after validating same-origin. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D198084
2024-01-10 23:31:03 +00:00
Emilio Cobos Álvarez
267ec889a9 Bug 1873967 - Remove DocGroup::TryToLoadIframesInBackground. r=sefeng
This is somewhat complex, untested, never shipped, and predates
fission.

Remove it to simplify the code.

Depends on D198183

Differential Revision: https://phabricator.services.mozilla.com/D198184
2024-01-10 22:33:17 +00:00