Commit Graph

2015 Commits

Author SHA1 Message Date
Gregory Pappas
78d78a35da Bug 1848966 - Remove dom.document.exec_command.nested_calls_allowed pref r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D212578
2024-06-05 02:48:31 +00:00
Nika Layzell
11d3698341 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
23266c76a6 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
Norisz Fay
39f756dabc 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
ed9f22a2fc 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
f42df8021b 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
7025bc892e 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
Cristian Tuns
ce526f805f 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
Andreas Farre
b66f6322f2 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
bd73be20f9 Backed out changeset a710fd347db2 (bug 1890748) for causing bustages at Document.cpp. CLOSED TREE 2024-05-24 18:06:30 +03:00
Andreas Farre
bcf940af03 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
Bas Schouten
cce5c1992a Bug 1898384: Collect LCP under the same conditions as we collect other pageload telemetry. r=sefeng
Differential Revision: https://phabricator.services.mozilla.com/D211302
2024-05-23 11:24:59 +00:00
Adam Vandolder
923e754906 Bug 1887817 - Create document for parseHTMLUnsafe within the correct docgroup. r=dom-core,jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D210556
2024-05-21 14:37:29 +00:00
Jan-Niklas Jaeschke
b78b4a3fe3 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
Emilio Cobos Álvarez
d554a723e9 Bug 1897322 - More consistently deal with pres shell style observers. r=smaug
Much like we deal with resize events.

Differential Revision: https://phabricator.services.mozilla.com/D210776
2024-05-17 11:56:36 +00:00
Emilio Cobos Álvarez
0dfa4982e1 Bug 1848899 - Remove widget.non-native-theme.enabled. r=desktop-theme-reviewers,dao,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D209537
2024-05-07 08:32:14 +00:00
Norisz Fay
f8e75c3dc1 Backed out changeset 9500b79c1ab4 (bug 1848899) for causing failures on test_bug869314.html CLOSED TREE 2024-05-07 06:13:38 +03:00
Emilio Cobos Álvarez
8f5767fb6f Bug 1848899 - Remove widget.non-native-theme.enabled. r=desktop-theme-reviewers,dao,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D209537
2024-05-06 20:44:34 +00:00
Tom Ritter
30ae40026f Bug 1878716: Copy the randomization key from the opener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D201087
2024-05-02 13:55:36 +00:00
Stanca Serban
9eec100155 Backed out changeset 1ed5eea3a1e1 (bug 1892231) for causing mochitests failures in test_focus.xhtml. 2024-04-26 09:05:08 +03:00
Denis Palmeiro
b77357778c Bug 1892231: Add a flag to the page load event indicating whether a webdriver is running. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D207992
2024-04-25 12:09:10 +00:00
Malte Juergens
2b5dc70e7d Bug 1885949 - Do not copy over HTTPS-First upgrade flag into new loadinfo r=necko-reviewers,freddyb,simonf,jesup r=reland
Differential Revision: https://phabricator.services.mozilla.com/D205048
2024-04-17 12:35:56 +00:00
Noemi Erli
88d6e87c9d Backed out changeset 28b2b5bfbed5 (bug 1885949) for causing http related mochitest failures CLOSED TREE 2024-04-17 19:32:37 +03:00
Malte Juergens
8f650f7866 Bug 1885949 - Do not copy over HTTPS-First upgrade flag into new loadinfo r=necko-reviewers,freddyb,simonf,jesup
Differential Revision: https://phabricator.services.mozilla.com/D205048
2024-04-17 12:35:56 +00:00
Emilio Cobos Álvarez
46a31e3de5 Bug 1891597 - Simplify IntersectionObserver notifications. r=smaug
DOMIntersectionObserver::Update doesn't run script, so we can write this
code in a more straight-forward way.

Differential Revision: https://phabricator.services.mozilla.com/D207478
2024-04-16 02:58:10 +00:00
Pier Angelo Vendrame
08f3f6051f Bug 1886687: Report document.lastModified in UTC when using RFP. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D205289
2024-04-10 13:54:22 +00:00
keithamus
e59fd12d73 Bug 1888088 - Allow nested fullscreen elements r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D205802
2024-04-09 21:08:20 +00:00
Jan-Niklas Jaeschke
6019fb9e6a Bug 1867939, part 5: Integrate find-text-directive algorithm into Document load. r=peterv,farre,dom-core
This patch integrates the algorithm to find a text fragment range
into the document loading mechanism.
Unlike described in the spec, the fragment directive is not stripped
from the URL in the Session History Entry, instead it is stripped when
setting the URI into the Document using `Document::SetURI()`,
as well as when accessing the URL through `Location`.

The `PresShell` class is extended by a new method which sets the
ranges created from the text directives into the FrameSelection as
TargetText selection and scrolls it into view.

Security restrictions like force load at top and cross-origin iframes
are not yet considered in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D195688
2024-04-04 14:39:33 +00:00
Jan-Niklas Jaeschke
1edea30ba5 Bug 1867939, part 1: Add FragmentDirective webidl and pref. r=dom-core,webidl,emilio,hsivonen
This patch also adds the empty shell of the `FragmentDirective` class to the `Document`.

Differential Revision: https://phabricator.services.mozilla.com/D195684
2024-04-04 14:39:31 +00:00
Emilio Cobos Álvarez
de09ab0dd6 Bug 1887719 - More consistently use UTF8String/nsCString for URLs. r=necko-reviewers,webidl,anti-tracking-reviewers,places-reviewers,jari,kershaw,janv,smaug,hsivonen
Sorry for the massive patch but I found it hard to split without
introducing a bunch of copies around...

This mostly makes necko and DOM agree on which strings to use, which
should result on less copies and conversions.

Differential Revision: https://phabricator.services.mozilla.com/D205601
2024-04-04 11:49:57 +00:00
Stanca Serban
ce5dc60809 Backed out 6 changesets (bug 1867939) for causing wpt failures in target-text-010.html. CLOSED TREE
Backed out changeset 44101c258e52 (bug 1867939)
Backed out changeset c53267e1b460 (bug 1867939)
Backed out changeset 0748839408e5 (bug 1867939)
Backed out changeset 38631fbd2f2f (bug 1867939)
Backed out changeset d77b9257c842 (bug 1867939)
Backed out changeset 0d269b891421 (bug 1867939)
2024-04-04 00:50:50 +03:00
Jan-Niklas Jaeschke
4117054bb6 Bug 1867939, part 5: Integrate find-text-directive algorithm into Document load. r=peterv,farre,dom-core
This patch integrates the algorithm to find a text fragment range
into the document loading mechanism.
Unlike described in the spec, the fragment directive is not stripped
from the URL in the Session History Entry, instead it is stripped when
setting the URI into the Document using `Document::SetURI()`,
as well as when accessing the URL through `Location`.

The `PresShell` class is extended by a new method which sets the
ranges created from the text directives into the FrameSelection as
TargetText selection and scrolls it into view.

Security restrictions like force load at top and cross-origin iframes
are not yet considered in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D195688
2024-04-03 15:23:02 +00:00
Jan-Niklas Jaeschke
26e6e2df74 Bug 1867939, part 1: Add FragmentDirective webidl and pref. r=dom-core,webidl,emilio,hsivonen
This patch also adds the empty shell of the `FragmentDirective` class to the `Document`.

Differential Revision: https://phabricator.services.mozilla.com/D195684
2024-04-03 15:23:00 +00:00
Sandor Molnar
7a867184d3 Backed out 6 changesets (bug 1867939) for causing a top crash in nightly Bug 1889393 CLOSED TREE
Backed out changeset 2110f57e928c (bug 1867939)
Backed out changeset 51890598ecb4 (bug 1867939)
Backed out changeset 839bc1b11a2c (bug 1867939)
Backed out changeset bb88c4d09e82 (bug 1867939)
Backed out changeset 27c76e65cf58 (bug 1867939)
Backed out changeset c3e3c81f9ceb (bug 1867939)
2024-04-03 17:31:56 +03:00
Benjamin VanderSloot
80de9c4dac Bug 1876575, part 5 - Handle ABA in Storage Access API - r=timhuang,anti-tracking-reviewers
Storage Access API should auto-grant in ABA frames, but should not initially "haveStorageAccess".

This does that!

Differential Revision: https://phabricator.services.mozilla.com/D205370
2024-04-02 18:53:27 +00:00
Emilio Cobos Álvarez
dadf0fbdef 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
Jan-Niklas Jaeschke
a6845cd22c Bug 1867939, part 5: Integrate find-text-directive algorithm into Document load. r=peterv,farre,dom-core
This patch integrates the algorithm to find a text fragment range
into the document loading mechanism.
Unlike described in the spec, the fragment directive is not stripped
from the URL in the Session History Entry, instead it is stripped when
setting the URI into the Document using `Document::SetURI()`,
as well as when accessing the URL through `Location`.

The `PresShell` class is extended by a new method which sets the
ranges created from the text directives into the FrameSelection as
TargetText selection and scrolls it into view.

Security restrictions like force load at top and cross-origin iframes
are not yet considered in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D195688
2024-04-02 13:44:25 +00:00
Jan-Niklas Jaeschke
536f0daa27 Bug 1867939, part 1: Add FragmentDirective webidl and pref. r=dom-core,webidl,emilio,hsivonen
This patch also adds the empty shell of the `FragmentDirective` class to the `Document`.

Differential Revision: https://phabricator.services.mozilla.com/D195684
2024-04-02 13:44:24 +00:00
Cristian Tuns
16ac4d3300 Backed out 6 changesets (bug 1876574, bug 1876575) for causing multiple failures in TestGetPrincipalCookieBehavior5 CLOSED TREE
Backed out changeset f00e9fde550f (bug 1876575)
Backed out changeset ca1c6f8819f7 (bug 1876575)
Backed out changeset d65ac05bd9f8 (bug 1876575)
Backed out changeset 5dcfe3aa8497 (bug 1876575)
Backed out changeset 9ae9252761ac (bug 1876575)
Backed out changeset 704e94d28ad7 (bug 1876574)
2024-04-02 09:58:52 -04:00
Cristian Tuns
9a4d6d56af Backed out 6 changesets (bug 1867939) for causing build bustages in Document.h CLOSED TREE
Backed out changeset 0853f9a7a06c (bug 1867939)
Backed out changeset 2279e6577c13 (bug 1867939)
Backed out changeset 1b3af4b6a27b (bug 1867939)
Backed out changeset 2fbe643ca483 (bug 1867939)
Backed out changeset 575873406614 (bug 1867939)
Backed out changeset 82f99c0210b0 (bug 1867939)
2024-04-02 09:15:46 -04:00
Benjamin VanderSloot
932667a98c Bug 1876575, part 5 - Handle ABA in Storage Access API - r=timhuang,anti-tracking-reviewers
Storage Access API should auto-grant in ABA frames, but should not initially "haveStorageAccess".

This does that!

Differential Revision: https://phabricator.services.mozilla.com/D205370
2024-04-02 12:50:03 +00:00
Jan-Niklas Jaeschke
9dd5893918 Bug 1867939, part 5: Integrate find-text-directive algorithm into Document load. r=peterv,farre,dom-core
This patch integrates the algorithm to find a text fragment range
into the document loading mechanism.
Unlike described in the spec, the fragment directive is not stripped
from the URL in the Session History Entry, instead it is stripped when
setting the URI into the Document using `Document::SetURI()`,
as well as when accessing the URL through `Location`.

The `PresShell` class is extended by a new method which sets the
ranges created from the text directives into the FrameSelection as
TargetText selection and scrolls it into view.

Security restrictions like force load at top and cross-origin iframes
are not yet considered in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D195688
2024-04-02 11:43:21 +00:00
Jan-Niklas Jaeschke
079d4bc60c Bug 1867939, part 1: Add FragmentDirective webidl and pref. r=dom-core,webidl,emilio,hsivonen
This patch also adds the empty shell of the `FragmentDirective` class to the `Document`.

Differential Revision: https://phabricator.services.mozilla.com/D195684
2024-04-02 11:43:20 +00:00
Stanca Serban
d963aee96b Backed out 6 changesets (bug 1876574, bug 1876575) for causing multiple failures. CLOSED TREE
Backed out changeset 8c7a9f405031 (bug 1876575)
Backed out changeset 49739f9ec590 (bug 1876575)
Backed out changeset 1c49f0c3b677 (bug 1876575)
Backed out changeset 1ca7a0f27bc0 (bug 1876575)
Backed out changeset bfa9862e3480 (bug 1876575)
Backed out changeset 58576ed7eb22 (bug 1876574)
2024-03-29 20:52:30 +02:00
Benjamin VanderSloot
7dd2e68c99 Bug 1876575, part 5 - Handle ABA in Storage Access API - r=timhuang,anti-tracking-reviewers
Storage Access API should auto-grant in ABA frames, but should not initially "haveStorageAccess".

This does that!

Differential Revision: https://phabricator.services.mozilla.com/D205370
2024-03-29 17:12:16 +00:00
Sandor Molnar
62e4773a7a Backed out 6 changesets (bug 1876575, bug 1876574) for causing build bustages @ toolkit/components/resistfingerprinting/nsRFPService.cpp CLOSED TREE
Backed out changeset 455ce831c73c (bug 1876575)
Backed out changeset 4fa3fbf3a3ae (bug 1876575)
Backed out changeset ac4c41cb3b67 (bug 1876575)
Backed out changeset 15e06d10788e (bug 1876575)
Backed out changeset dcd6bbea816a (bug 1876575)
Backed out changeset cc547125fda9 (bug 1876574)
2024-03-29 16:29:47 +02:00
Benjamin VanderSloot
47c4a30efb Bug 1876575, part 5 - Handle ABA in Storage Access API - r=timhuang,anti-tracking-reviewers
Storage Access API should auto-grant in ABA frames, but should not initially "haveStorageAccess".

This does that!

Differential Revision: https://phabricator.services.mozilla.com/D205370
2024-03-29 13:11:28 +00:00
Tim Huang
4be9b23672 Bug 1873682 - Fallback to use partitionKey as the top URI when getting the fingerprinting override if the top-level window has been navigated away. r=tjr,anti-tracking-reviewers,cookie-reviewers,pbz
This patch introduces a mTopLevelWindowContextId field to
cookieJarSettings. The field caches the top-level window context id. We
use this field to check whether the top-level window is navigated away.
If so, we fallback to use partitionKey as the top URI when getting the
fingerprinting override because the top-level URI could be different in
this case.

Differential Revision: https://phabricator.services.mozilla.com/D203889
2024-03-27 22:40:54 +00:00
Norisz Fay
22a517cdfb Backed out changeset 0cda2285fb46 (bug 1873682) for causing process-crash in mochitest.toml 2024-03-27 20:29:59 +02:00
Tim Huang
c0db179675 Bug 1873682 - Fallback to use partitionKey as the top URI when getting the fingerprinting override if the top-level window has been navigated away. r=tjr,anti-tracking-reviewers,cookie-reviewers,pbz
This patch introduces a mTopLevelWindowContextId field to
cookieJarSettings. The field caches the top-level window context id. We
use this field to check whether the top-level window is navigated away.
If so, we fallback to use partitionKey as the top URI when getting the
fingerprinting override because the top-level URI could be different in
this case.

Differential Revision: https://phabricator.services.mozilla.com/D203889
2024-03-27 15:24:46 +00:00