Commit graph

4147 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
Nika Layzell
b18b3314a5 Bug 1873294 - Clean up logic for firing cross-process load events, r=smaug
Previously it may have been possible in some edge cases for us to send
`MaybeFireEmbedderLoadEvents` for a non-toplevel frame during docshell
tree teardown.

Differential Revision: https://phabricator.services.mozilla.com/D197825
2024-01-08 19:30:59 +00:00
Tom Schuster
346cecd51c Bug 1872839 - Remove aMimeTypeGuess parameter from nsIContentPolicy. r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D197794
2024-01-08 15:47:42 +00:00
Oliver Medhurst
465206f92c Bug 1793560 - Remove navigate-to CSP directive r=tschuster
It has never shipped after being implemented years ago,
and was removed from spec in September 2022:
https://github.com/w3c/webappsec-csp/pull/564

Now skipping navigate-to WPT tests. Filed issue upstream for their future removal:
https://github.com/w3c/webappsec-csp/issues/608
Consensus seems to agree to remove, will do in follow up bug once landed.

Also removed our own tests.

Added a hack in StartDocumentLoad as just removing the navigate-to check call
breaks some inhertiance, see comment for more info.

Differential Revision: https://phabricator.services.mozilla.com/D181630
2024-01-03 16:43:12 +00:00
Tom Schuster
061fc361e2 Bug 1867628 - Fire a load event when frame-ancestors blocks an iframe (similar to X-Frame-Options). r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D196036
2023-12-19 10:05:12 +00:00
aiunusov
41283b7581 Bug 1868387 - Part 1: Make a pref, that enables origin security check for SetDocumentURI() method, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D195554
2023-12-13 15:14:35 +00:00
Jonathan Watt
7dbfaa7f5d Bug 1868023. Get rid of nsIDocShell.getSameTypeInProcessParentIgnoreBrowserBoundaries. r=aiunusov
Differential Revision: https://phabricator.services.mozilla.com/D195361
2023-12-06 09:45:36 +00:00
Noemi Erli
c46592ba01 Backed out changeset 9fa5c8e5fc13 (bug 1868023) for causing assertion failures in nsWindowMemoryReporter.cpp 2023-12-04 14:49:14 +02:00
Jonathan Watt
747875e612 Bug 1868023. Get rid of nsIDocShell.getSameTypeInProcessParentIgnoreBrowserBoundaries. r=aiunusov
Differential Revision: https://phabricator.services.mozilla.com/D195361
2023-12-04 11:53:11 +00:00
Jonathan Watt
15c1a58822 Bug 1866011 p2. Rename nsIDocShell.contentViewer. r=emilio,credential-management-reviewers,devtools-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D194370
2023-11-24 09:10:52 +00:00
Jonathan Watt
c46d8d767c Bug 1866011 p1. Rename nsISHEntry.contentViewer. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D194369
2023-11-24 09:10:52 +00:00
Jonathan Watt
0bbfbaac40 Bug 1866010 p3. Update aContentViewer args to reflect nsIDocumentViewer's new name. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D194359
2023-11-24 09:10:49 +00:00
Jonathan Watt
43215ef984 Bug 1865995 p6. Rename createAboutBlankContentViewer to match nsIDocumentViewer's new name. r=emilio,webdriver-reviewers,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D194340
2023-11-23 21:35:21 +00:00
Jonathan Watt
9c691c46ec Bug 1865995 p1. Rename FindInternalContentViewer to match nsIDocumentViewer's new name. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D194335
2023-11-23 21:35:19 +00:00
Jonathan Watt
8bfef8f8d3 Bug 1865918 p6. Update nsDocShell::mContentViewer and local variables to reflect nsIDocumentViewer's new name. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D194294
2023-11-22 13:50:58 +00:00
Jonathan Watt
63ce29be2b Bug 1865918 p5. Update NewContentViewerObj to reflect nsIDocumentViewer's new name. r=emilio
NewContentViewerObj

Depends on D194290

Differential Revision: https://phabricator.services.mozilla.com/D194291
2023-11-22 13:50:57 +00:00
Jonathan Watt
e9e8d285db Bug 1865918 p4. Update CreateContentViewerForActor to reflect nsIDocumentViewer's new name. r=emilio
Depends on D194289

Differential Revision: https://phabricator.services.mozilla.com/D194290
2023-11-22 13:50:57 +00:00
Jonathan Watt
9ef102ce24 Bug 1865918 p3. Update CreateContentViewer to reflect nsIDocumentViewer's new name. r=emilio
Depends on D194288

Differential Revision: https://phabricator.services.mozilla.com/D194289
2023-11-22 13:50:57 +00:00
Jonathan Watt
cd0692dbfd Bug 1865918 p2. Update EnsureContentViewer to reflect nsIDocumentViewer's new name. r=emilio
Depends on D194287

Differential Revision: https://phabricator.services.mozilla.com/D194288
2023-11-22 13:50:56 +00:00
Jonathan Watt
742ed330df Bug 1865891 p7. Rename EvictLocalContentViewers to match nsIDocumentViewer's new name. r=emilio
Depends on D194279

Differential Revision: https://phabricator.services.mozilla.com/D194280
2023-11-22 08:08:14 +00:00
Jonathan Watt
4b6d3cff5f Bug 1865891 p4. Rename EvictContentViewersOrReplaceEntry to match nsIDocumentViewer's new name. r=emilio
Depends on D194276

Differential Revision: https://phabricator.services.mozilla.com/D194277
2023-11-22 08:08:13 +00:00
Jonathan Watt
9052f07248 Bug 1865891 p3. Rename EvictOutOfRangeContentViewers to match nsIDocumentViewer's new name. r=emilio
Depends on D194275

Differential Revision: https://phabricator.services.mozilla.com/D194276
2023-11-22 08:08:13 +00:00
Jonathan Watt
c96a66c3de Bug 1865480. Rename nsIContentViewer to nsIDocumentViewer. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D193987
2023-11-21 12:45:59 +00:00
aiunusov
39e0866010 Bug 1783504 - tweak when UpdateDocumentURI can be set, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D159340
2023-11-20 16:06:00 +00:00
Malte Juergens
2bbd0c4d22 Bug 1858894 - Hide http history entries that were upgraded to https r=places-reviewers,freddyb,mak
Differential Revision: https://phabricator.services.mozilla.com/D192229
2023-11-20 09:27:57 +00:00
Sandor Molnar
bb5a11d7f2 Backed out changeset 724cb235ebec (bug 1783504) for crashes on crash stats on Android Nightly 2023-11-15 14:46:45 +02:00
aiunusov
433ce6fe63 Bug 1783504 - tweak when UpdateDocumentURI can be set, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D159340
2023-11-13 20:51:31 +00:00
Benjamin VanderSloot
ae1d974be7 Bug 1858143 - "has storage access" should only persist during navigations that do not change the iframe's window origin - r=anti-tracking-reviewers,smaug,pbz
Minor correction from https://phabricator.services.mozilla.com/D184821.
The definition of "same-origin" used in that patch was that the iframe's origin after navigation is the same as the triggering principal.
This was incorrect.
Instead, the origin of the iframe before navigation should be the same as after navigation, which is the frame's document principal at the time this is called.

Also, I found places where I missed adding the new fields to the loadinfo: LocationBase and nsFrameLoader.
And I added the redirect tainting check and a missing nullcheck before calling SetTriggeringWindowId in nsDocShell.

Differential Revision: https://phabricator.services.mozilla.com/D190577
2023-10-26 14:24:14 +00:00
Adam Brouwers-Harries
a26eafe5c3 Bug 1421651 - Remove obseleted timeline and TimelineMarker code r=canaltinova,webidl,devtools-reviewers,saschanaz,smaug,ochameau
This patch removes the old docshell timeline and timeline markers codebase and replaces them with equivalent Gecko profiler marker. This patch also fixes Bug 1834143, which is a subset of 1421651.

Differential Revision: https://phabricator.services.mozilla.com/D184217
2023-10-24 15:18:12 +00:00
Narcis Beleuzu
948c7279ee Backed out changeset 714aaf6484fb (bug 1421651) for causing Bug 1860719. CLOSED TREE 2023-10-24 17:31:02 +03:00