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

9422 Коммитов

Автор SHA1 Сообщение Дата
Marco Bonardo 70fdad6676 Bug 1852963 - Rename BrowserTestUtils.loadURIString() to .startLoadingURIString(). r=dao
This should make a bit clearer that it is only starting the load, not waiting
for its completion.

Differential Revision: https://phabricator.services.mozilla.com/D188213
2023-09-15 09:16:34 +00:00
Sandor Molnar 950a3c620d Backed out 3 changesets (bug 1852963) for causing remote failures on remote/shared/messagehandler/test/browser/browser_session_data.js CLOSED TREE
Backed out changeset 98de7bc404c3 (bug 1852963)
Backed out changeset edf1527c9a99 (bug 1852963)
Backed out changeset 34357750f69c (bug 1852963)
2023-09-14 20:29:06 +03:00
Marco Bonardo 61f8ecc425 Bug 1852963 - Rename BrowserTestUtils.loadURIString() to .startLoadingURIString(). r=dao
This should make a bit clearer that it is only starting the load, not waiting
for its completion.

Differential Revision: https://phabricator.services.mozilla.com/D188213
2023-09-14 16:33:13 +00:00
Mathew Hodson 66ffe4b27e Bug 582361 - Align scrolling to a fragment with HTML spec. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187362
2023-09-14 09:29:27 +00:00
Tom Marble 9e40a719f2 Bug 1850545 - convert .ini manifests to .toml: batch 3 chrome.ini (bis) r=jmaher,geckoview-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,places-reviewers,profiler-reviewers,m_kato,mak,mtigley
Differential Revision: https://phabricator.services.mozilla.com/D187597
2023-09-13 18:28:32 +00:00
Cosmin Sabou e3ddb212bd Backed out changeset ce9c917d3e22 (bug 582361) for causing wpt failures on scroll-frag-percent-encoded.html. CLOSED TREE 2023-09-13 20:52:47 +03:00
Mathew Hodson 9b4650bb45 Bug 582361 - Align scrolling to a fragment with HTML spec. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187362
2023-09-13 16:04:59 +00:00
Malte Juergens 83723019a1 Bug 1847918 - Limit `nsDocShellLoadState::IsExemptFromHTTPSOnlyMode` to HTTPS-First r=freddyb
`nsDocShellLoadState::IsExemptFromHTTPSOnlyMode` is currently only used by HTTPS-First. It is used for fixing upgrade-downgrade loops and when loading history entries, as when we already know if HTTPS-First succeeded there or not, we have no need for trying to upgrade again and can disable HTTPS-First. With the changes introduced by Bug 1839612, `nsDocShellLoadState::IsExemptFromHTTPSOnlyMode` also applies to HTTPS-Only, which is a problem because disabling HTTPS-Only for history entries will result in them potentially being loaded insecurely without the user setting an exception. As a solution this patch just applies `nsILoadInfo::HTTPS_ONLY_EXEMPT_NEXT_LOAD`, the flag being set when `nsDocShellLoadState::IsExemptFromHTTPSOnlyMode` is set, when HTTPS-First is enabled, and renames both flags to reflect that behavior.

Differential Revision: https://phabricator.services.mozilla.com/D185829
2023-09-11 12:14:30 +00:00
Daisuke Akatsuka 8e9e77f019 Bug 1850902: Remove browser.fixup.alternate.enabled pref and its code path r=jteow,mak
Differential Revision: https://phabricator.services.mozilla.com/D187237
2023-09-10 22:33:27 +00:00
Andrew McCreight 0598531d40 Bug 1851922 - Crash faster in RemoteObjectProxyBase::GetOrCreateProxyObject(). r=peterv,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D187628
2023-09-08 15:51:13 +00:00
Stanca Serban 04ab13cb66 Backed out changeset 65e974428cdb (bug 1847572) for causing gtest crashes. CLOSED TREE 2023-09-07 22:42:14 +03:00
Vinny Diehl ac308994f4 Bug 1847572 - Expand home directory paths for arbitrary users r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D185999
2023-09-07 18:35:59 +00:00
owlishDeveloper 190718bd97 Bug 1850440 - Adjust the test to make assertion on remote frame only for isolateEverything Fission site isolation strategy r=nika
Differential Revision: https://phabricator.services.mozilla.com/D187158
2023-09-06 21:42:01 +00:00
owlishDeveloper 37db2bd2db Bug 1850429 - Adjust the test to make assertion on remote frame only for isolateEverything Fission site isolation strategy r=nika
Depends on D187073

Differential Revision: https://phabricator.services.mozilla.com/D187154
2023-09-06 20:34:45 +00:00
Gregory Pappas 51c277ed92 Bug 1848896 - Remove ui.use_activity_cursor pref r=farre
Differential Revision: https://phabricator.services.mozilla.com/D187350
2023-09-05 21:32:32 +00:00
Cosmin Sabou 76354af98f Bug 1781601 - Disable test_opener.html on all platforms because of frequent failures. r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D187493
2023-09-05 19:07:13 +00:00
Sean Feng 6721383752 Bug 1830820 - Introduce some delays to user input handling r=smaug
In some edge cases, we may start handling user input events that
are not supposed to be handled by the current document.

This patch introduces some delay to handle user input events.

Differential Revision: https://phabricator.services.mozilla.com/D180976
2023-09-05 18:28:52 +00:00
Emilio Cobos Álvarez 4e4cb31a7f Bug 1847584 - Account for IsUnderHiddenEmbedderElement() for BrowserChild visibility. r=smaug
Test by Gijs. Note that I removed the .isActive assertion, because this doesn't
affect activeness.

We could make that change too, but that's a bigger change, and I think we want
to do this regardless.

The CAN_RUN_SCRIPT annotations are obsolete (they come from bug 1582042
which directly fired docshell activity events, but that's not true
anymore, bug 1635914 changed the setup a bit later).

Differential Revision: https://phabricator.services.mozilla.com/D185643
2023-09-05 16:13:00 +00:00
Iulian Moraru 1007c47c48 Backed out 2 changesets (bug 1830820) for causing marionette failures on test_actions_wheel.py. CLOSED TREE
Backed out changeset e930161a5935 (bug 1830820)
Backed out changeset 4df110e417d4 (bug 1830820)
2023-08-31 20:55:06 +03:00
Sean Feng cd954eaa9f Bug 1830820 - Introduce some delays to user input handling r=smaug
In some edge cases, we may start handling user input events that
are not supposed to be handled by the current document.

This patch introduces some delay to handle user input events.

Differential Revision: https://phabricator.services.mozilla.com/D180976
2023-08-31 15:56:47 +00:00
Markus Stange 3d20b7df6c Bug 1843484 - Use EventTarget* instead of nsISupports* for the event target parameter of the nsContentUtils::Dispatch methods. r=smaug
This saves a few queryInterface calls on the hot path.

Differential Revision: https://phabricator.services.mozilla.com/D186976
2023-08-28 23:38:42 +00:00
owlishDeveloper 66a39a7760 Bug 1849389 - Enable test that has no Android Fission specific failures (known intermittent) r=nika
Depends on D186556

Differential Revision: https://phabricator.services.mozilla.com/D186560
2023-08-18 19:51:28 +00:00
owlishDeveloper 8dd3ca1f6f Bug 1849389 - Enable tests that were blocked on metabugs r=nika
Depends on D186555

Differential Revision: https://phabricator.services.mozilla.com/D186556
2023-08-18 19:43:51 +00:00
Cristian Tuns 2117c1d899 Backed out changeset a741e0bcdca4 (bug 1847584) for causing bc failures in browser_reload_tab.js CLOSED TREE 2023-08-18 14:24:03 -04:00
Emilio Cobos Álvarez 87f67e0819 Bug 1847584 - Account for IsUnderHiddenEmbedderElement() for BrowserChild visibility. r=smaug
Test by Gijs. Note that I removed the .isActive assertion, because this doesn't
affect activeness.

We could make that change too, but that's a bigger change, and I think we want
to do this regardless.

The CAN_RUN_SCRIPT annotations are obsolete (they come from bug 1582042
which directly fired docshell activity events, but that's not true
anymore, bug 1635914 changed the setup a bit later).

Differential Revision: https://phabricator.services.mozilla.com/D185643
2023-08-18 16:17:31 +00:00
owlishDeveloper 5637e974b1 Bug 1673763 - Do not switch processes when loading error pages on Android r=geckoview-reviewers,nika,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D186065
2023-08-15 18:43:38 +00:00
Narcis Beleuzu 0c70f2a736 Backed out 2 changesets (bug 1830820) for reftest failure on inline-block-slice-5.html . CLOSED TREE
Backed out changeset 941c44881781 (bug 1830820)
Backed out changeset da493ba4c9a6 (bug 1830820)
2023-08-15 18:55:44 +03:00
Sean Feng 65383b4b4e Bug 1830820 - Introduce some delays to user input handling r=smaug
In some edge cases, we may start handling user input events that
are not supposed to be handled by the current document.

This patch introduces some delay to handle user input events.

Differential Revision: https://phabricator.services.mozilla.com/D180976
2023-08-15 13:55:57 +00:00
Sean Feng 4379a8876c Bug 1848409 - Tweak the UpdateDefaultPreventedOnContent call to only special case the HTMLEditorEventListener case r=masayuki,dom-core
Calling `UpdateDefaultPreventedOnContent` separately from
`PreventDefault()` is error-prone. This patch should make it
safer.

Differential Revision: https://phabricator.services.mozilla.com/D186052
2023-08-15 13:46:42 +00:00
Benjamin VanderSloot 8acc7b239c Bug 1835907, part 5 - Refactor the window's mStorageAccessPermissionGranted variable and its Getters to a more accurate name: mUsingStorageAccess - r=anti-tracking-reviewers,pbz
This probably should have been done earlier, but became obvious with uses of Document::HasStorageAccessPermissionGrated in this stack.

Differential Revision: https://phabricator.services.mozilla.com/D184825
2023-08-15 13:04:05 +00:00
Benjamin VanderSloot 58d36f75d6 Bug 1835907, part 1 - Add has storage access bit and triggering window id to the LoadInfo - r=smaug,necko-reviewers,kershaw,pbz
In the Storage Access API's latest draft, a few items were added to the user-agent state. Relevant here,
the source snapshot params gained two fields that are initialized from the sourceDocument during
snapshotting source params while navigating: "has storage access" and "environment id".

https://privacycg.github.io/storage-access/#ua-state

These are used to identify self-initiated navigations that come from documents that have obtained storage access.
Combined with a same-origin check, this determines if the destination document of the navigation should start
with storage access.

This is stricter than the current behavior, where if the permission is available, all documents start with storage access.
Instead, now a document will only have storage access if it requests it explicitly or if a same-origin document that has
storage access navigates itself to that document. This is seen as a security win.

Security discussion of this change was here: https://github.com/privacycg/storage-access/issues/113
Artur at Google wrote up a great summary here: https://docs.google.com/document/d/1AsrETl-7XvnZNbG81Zy9BcZfKbqACQYBSrjM3VsIpjY/edit#

Differential Revision: https://phabricator.services.mozilla.com/D184821
2023-08-15 13:04:04 +00:00
Cosmin Sabou 4f5ef3986b Backed out 6 changesets (bug 1835907) for causing multiple failures. CLOSED TREE
Backed out changeset 91ef29afec50 (bug 1835907)
Backed out changeset 989479621780 (bug 1835907)
Backed out changeset 86e3f98ceb31 (bug 1835907)
Backed out changeset 4790e44c234c (bug 1835907)
Backed out changeset bb9f48eec5bf (bug 1835907)
Backed out changeset 74f90708260a (bug 1835907)
2023-08-14 22:18:10 +03:00
Benjamin VanderSloot d2a4578703 Bug 1835907, part 5 - Refactor the window's mStorageAccessPermissionGranted variable and its Getters to a more accurate name: mUsingStorageAccess - r=anti-tracking-reviewers,pbz
This probably should have been done earlier, but became obvious with uses of Document::HasStorageAccessPermissionGrated in this stack.

Differential Revision: https://phabricator.services.mozilla.com/D184825
2023-08-14 18:02:47 +00:00
Benjamin VanderSloot 06a4432ed1 Bug 1835907, part 1 - Add has storage access bit and triggering window id to the LoadInfo - r=smaug,necko-reviewers,kershaw,pbz
In the Storage Access API's latest draft, a few items were added to the user-agent state. Relevant here,
the source snapshot params gained two fields that are initialized from the sourceDocument during
snapshotting source params while navigating: "has storage access" and "environment id".

https://privacycg.github.io/storage-access/#ua-state

These are used to identify self-initiated navigations that come from documents that have obtained storage access.
Combined with a same-origin check, this determines if the destination document of the navigation should start
with storage access.

This is stricter than the current behavior, where if the permission is available, all documents start with storage access.
Instead, now a document will only have storage access if it requests it explicitly or if a same-origin document that has
storage access navigates itself to that document. This is seen as a security win.

Security discussion of this change was here: https://github.com/privacycg/storage-access/issues/113
Artur at Google wrote up a great summary here: https://docs.google.com/document/d/1AsrETl-7XvnZNbG81Zy9BcZfKbqACQYBSrjM3VsIpjY/edit#

Differential Revision: https://phabricator.services.mozilla.com/D184821
2023-08-14 18:02:46 +00:00
Vinny Diehl 11bd76e996 Bug 93141 - Expand `~` to home directory when fixing up file URIs r=mak
Differential Revision: https://phabricator.services.mozilla.com/D185562
2023-08-14 07:45:56 +00:00
Emilio Cobos Álvarez e385adffde Bug 1847584 - Misc BrowserChild clean-ups. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D185642
2023-08-09 13:08:59 +00:00
Natalia Csoregi 428aa75e35 Backed out 3 changesets (bug 1847584) for causing vsync failures. CLOSED TREE
Backed out changeset bdfc3c7388cf (bug 1847584)
Backed out changeset 54b34c76db47 (bug 1847584)
Backed out changeset 03bf43b4ae07 (bug 1847584)
2023-08-09 15:47:03 +03:00
Emilio Cobos Álvarez 3f17f5a609 Bug 1847584 - Account for IsUnderHiddenEmbedderElement() for BrowserChild visibility. r=smaug
Test by Gijs. Note that I removed the .isActive assertion, because this doesn't
affect activeness.

We could make that change too, but that's a bigger change, and I think we want
to do this regardless.

The CAN_RUN_SCRIPT annotations are obsolete (they come from bug 1582042
which directly fired docshell activity events, but that's not true
anymore, bug 1635914 changed the setup a bit later).

Differential Revision: https://phabricator.services.mozilla.com/D185643
2023-08-09 10:57:42 +00:00
Emilio Cobos Álvarez 0648f36a09 Bug 1847584 - Misc BrowserChild clean-ups. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D185642
2023-08-09 09:32:27 +00:00
Emilio Cobos Álvarez 47427950b9 Bug 1846500 - Inherit color scheme override from opener. r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D185166
2023-08-08 11:32:03 +00:00
Olli Pettay ae55d8bc22 Bug 1843239, optimize Location.hash, r=peterv,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D183788
2023-08-07 12:31:25 +00:00
Peter Van der Beken 3f4ffadbe1 Bug 1846277 - Untangle nsGlobalWindow*.h includes. r=dom-core,media-playback-reviewers,sessionstore-reviewers,padenot,farre
Differential Revision: https://phabricator.services.mozilla.com/D184978
2023-08-02 20:41:49 +00:00
Peter Van der Beken 9fba1d5220 Bug 1846277 - Remove nsGlobalWindow.h. r=dom-core,necko-reviewers,jesup,farre
Differential Revision: https://phabricator.services.mozilla.com/D184973
2023-08-02 20:41:48 +00:00
Olli Pettay c8d088d181 Bug 1845924, no need for DIAGNOSTIC_ASSERT, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D185040
2023-08-01 13:37:57 +00:00
Peter Van der Beken dfce7f40b3 Bug 1843968 - Hold some strong references. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D184803
2023-08-01 12:09:36 +00:00
Emilio Cobos Álvarez db4ed173eb Bug 1846141 - Don't propagate zoom on replacement for site-specific zoom. r=nika
As otherwise it can race with the front-end setting the right zoom.

This is a bit sketchy, I'm open to other potential solutions?

But we don't have access to per-site zoom prefs in Gecko, so...

Depends on D184922

Differential Revision: https://phabricator.services.mozilla.com/D184923
2023-08-01 00:14:37 +00:00
Stanca Serban 5c30ffc25e Backed out changeset ce4f02a4ad1e (bug 1843239) for causing multiple failures. CLOSED TREE 2023-07-31 19:06:51 +03:00
Olli Pettay 3931b88d43 Bug 1843239, [Cached] Location.hash, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D183788
2023-07-31 11:15:17 +00:00
Gregory Pappas 3eac12bbd7 Bug 1845311 - Use ChromeUtils.defineLazyGetter in more places r=arai,webdriver-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,anti-tracking-reviewers,sessionstore-reviewers,pbz,joschmidt,robwu,issammani,bytesized,owlish,dao
Differential Revision: https://phabricator.services.mozilla.com/D184481
2023-07-26 16:28:11 +00:00
Tim Huang 7812491622 Bug 1842030 - Part 1: Adding CanonicalBrowsingContext::IsPrivateBrowsingActive(). r=nika
The CanonicalBrowsingContext::IsPrivateBrowsingActive() function allows
us to know if private browsing is active. We need it to prevent setting
cookies if there is no active private browsing session.

Differential Revision: https://phabricator.services.mozilla.com/D184010
2023-07-26 10:14:37 +00:00
Tooru Fujisawa 58214f4c37 Bug 1843795 - Part 1: Rewrite netwerk/base/NetUtil.sys.mjs consumers in html/xhtml to use ChromeUtils.importESModule. r=necko-reviewers,credential-management-reviewers,devtools-reviewers,sgalich,kershaw
Depends on D183690

Differential Revision: https://phabricator.services.mozilla.com/D183691
2023-07-19 12:06:16 +00:00
Tooru Fujisawa 60215ad826 Bug 1843790 - Part 1: Rewrite toolkit/modules/AppConstants.sys.mjs consumers in html/xhtml to use ChromeUtils.importESModule. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D183660
2023-07-18 23:06:31 +00:00
Tooru Fujisawa d8c21fafdb Bug 1843789 - Part 3: Rewrite testing/mochitest/BrowserTestUtils/BrowserTestUtils.sys.mjs consumers in html/xhtml to use ChromeUtils.importESModule. r=ahal,fxview-reviewers,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D183659
2023-07-18 23:06:30 +00:00
Paul Zuehlcke 56ff601ad9 Bug 1839916 - Update BrowsingContextWebProgress to hold BounceTrackingState objects. r=bvandersloot,nika
Differential Revision: https://phabricator.services.mozilla.com/D182342
2023-07-18 08:26:22 +00:00
Cristina Horotan ebef1cfabb Backed out 5 changesets (bug 1839916) for causing build bustage at BounceTrackingState.cpp CLOSED TREE
Backed out changeset 97b7c9d34869 (bug 1839916)
Backed out changeset c4068176e8e1 (bug 1839916)
Backed out changeset 815021dbe6fe (bug 1839916)
Backed out changeset aeab1abeef2f (bug 1839916)
Backed out changeset 1c459fb2b051 (bug 1839916)
2023-07-17 21:58:40 +03:00
Paul Zuehlcke d26a3d493b Bug 1839916 - Update BrowsingContextWebProgress to hold BounceTrackingState objects. r=bvandersloot,nika
Differential Revision: https://phabricator.services.mozilla.com/D182342
2023-07-17 17:54:50 +00:00
Cristian Tuns 3d5d7bda0c Backed out 5 changesets (bug 1839916) for causing build bustages in BounceTrackingRecord.cpp CLOSED TREE
Backed out changeset 062039e3c9ca (bug 1839916)
Backed out changeset 3713d0250e5e (bug 1839916)
Backed out changeset 39cbf84f51b7 (bug 1839916)
Backed out changeset 44f32df69c08 (bug 1839916)
Backed out changeset fce071d0f22b (bug 1839916)
2023-07-17 10:29:33 -04:00
Paul Zuehlcke 73968fc9fa Bug 1839916 - Update BrowsingContextWebProgress to hold BounceTrackingState objects. r=bvandersloot,nika
Differential Revision: https://phabricator.services.mozilla.com/D182342
2023-07-17 12:58:35 +00:00
Kagami Sascha Rosylight 2d650853a8 Bug 1842007 - Part 7: Remove MozPromise::FromDomPromise r=xpcom-reviewers,necko-reviewers,nika,jesup
Nobody uses it and currently not super useful as the possible return value is limited to primitives. It could be extended to support DOM objects, but I don't know there's actual use cases for that as in many cases the promise is resolved with non-DOM values.

Differential Revision: https://phabricator.services.mozilla.com/D183026
2023-07-13 12:43:41 +00:00
Kagami Sascha Rosylight 422007e346 Bug 1842007 - Part 4: Replace DOMPromiseListener use with Promise method in CanonicalBrowsingContext r=dom-core,edgar
This should not change any behavior, but just uses newer method to subscribe a DOM promise.

Differential Revision: https://phabricator.services.mozilla.com/D183023
2023-07-13 12:43:41 +00:00
Mark Banner 0b2d2afdea Bug 1837176 - Convert imports of httpd.js to consume the ES module directly. r=necko-reviewers,webcompat-reviewers,extension-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,cookie-reviewers,twisniewski,robwu,issammani,bytesized,pbz,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181159
2023-07-12 13:38:34 +00:00
Zac McKenney b5828473c9 Bug 1838260 - Add about:crashextensions to kill extension processes r=geckoview-reviewers,ipc-reviewers,ckerschb,amejiamarmol,nika
Differential Revision: https://phabricator.services.mozilla.com/D182016
2023-07-11 15:34:01 +00:00
Malte Juergens a7c59a9b78 Bug 1838183: Include HTTPS-First in current HTTPS-Only exemption options on site identity pane r=freddyb,fluent-reviewers
Depends on D182322

Differential Revision: https://phabricator.services.mozilla.com/D181356
2023-07-11 11:07:24 +00:00
Malte Juergens ad465aab06 Bug 1839612: HTTPS-First: Clear HTTPS_ONLY_EXEMPT on every load r=necko-reviewers,freddyb,kershaw
- Also clear HTTPS_ONLY_EXEMPT for HTTPS-First in TestSitePermissionAndPotentiallyAddExemption
- Remove PotentiallyClearExemptFlag as we are now clearing the exemption every time
- Introduce new flag HTTPS_ONLY_EXEMPT_NEXT_LOAD which will set the exemption again after it being (potentially) cleared
- Set that flag when nsDocShellLoadState::IsExemptFromHTTPSOnlyMode is set, since that happens before the exemption is cleared

Differential Revision: https://phabricator.services.mozilla.com/D182322
2023-07-11 11:07:24 +00:00
Cristina Horotan 5c71a93e59 Backed out changeset 117114b8eb32 (bug 1793560) for causing wpt failures at iframe-all-local-schemes-inherit-self.sub.html CLOSED TREE 2023-07-10 17:54:12 +03:00
CanadaHonk 2f7c1c1024 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 for their future removal:
https://github.com/w3c/webappsec-csp/issues/608

Also removed our own tests to ensure it is unimplemented.

Differential Revision: https://phabricator.services.mozilla.com/D181630
2023-07-10 12:18:18 +00:00
Sean Feng caee73fc75 Bug 1817723 - Allow HTMLEditor can receive events when the focus is switched between elements in the same shadow tree. r=masayuki
The EditorEventListener for HTMLEditor is registered on document,
which is problematic because it can't receive events when the focus is
switched between elements in the same shadow tree due to shadow dom
encapsulation.

We fix this by moving the EditorEventListener to nsWindowRoot so the
events can always be received.

Differential Revision: https://phabricator.services.mozilla.com/D178215
2023-07-07 14:55:28 +00:00
Greg Tatum f1a8a9ae14 Bug 1814254 - Load about:translations in privilegedabout process; r=nordzilla
This hides any of the privileged methods for about:translations from
compromised content processes.

Differential Revision: https://phabricator.services.mozilla.com/D182503
2023-07-05 12:06:59 +00:00
Nika Layzell 189dec60f0 Bug 1838686 - Check for content-initiated file URI loads in content, r=smaug,necko-reviewers,jesup
The goal of this change is to detect content-initiated file URI loads
earlier such that crash stacks give us a better idea of what is
responsible for starting these loads.

These assertions explicitly only fire for system-principal triggered
loads of file URIs, as those should never be happening from within a web
content process.

Differential Revision: https://phabricator.services.mozilla.com/D182223
2023-07-04 20:18:36 +00:00
Gregory Pappas dd79948377 Bug 1773094 - Remove security.alternate_certificate_error_page pref r=keeler,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D182262
2023-07-04 11:26:24 +00:00
Kershaw Chang 705e17a537 Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-28 13:21:00 +00:00
Norisz Fay 07a91b8c6a Backed out 2 changesets (bug 1838829) for causing perma mochitest failure with dom/websocket/tests being skipped CLOSED TREE
Backed out changeset 19a5d4f1850a (bug 1838829)
Backed out changeset 97cd8a256954 (bug 1838829)
2023-06-27 02:52:52 +03:00
Norisz Fay ace9aded9a Backed out changeset f9f8e7cfe057 (bug 1817723) as requested by dev for causing regressions CLOSED TREE 2023-06-27 01:22:11 +03:00
James Teh 65baf08086 Bug 1831035 part 7: Remove (now empty) platform specific RemoteAccessible classes and rename RemoteAccessibleBase to RemoteAccessible. r=eeejay
This involved moving ApplyCache from the .h into the .cpp because now that the class is no longer a template, forward declaration of DocAccessibleParent is not sufficient.

Differential Revision: https://phabricator.services.mozilla.com/D181852
2023-06-26 21:20:13 +00:00
Kershaw Chang 75c68b6864 Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-26 14:22:14 +00:00
Peter Van der Beken b52a207bb0 Bug 1522052 - remove nsIDOMChromeWindow. r=dom-core,webdriver-reviewers,devtools-reviewers,whimboo,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D34310
2023-06-23 14:21:05 +00:00
Emilio Cobos Álvarez 4cc6758558 Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar
We have more readable and faster versions (that just omit the namespace
arg).

Mostly done via sed, with a couple helpers to use the faster lookups
where possible.

Differential Revision: https://phabricator.services.mozilla.com/D181795
2023-06-23 10:01:32 +00:00
Peter Van der Beken b727b26491 Bug 1825745 - Make form submits do a replace load if they happen before document load has ended. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D174224
2023-06-22 18:32:20 +00:00
Noemi Erli ea5b4807dc Backed out 2 changesets (bug 1825745) for causing failures in form-requestsubmit.html CLOSED TREE
Backed out changeset eb77df0ccca6 (bug 1825745)
Backed out changeset 2ce4ceb5a39d (bug 1825745)
2023-06-22 16:35:27 +03:00
Peter Van der Beken 1e615c9d15 Bug 1825745 - Make form submits do a replace load if they happen before document load has ended. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D174224
2023-06-22 08:07:06 +00:00
Norisz Fay e86f1fa0e9 Backed out 5 changesets (bug 1838829) for causing mochitest failures CLOSED TREE
Backed out changeset 693d34c8447d (bug 1838829)
Backed out changeset 903d9ff4afaa (bug 1838829)
Backed out changeset 5e51feff7467 (bug 1838829)
Backed out changeset e125be49d2a6 (bug 1838829)
Backed out changeset 1a8cf3c83dc4 (bug 1838829)
2023-06-22 03:37:07 +03:00
Ray Kraesig 1444f17712 Bug 1836349 - [3/3] Restrict IPCResult not to accept nonconstant strings r=nika,ipc-reviewers
Text passed to `IPCResult::Fail` (and, therefore, text passed to
`IPC_FAIL`) may end up in telemetry.

To avoid accidentally capturing unwanted information, restrict all such
text to compile-time constant strings, unless approved by data-review.

Differential Revision: https://phabricator.services.mozilla.com/D180152
2023-06-21 20:54:48 +00:00
Kershaw Chang 2cdb6b3a96 Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-21 19:43:33 +00:00
Sean Feng ddb6212fd9 Bug 1817723 - Allow HTMLEditor can receive events when the focus is switched between elements in the same shadow tree. r=masayuki
The EditorEventListener for HTMLEditor is registered on document,
which is problematic because it can't receive events when the focus is
switched between elements in the same shadow tree due to shadow dom
encapsulation.

We fix this by moving the EditorEventListener to nsWindowRoot so the
events can always be received.

Differential Revision: https://phabricator.services.mozilla.com/D178215
2023-06-19 17:58:15 +00:00
Olli Pettay 74d6d19225 Bug 1837993, ensure correct loadId is used when removing entry, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D181343
2023-06-19 09:26:44 +00:00
Florian Quèze ebb3633d22 Bug 1836191 - make about:performance point to about:processes, r=mconley.
Differential Revision: https://phabricator.services.mozilla.com/D179694
2023-06-08 21:53:17 +00:00
Emilio Cobos Álvarez c29297c499 Bug 1827329 - Keep full/text zoom across bfcached navigations. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D175243
2023-06-08 15:16:22 +00:00
Stanca Serban 48e6d2d2ae Backed out changeset 17472385b962 (bug 1825745) for form-submit related wpt failures. CLOSED TREE 2023-06-07 16:31:57 +03:00
Mark Banner 6725448902 Bug 1834176 - Convert consumers of NetUtil.jsm to import the ES module directly. r=arai,webdriver-reviewers,perftest-reviewers,valentin,extension-reviewers,devtools-reviewers,sync-reviewers,cookie-reviewers,robwu,afinder,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D178589
2023-06-07 08:42:36 +00:00
Peter Van der Beken ea022c4cd4 Bug 1825745 - Make form submits do a replace load if they happen before document load has ended. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D174224
2023-06-07 08:22:03 +00:00
Cosmin Sabou cf2c3350b5 Backed out changeset 324defc46b66 (bug 1761981) for mochitest plain failures on test_top_navigation_no_script.html. CLOSED TREE 2023-06-05 22:57:05 +03:00
Nika Layzell 89bea3ab53 Bug 1761981 - tests, r=smaug
Depends on D142596

Differential Revision: https://phabricator.services.mozilla.com/D142597
2023-06-05 19:03:58 +00:00
Mark Banner 5d59c7aecd Bug 1824613 - Convert consumers of toolkit/mozapps/extensions/ to import ES modules directly. r=extension-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,sync-reviewers,sgalich,bytesized,robwu,skhamis
Depends on D179819

Differential Revision: https://phabricator.services.mozilla.com/D179820
2023-06-02 20:00:35 +00:00
Neil Deakin 18f5e1220a Bug 1776339, add a browsing context field that syncs the isUnderHiddenEmbedderElement state, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D168440
2023-05-31 19:46:49 +00:00
mcheang 50ce5c5c74 Bug 1648188 - Fix SearchService init failures so that the address bar can be used to search history and bookmarks. r=Standard8,mak
This patch refactors the SearchService private initialized variables and how
the SearchService stores its initialization status. These changes capture whether
the SearchService has succeeded, failed or hasn't finished initialization yet.

There are also changes made to UrlbarSearchUtils on handling when SearchService
has failed to initialize or when it hasn't finished initializing yet and we wait.
In the case where the SearchService has failed on initialization, We allow
the code to continue so that it can reach UrlbarProviderPlaces. Once we
are able to reach UrlbarProviderPlaces, we can make database calls for the user's
history and bookmarks. This allows the user to interact with the addressbar and
search their history and bookmarks even if SearchService has failed to initialize.

Differential Revision: https://phabricator.services.mozilla.com/D176936
2023-05-30 18:34:51 +00:00
Kris Maglione fbc33fd683 Bug 1648545: Part 2 - Load SpecialPowers in XPCShellContentUtils. r=ahal,application-update-reviewers,nalexander,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D119449
2023-05-27 03:46:44 +00:00
Sandor Molnar c06a989790 Backed out changeset 6a96bb1f430f (bug 1817723) for causing reftest crashes. CLOSED TREE 2023-05-24 17:31:13 +03:00
Sean Feng a7d8029535 Bug 1817723 - Allow HTMLEditor can receive events when the focus is switched between elements in the same shadow tree. r=masayuki
The EditorEventListener for HTMLEditor is registered on document,
which is problematic because it can't receive events when the focus is
switched between elements in the same shadow tree due to shadow dom
encapsulation.

We fix this by moving the EditorEventListener to nsWindowRoot so the
events can always be received.

Differential Revision: https://phabricator.services.mozilla.com/D178215
2023-05-24 13:31:57 +00:00
Sandor Molnar c7daca2e34 Backed out changeset e8b6a5dbf398 (bug 1817723) for causing mochitest failures in editor/libeditor/EditorEventListener.cpp CLOSED TREE 2023-05-24 10:03:39 +03:00
Kris Maglione f9100d622c Bug 1769763: Part 2 - Add debug names to StructuredCloneHolder objects for about:memory. r=mccr8,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D162251
2023-05-23 23:13:36 +00:00
Sean Feng df6c9aefca Bug 1817723 - Allow HTMLEditor can receive events when the focus is switched between elements in the same shadow tree. r=masayuki
The EditorEventListener for HTMLEditor is registered on document,
which is problematic because it can't receive events when the focus is
switched between elements in the same shadow tree due to shadow dom
encapsulation.

We fix this by moving the EditorEventListener to nsWindowRoot so the
events can always be received.

Differential Revision: https://phabricator.services.mozilla.com/D178215
2023-05-23 22:57:16 +00:00
Natalia Csoregi e87ecf485e Backed out 3 changesets (bug 1834222, bug 1834176) for causing RemoteProcessMonitor failures. CLOSED TREE
Backed out changeset 346d3a1568dd (bug 1834222)
Backed out changeset ea1d8b634bfc (bug 1834176)
Backed out changeset 74d1880272d3 (bug 1834176)
2023-05-24 04:29:45 +03:00
Mark Banner fbc15bdb60 Bug 1834176 - Convert NetUtil.jsm to be an ES system module. r=arai,webdriver-reviewers,perftest-reviewers,valentin,extension-reviewers,devtools-reviewers,sync-reviewers,cookie-reviewers,robwu,afinder,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D178589
2023-05-23 19:09:29 +00:00
Gijs Kruitbosch fde9a22b58 Bug 291640, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D178310
2023-05-23 11:29:23 +00:00
Noemi Erli aa2f146d78 Backed out 2 changesets (bug 1834176) for causing xpc failures in test_unload.js CLOSED TREE
Backed out changeset 57876d77a652 (bug 1834176)
Backed out changeset ae2f0837b528 (bug 1834176)
2023-05-23 12:14:37 +03:00
Mark Banner e3e9a991b8 Bug 1834176 - Convert NetUtil.jsm to be an ES system module. r=arai,webdriver-reviewers,perftest-reviewers,valentin,extension-reviewers,devtools-reviewers,sync-reviewers,cookie-reviewers,robwu,afinder,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D178589
2023-05-23 08:13:08 +00:00
Mark Banner 130a655906 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner 8219a5c503 Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Daniel Holbert 06aa3fba93 Bug 1834133 part 1: Remove about:config prefs layout.css.notify-of-unvisited and layout.css.always-repaint-on-unvisited. r=emilio
Update all of their usages to assume that they're true (which they have been, by-default, for several years).

Differential Revision: https://phabricator.services.mozilla.com/D178569
2023-05-20 06:07:48 +00:00
Sean Feng bd1e35c1d2 Bug 1816287 - Always exit fullscreen when triggering on external protocol r=edgar
It's a security risk such that the maximized external program can obscure
the fullscreen notification and the malicious site can use this trick
to load a spoofed page in the background without user notices it.

This patch minimized the risk by always exit the fullscreen mode when
an external protocol is triggered.

Differential Revision: https://phabricator.services.mozilla.com/D177771
2023-05-17 18:00:18 +00:00
Norisz Fay 34b6c94a76 Backed out changeset 6fa00ccfe7e0 (bug 1816287) for causing bustages on LocationBase.cpp CLOSED TREE 2023-05-17 20:11:39 +03:00
Sean Feng 9740581cf7 Bug 1816287 - Always exit fullscreen when triggering on external protocol r=edgar
It's a security risk such that the maximized external program can obscure
the fullscreen notification and the malicious site can use this trick
to load a spoofed page in the background without user notices it.

This patch minimized the risk by always exit the fullscreen mode when
an external protocol is triggered.

Differential Revision: https://phabricator.services.mozilla.com/D177771
2023-05-17 16:34:57 +00:00
Kris Maglione 62ba2ff3ab Bug 1828690: Change a parent assert to an IPC_FAIL. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D176392
2023-05-15 22:10:38 +00:00
Olli Pettay 1a2c59c3bb Bug 1827655, for consistency, make nsISHEntry implementations support weak references similarly to nsISHistory implementation, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D177532
2023-05-15 14:48:46 +00:00
Masayuki Nakano e16a783838 Bug 1829570 - part 2: Add an overload of `AsyncEventDispatcher::RunDOMEventWhenSafe` r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D176488
2023-05-15 01:07:29 +00:00
Mark Banner c2dd8e3266 Bug 1829618 - Enable Prettier on json files (automatic fixes). r=perftest-reviewers,webcompat-reviewers,extension-reviewers,andi,desktop-theme-reviewers,pip-reviewers,devtools-reviewers,sync-reviewers,mossop,denschub,dao,sparky,robwu,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D176336
2023-05-09 16:14:51 +00:00
Valentin Gosu d245bc86c2 Bug 1828643 - Make sure LOAD_TRR_DISABLED_MODE gets passed through defaultLoadFlags when browsing context is replaced r=necko-reviewers,kershaw
When the user clicks continue this time in the DoH fallback warning page
we want to set the defaultLoadFlags to LOAD_TRR_DISABLED_MODE so all of
the pages & subresources in the tab will not use TRR from that point
forward.

Setting it directly on docshell.defaultLoadFlags seems to not have the correct
behaviour when the page is using the Cross-Origin-Opener-Policy header,
as that causes the DocumentChannel to do a cross process redirect and
recreate the browsing context.

Setting the defaultLoadFlags on the browsingContext directly and
adding the field to `CanonicalBrowsingContext::ReplacedBy` seems to lead to
the expected behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D176959
2023-05-04 10:06:44 +00:00
Butkovits Atila 992799b447 Backed out changeset bcdd097c9a4f (bug 1828690) for causing mass failures. CLOSED TREE 2023-05-03 04:02:36 +03:00
Kris Maglione 76be20b113 Bug 1828690: Change a parent assert to an IPC_FAIL. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D176392
2023-05-02 23:58:57 +00:00
owlishDeveloper 0560aeeeac Bug 1822711 - Enable mochitest-plain on Android Fission builds. Disable some of the tests that are currently failing r=jmaher,taskgraph-reviewers,geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D175077
2023-05-01 21:26:40 +00:00
Dana Keeler f0596227b1 Bug 1811645 - avoid an American English colloquialism meaning "nonsense" r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D175802
2023-04-20 22:24:00 +00:00
Peter Van der Beken 635046af85 Bug 1804140 - Enable SHIP by default on desktop, whether or not Fission is disabled. r=smaug,jgraham,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D172278
2023-04-18 07:07:05 +00:00
Cosmin Sabou 60f701f2e5 Backed out 2 changesets (bug 1804140) for causing webdriver failures. CLOSED TREE
Backed out changeset 974558fd2790 (bug 1804140)
Backed out changeset dbe9d2f66fcc (bug 1804140)
2023-04-14 13:28:44 +03:00
Peter Van der Beken e0b98d564b Bug 1804140 - Enable SHIP by default on desktop, whether or not Fission is disabled. r=smaug,jgraham,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D172278
2023-04-14 08:09:50 +00:00
Daisuke Akatsuka 73dc3820cc Bug 1824040: Make the loading URL opened in _blank target to be the target of Session Restore r=mak,smaug,farre,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D173790
2023-04-14 01:59:44 +00:00
Alexandre Lissy 32a6eaf06f Bug 1819311 - Collect errors on process launch r=nika,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D171226
2023-04-13 08:35:24 +00:00
Olli Pettay 9fe9a6ccfd Bug 1827600 - Remove Timeline API usage from EventListenerManager, r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D175238
2023-04-12 14:28:11 +00:00
Tom Schuster c86335b0e3 Bug 1804684 - Fragment navigation may change document URI scheme from https to http. r=ckerschb,nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D165282
2023-04-12 12:35:18 +00:00
Sandor Molnar ad732108b0 Backed out changeset 7a21d83704b9 (bug 1822711) for causing mochitest failures in dom/security/test/csp/test_bug1242019.html CLOSED TREE 2023-04-12 05:44:25 +03:00
owlishDeveloper 6c9c240cd3 Bug 1822711 - Enable mochitest-plain on Android Fission builds. Disable some of the tests that are currently failing r=jmaher,taskgraph-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D175077
2023-04-12 00:30:34 +00:00
Emily McDonough afd9c3eee4 Bug 1576298 - Remove DeviceSizeIsPageSize from nsDocShell and nsPresContext. r=emilio
This comes from bug 890195, and it was superseded by bug 1575097.

This isn't used for anything anymore, and we can remove the otherwise unused
MediaFeatureChangeReason flag as well.

Differential Revision: https://phabricator.services.mozilla.com/D174492
2023-04-03 17:11:24 +00:00
serge-sans-paille 13e51277df Bug 1825324 - Make widget/* buildable outside of a unified build environment r=andi,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D173969
2023-04-01 08:31:12 +00:00
Cristian Tuns 8e06a7a853 Backed out 12 changesets (bug 1825325, bug 1825336, bug 1825333, bug 1825332, bug 1825324, bug 1824557, bug 1825328, bug 1825335, bug 1825330, bug 1825329, bug 1825327, bug 1825331) for causing build bustages in nsClipboard.cpp CLOSED TREE
Backed out changeset 9de3ed24d3a0 (bug 1825336)
Backed out changeset aef787728f19 (bug 1825335)
Backed out changeset a04c341244c1 (bug 1825333)
Backed out changeset e3ad15f762ba (bug 1825332)
Backed out changeset eed23da92a27 (bug 1825331)
Backed out changeset 8213bb54376e (bug 1825330)
Backed out changeset 747ec5ac4994 (bug 1825329)
Backed out changeset e91ff431f92d (bug 1825328)
Backed out changeset 59c18d13768b (bug 1825327)
Backed out changeset 538096d99e49 (bug 1825325)
Backed out changeset c76eb9d9b095 (bug 1825324)
Backed out changeset 8b81410eb686 (bug 1824557)
2023-03-31 12:58:53 -04:00
serge-sans-paille 0702cdc836 Bug 1825324 - Make widget/* buildable outside of a unified build environment r=andi,geckoview-reviewers,m_kato
Depends on D173637

Differential Revision: https://phabricator.services.mozilla.com/D173969
2023-03-31 13:29:44 +00:00
Norisz Fay be62edbf40 Backed out changeset ef7d2e82eb5a (bug 1825745) for causing assertion failure on nsDocShell.cpp CLOSED TREE 2023-03-31 15:08:34 +03:00
Peter Van der Beken 029d2f8315 Bug 1825745 - Make form submits do a replace load if they happen before document load has ended. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D174224
2023-03-31 10:53:02 +00:00
Rob Wu aee0e76790 Bug 1821303 - Add hasPostData bool to nsISHEntry r=smaug
To avoid unnecessary cloning of nsIInputStream, add a hasPostData
boolean attribute to tell whether a nsISHEntry has populated postData.

Differential Revision: https://phabricator.services.mozilla.com/D173237
2023-03-30 14:05:09 +00:00
Iulian Moraru f0ccf10c64 Backed out 3 changesets (bug 1821303) for causing xpcshell failures on test_ext_dnr_allowAllRequests.js. CLOSED TREE
Backed out changeset f474edf390d1 (bug 1821303)
Backed out changeset 90c73fb01441 (bug 1821303)
Backed out changeset 84cd09689228 (bug 1821303)
2023-03-29 20:53:32 +03:00
Rob Wu e505210f70 Bug 1821303 - Add hasPostData bool to nsISHEntry r=smaug
To avoid unnecessary cloning of nsIInputStream, add a hasPostData
boolean attribute to tell whether a nsISHEntry has populated postData.

Differential Revision: https://phabricator.services.mozilla.com/D173237
2023-03-29 15:50:45 +00:00
Andreas Farre 7d3b320651 Bug 1815663 - Pack synced fields. r=peterv
We use empty base optimization to reorder storage of synced fields to
loose as little as possible to padding.

Differential Revision: https://phabricator.services.mozilla.com/D173296
2023-03-29 13:00:15 +00:00
Cosmin Sabou c5ca3d1f46 Bug 1784831 - Disable test_bug321671.xhtml on mac !debug for frequent failures. r=#intermittent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D173745
2023-03-27 17:46:55 +00:00
Andi-Bogdan Postelnicu 4efa1bd0ba Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-27 07:20:25 +00:00
Sandor Molnar 9db345d4c1 Backed out 2 changesets (bug 1276351) for causing build bustage in image/ClippedImage.cp CLOSED TREE
Backed out changeset e84598eb82c1 (bug 1276351)
Backed out changeset e940b0554484 (bug 1276351)
2023-03-25 14:16:43 +02:00
Andi-Bogdan Postelnicu 447f1e3358 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-25 06:58:52 +00:00
Iulian Moraru 6d40eee997 Backed out 2 changesets (bug 1276351) for causing multiple failures.
Backed out changeset eeaf4f1e06af (bug 1276351)
Backed out changeset d44cb5704342 (bug 1276351)
2023-03-25 00:08:24 +02:00
Mark Banner 4a729cf9d7 Bug 1824173 - Automatically fix some ESLint issues raised by the valid-jsdoc configuration. r=mossop,webcompat-reviewers,denschub
Differential Revision: https://phabricator.services.mozilla.com/D173450
2023-03-24 19:35:24 +00:00
Andi-Bogdan Postelnicu a1b827b503 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-24 18:55:39 +00:00
Noemi Erli 50a2cc15fe Bug 1717403 - Disabled browser_bug670318.js on linux for causing frequent failures r=intermittent-reviewers,jmaher
Differential Revision: https://phabricator.services.mozilla.com/D173514
2023-03-24 12:56:08 +00:00
Sandor Molnar 4d6a262dee Merge autoland to mozilla-central a=merge 2023-03-22 23:12:50 +02:00
Olli Pettay 415571974a Bug 1818239, latter reload should win, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D173169
2023-03-22 14:51:47 +00:00
Cristina Horotan 678c52f5e7 Backed out changeset bb1f3463f21d (bug 1804684) for causing Bug 1823765 a=backout 2023-03-22 11:31:15 +02:00
Kershaw Chang 5e58575e28 Bug 1809843 - Skip Failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,valentin,sgalich,robwu
Differential Revision: https://phabricator.services.mozilla.com/D171842
2023-03-21 09:09:58 +00:00
Tom Schuster 2536630f8b Bug 1818250 - Add ShouldResistFingerprinting to WindowContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D172271
2023-03-20 18:52:25 +00:00
Nika Layzell f686782a80 Bug 1814686 - Part 2: Make nsDocShellLoadState not-null, and simplify handling of nsDOMNavigationTiming, r=necko-reviewers,valentin,smaug
These types were already non-nullable, with the serializer implementation not
supporting nullptr values. This patch converts the uses to be explicitly
non-nullable, and adds the relevant `WrapNotNull` changes.

Differential Revision: https://phabricator.services.mozilla.com/D168890
2023-03-20 15:40:38 +00:00
Nika Layzell 78fa962afb Bug 1814683 - Part 1: Combine parent/child fields in IPDL structs/unions, r=ipc-reviewers,necko-reviewers,mccr8
This combines the multiple fields or variants which were previously used to
track sided types like protocol types into a single field wrapped with a
SideVariant.

This will be used in the next part to avoid the need for default constructors
for actor types allowing the proper types to be used.

Differential Revision: https://phabricator.services.mozilla.com/D168879
2023-03-20 15:40:31 +00:00
lyavor 784f78bfb7 Bug 1804684 - Fragment navigation may change document URI scheme from https to http r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D165282
2023-03-20 13:46:20 +00:00
Sandor Molnar a67270c195 Backed out 2 changesets (bug 1804140) for causing multiple failures.
Backed out changeset 14243ef3e860 (bug 1804140)
Backed out changeset 8f4ae1ab430d (bug 1804140)
2023-03-20 14:33:35 +02:00
Peter Van der Beken 0a61153f2e Bug 1804140 - Enable SHIP by default on desktop, whether or not Fission is disabled. r=smaug,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D172278
2023-03-20 11:17:06 +00:00
Saira Abdulla 6a4ef6bc43 Bug 1822222 - Convert browser/actors/PageStyle* JSMs to ESMs. r=kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D172674
2023-03-17 01:55:59 +00:00
Makoto Kato 1edefc131e Bug 1673068 - Get rid of nsILoadURIDelegate.loadURI. r=smaug,geckoview-reviewers,owlish
`nsILoadURIDelegate.loadURI` seems to be unused now.

Differential Revision: https://phabricator.services.mozilla.com/D172392
2023-03-17 01:41:50 +00:00
Nika Layzell d564908035 Bug 1810619 - Part 1: Be more precise in named lookup code, r=smaug,geckoview-reviewers,m_kato
This makes various changes to the named lookup/navigation code to make
them more precise, and avoid issues which could happen if a window is
closed while script is still executing.

This also should improve handling for inactive windows in some cases, by
more frequently working off of the WindowContext tree rather than the
BrowsingContext tree.

As part of these changes, some behaviour was changed around e.g. the
file URI exception to avoid the deprecated nsIPrincipal::GetURI method.
I don't believe the behaviour should have changed in a meaningful way.

Differential Revision: https://phabricator.services.mozilla.com/D171755
2023-03-15 21:57:03 +00:00
Florian Quèze 839d8942f2 Bug 1822062 - avoid sending NotifyVisited IPCs with no URIs, r=emilio.
Differential Revision: https://phabricator.services.mozilla.com/D172688
2023-03-15 18:29:59 +00:00
Peter Van der Beken 8a2d0af2a0 Bug 1789296 - Intermittent /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/window-open-aboutblank.html. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D172249
2023-03-15 16:06:37 +00:00
Iulian Moraru 801dae8f2c Backed out 14 changesets (bug 1607634, bug 1814683, bug 1815177, bug 1814686) for causing build bustages on MaybeStorageBase. CLOSED TREE
Backed out changeset ae1c0551cea5 (bug 1815177)
Backed out changeset a11cafaa1884 (bug 1814686)
Backed out changeset 621507521762 (bug 1814686)
Backed out changeset ad692c73e381 (bug 1814686)
Backed out changeset 3be031e503dc (bug 1607634)
Backed out changeset aebbaa145d2d (bug 1607634)
Backed out changeset 9aa1f346fe14 (bug 1607634)
Backed out changeset e3eb77ad55ca (bug 1607634)
Backed out changeset e60591e5d5cf (bug 1607634)
Backed out changeset 6e43042d204a (bug 1814683)
Backed out changeset 1706e88652d6 (bug 1814683)
Backed out changeset 6878a1590e91 (bug 1814683)
Backed out changeset b1c980c834d8 (bug 1814683)
Backed out changeset 94480b82d102 (bug 1814683)
2023-03-15 01:58:36 +02:00
Nika Layzell 99ef2e2b47 Bug 1814686 - Part 2: Make nsDocShellLoadState not-null, and simplify handling of nsDOMNavigationTiming, r=necko-reviewers,valentin,smaug
These types were already non-nullable, with the serializer implementation not
supporting nullptr values. This patch converts the uses to be explicitly
non-nullable, and adds the relevant `WrapNotNull` changes.

Differential Revision: https://phabricator.services.mozilla.com/D168890
2023-03-14 19:31:42 +00:00
Nika Layzell 97577629c0 Bug 1814683 - Part 1: Combine parent/child fields in IPDL structs/unions, r=ipc-reviewers,necko-reviewers,mccr8
This combines the multiple fields or variants which were previously used to
track sided types like protocol types into a single field wrapped with a
SideVariant.

This will be used in the next part to avoid the need for default constructors
for actor types allowing the proper types to be used.

Differential Revision: https://phabricator.services.mozilla.com/D168879
2023-03-14 19:31:36 +00:00
Gijs Kruitbosch 9e0531a790 Bug 1718082 - move hasSiblings from BrowserChild to BC and update as a synced field, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D171645
2023-03-13 17:32:08 +00:00
Gijs Kruitbosch f64b33fbe8 Bug 1718082 - move isAppTab from docshell to browsing context, r=nika,rpl
Differential Revision: https://phabricator.services.mozilla.com/D171412
2023-03-13 17:32:07 +00:00
Marian-Vasile Laza ee72efd1e9 Backed out 5 changesets (bug 1809843) for causing Cargo related build bustages. CLOSED TREE
Backed out changeset 5c494680f448 (bug 1809843)
Backed out changeset 02742b38edab (bug 1809843)
Backed out changeset 2b9b32ca8294 (bug 1809843)
Backed out changeset 56631cb02ae6 (bug 1809843)
Backed out changeset 37e35a60a71f (bug 1809843)
2023-03-13 13:53:26 +02:00
Kershaw Chang a60df34ad0 Bug 1809843 - Skip Failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,valentin,sgalich,robwu
Differential Revision: https://phabricator.services.mozilla.com/D171842
2023-03-13 11:12:33 +00:00
Cristian Tuns 2af0d81d29 Backed out 2 changesets (bug 1810619) for causing wd failures in dom_content_loaded.py CLOSED TREE
Backed out changeset 81d6ef111d4f (bug 1810619)
Backed out changeset 637be53c4d27 (bug 1810619)
2023-03-09 01:22:56 -05:00
Nika Layzell eece505eef Bug 1810619 - Part 1: Be more precise in named lookup code, r=smaug,geckoview-reviewers,m_kato
This makes various changes to the named lookup/navigation code to make
them more precise, and avoid issues which could happen if a window is
closed while script is still executing.

This also should improve handling for inactive windows in some cases, by
more frequently working off of the WindowContext tree rather than the
BrowsingContext tree.

As part of these changes, some behaviour was changed around e.g. the
file URI exception to avoid the deprecated nsIPrincipal::GetURI method.
I don't believe the behaviour should have changed in a meaningful way.

Differential Revision: https://phabricator.services.mozilla.com/D171755
2023-03-08 21:09:20 +00:00
Peter Van der Beken 9f3dd9247b Bug 1812033 - Intermittent Assertion failure: !existingEntry == !existingLoadingInfo, at /builds/worker/checkouts/gecko/docshell/base/CanonicalBrowsingContext.cpp:568. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D171090
2023-03-07 16:46:34 +00:00
Jens Stutte b1a1a8b6b4 Bug 1816025 - Downgrade diagnostic assertion in BrowsingContextGroup::EnsureHostProcess. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D171457
2023-03-02 18:45:46 +00:00
Csoregi Natalia 5ddfea87da Backed out changeset 6b47f8d493b3 (bug 1816025) for causing assertion failures. CLOSED TREE 2023-03-02 19:26:01 +02:00
Jens Stutte c07444c356 Bug 1816025 - Downgrade diagnostic assertion in BrowsingContextGroup::EnsureHostProcess. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D171457
2023-03-02 15:06:23 +00:00
Jens Stutte 9f73d70d9c Bug 1811746 - Check embedderBrowser process if IsShuttingDown before re-use. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D171222
2023-03-02 13:03:51 +00:00
Paul Zuehlcke 15c7095f11 Bug 1818956 - Convert URLQueryStringStripper to XPCOM service and init on profile-on-change. r=anti-tracking-reviewers,necko-reviewers,jesup,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D171392
2023-03-02 11:18:07 +00:00
Brad Werth 94e5db7b03 Bug 1768495 Part 2: Pause or resume compositor when CanonicalBrowsingContext recomputes its visibility. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D169345
2023-02-28 23:16:56 +00:00
Andreas Farre 3575a37276 Bug 1775927 - Make sure progress listener isn't gc'd. r=peterv
nsIWebProgressListener is stored as a weak reference in
nsIWebProgress. To not have it garbage collected we need to keep a
reference to it.

Differential Revision: https://phabricator.services.mozilla.com/D171228
2023-02-28 15:57:19 +00:00
Makoto Kato aa3ccd258b Bug 1618885 - Remove unused is_fennec. r=jmaher,geckoview-reviewers,extension-reviewers,credential-management-reviewers,sgalich,robwu,calu
is_fennec is unused now, let's remove it.

Differential Revision: https://phabricator.services.mozilla.com/D170849
2023-02-27 01:44:18 +00:00
Peter Van der Beken ff0a13060a Bug 1818124 - Perma [tier 2] /builds/worker/checkouts/gecko/docshell/test/navigation/test_blockBFCache.html:101:5 | Unknown property access Services.appinfo.fission. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D170679
2023-02-25 17:26:41 +00:00
Julian Descottes b52f247f59 Bug 1816898 - Fix docshell/test/unit/test_allowJavascript.js for thunderbird r=nika
The browsing context might be replaced after the navigation

Differential Revision: https://phabricator.services.mozilla.com/D170596
2023-02-23 21:35:20 +00:00
Peter Van der Beken f1d59a32c8 Bug 1804803 - Hit MOZ_CRASH(DocumentLoadListener::Open for invalid history entry due to mismatch of 'Invalid LoadId'). r=smaug
When we start the load for a reload, check that the entry we're trying to
reload is still connected to session history.

Differential Revision: https://phabricator.services.mozilla.com/D165049
2023-02-21 15:09:09 +00:00
Peter Van der Beken bffd25e220 Bug 1816697 - Fix chrome tests that fail if session-history-in-parent is enabled without Fission. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D169825
2023-02-21 14:58:35 +00:00
Peter Van der Beken d6fe05cdfd Bug 1816697 - Change test annotations for tests that fail/only succeed with session-history-in-parent. r=smaug
Some of the tests that fail (or only succeed) with SHIP are currently marked for
Fission. This makes them fail once we turn on SHIP without Fission.

Differential Revision: https://phabricator.services.mozilla.com/D169824
2023-02-21 14:58:35 +00:00
Emilio Cobos Álvarez e22c322da5 Bug 1812868 - Tweak RDM and theme setup. r=mstange
This is in order to make nsPresContext::UseOverlayScrollbars() thread-safe for
stylo usage.

Document::GetBrowsingContext() does ref-counting of main-thread-only
objects, and we don't want that.

Similarly nsPresContext::Theme() mutates the pres context which is not
something we can do from multiple threads.

Reviewed in: https://phabricator.services.mozilla.com/D168148
2023-02-20 00:01:11 +01:00
Sandor Molnar 2bc700c04b Backed out 2 changesets (bug 1812868) for causing bug 1817539. CLOSED TREE
Backed out changeset 07c689de250c (bug 1812868)
Backed out changeset e7d370501c50 (bug 1812868)
2023-02-18 09:34:04 +02:00
Emilio Cobos Álvarez ad4bd6a3ba Bug 1812868 - Expose scrollbar-inline-size as a CSS variable to chrome code. r=mstange
For that we need to:

 * Make GetDPIRatioForScrollbarPart thread-safe: This was using the
   widget for bug 1727289, but just looking at the print preview scale
   is enough to fix that.

 * Make nsPresContext::UseOverlayScrollbars() thread-safe: We store the
   RDM pane stuff in the pres context.

The rest is pretty straight-forward.

Differential Revision: https://phabricator.services.mozilla.com/D168148
2023-02-17 21:15:06 +00:00
Emilio Cobos Álvarez be40d4df76 Bug 1814668 - Fix viewport size invalidation on MVM changes. r=hiro
The MVM doesn't change the document viewer bounds nor the view manager
bounds (maybe it used to?). Right now when exiting RDM, depending on the
order of operations (if MVM reset is the last thing to happen) we end up
with a wrong viewport size, because nsDocShell::SetSize is
short-circuited here[1].

Instead, force a resize reflow with the current dimensions which is what
the dynamic toolbar code also does, for example.

[1]: https://searchfox.org/mozilla-central/rev/5ccb73c0217d1710b10d6e6e297cf3396d10ec23/view/nsViewManager.cpp#172

Differential Revision: https://phabricator.services.mozilla.com/D169806
2023-02-15 13:58:40 +00:00
Emilio Cobos Álvarez 5e8315e1d3 Bug 1814668 - Invalidate media queries when BrowsingContext::TouchEventsOverride changes. r=hiro
Refactor the code a little bit to share more code.

Differential Revision: https://phabricator.services.mozilla.com/D169805
2023-02-15 13:57:59 +00:00
Daisuke Akatsuka 3093cbbf0a Bug 1733045: Remove nsINavBookmarkObserver. r=mak
Depends on D169583

Differential Revision: https://phabricator.services.mozilla.com/D131754
2023-02-15 00:29:13 +00:00
Joel Maher a62ef05cdb Bug 1816191 - Skip tests in order to keep win7 running @ azure. r=gbrown,necko-reviewers,settings-reviewers,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,nalexander,sgalich,alwu
Differential Revision: https://phabricator.services.mozilla.com/D169523
2023-02-14 23:44:12 +00:00
Peter Van der Beken de3979ca1f Bug 1816234 - Fix meta refresh with SHIP. r=smaug
BrowsingContext::ShouldAddEntryForRefresh expects to be passed the current URI,
to determine if it's the same as the URI for the new load (we shouldn't add a
new entry if they are the same). Before this patch, in the child process we call
BrowsingContext::ShouldAddEntryForRefresh from nsDocShell::MoveLoadingToActiveEntry
(nsDocShell::CreateContentViewer -> Embed -> MoveLoadingToActiveEntry), passing
nsDocShell's mCurrentURI. However, by that point nsDocShell::CreateContentViewer
has already set the mCurrentURI to the newly loading URI (through
nsDocShell::OnNewURI). In the parent process we do pass the correct URI to
BrowsingContext::ShouldAddEntryForRefresh, so the session history ends up being
correct, but depending on timing of the IPC messages there's a brief moment where
index and length are incorrect in the child process (child process and parent
process get a different answer from BrowsingContext::ShouldAddEntryForRefresh).
This causes intermittent failures in the test at
docshell/test/mochitest/test_bug1742865.html.

Differential Revision: https://phabricator.services.mozilla.com/D169544
2023-02-14 10:19:54 +00:00
Gijs Kruitbosch 387cf24ca0 Bug 1810141 - fix tests to deal with changes to loadURI, r=mossop,perftest-reviewers,geckoview-reviewers,extension-reviewers,sparky,owlish
Depends on D168396

Differential Revision: https://phabricator.services.mozilla.com/D168397
2023-02-13 23:50:41 +00:00
Gijs Kruitbosch 9340b9bc7e Bug 1810141 - make docshell/nsIWebNavigation's loadURI actually take a URI object rather than a string, r=nika
Depends on D168390

Differential Revision: https://phabricator.services.mozilla.com/D168391
2023-02-13 23:50:39 +00:00
Gijs Kruitbosch 9d7452a247 Bug 1810141 - update consumers of CanonicalBrowsingContext.loadURI to use fixup or pass a URI object if they have it, r=mak,webdriver-reviewers,whimboo
Depends on D168389

Differential Revision: https://phabricator.services.mozilla.com/D168390
2023-02-13 23:50:38 +00:00
Gijs Kruitbosch 57b6bd03cd Bug 1810141 - make browsingcontext's loadURI actually take a URI rather than a string, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D168389
2023-02-13 23:50:38 +00:00
Julian Descottes 66eca9e88c Bug 1757457 - [devtools] Recompute mCanExecuteScripts after navigation r=smaug
I can see that after navigation, allowJavascript is correctly set for the browsing context, but it seems we need to call
RecomputeCanExecuteScripts() to force it to be applied to the new page. Not sure if doing this here makes sense or if it should be done earlier.

Also there are still other issues with this feature:
- closing the toolbox does not reload the page: meaning JavaScript remains disabled on the page
- similarly all pages which have been put in bfcache will retain the javascript disabled/enabled setting

For the first issue, I wonder if we should force a reload when closing the toolbox (iff javascript disabled was toggled).
And for the second issue, could we invalidate contexts put in bfcache for a given browsing context when we toggle allowJavaScript?

Olli: Does this change make sense at least to fix the basic issue?

Differential Revision: https://phabricator.services.mozilla.com/D169182
2023-02-13 17:52:51 +00:00
Cristina Horotan 5f4356e527 Backed out 9 changesets (bug 1810141) for several test failures on a CLOSED TREE
Backed out changeset 8781a0d1254d (bug 1810141)
Backed out changeset 131037295784 (bug 1810141)
Backed out changeset 3852fbe290f4 (bug 1810141)
Backed out changeset 118f131a524a (bug 1810141)
Backed out changeset ab5d76846e10 (bug 1810141)
Backed out changeset dce3aa683445 (bug 1810141)
Backed out changeset 4dc41d90dbb3 (bug 1810141)
Backed out changeset 50b57ba1a061 (bug 1810141)
Backed out changeset 569de94781e4 (bug 1810141)
2023-02-13 16:05:30 +02:00
Gijs Kruitbosch ff1cc20bd7 Bug 1810141 - fix tests to deal with changes to loadURI, r=mossop,perftest-reviewers,geckoview-reviewers,extension-reviewers,sparky,owlish
Depends on D168396

Differential Revision: https://phabricator.services.mozilla.com/D168397
2023-02-13 12:55:26 +00:00
Gijs Kruitbosch 60d67bb0ad Bug 1810141 - make docshell/nsIWebNavigation's loadURI actually take a URI object rather than a string, r=nika
Depends on D168390

Differential Revision: https://phabricator.services.mozilla.com/D168391
2023-02-13 12:55:23 +00:00
Gijs Kruitbosch e460aa10f3 Bug 1810141 - update consumers of CanonicalBrowsingContext.loadURI to use fixup or pass a URI object if they have it, r=mak,webdriver-reviewers,whimboo
Depends on D168389

Differential Revision: https://phabricator.services.mozilla.com/D168390
2023-02-13 12:55:22 +00:00
Gijs Kruitbosch 4cd5a989e5 Bug 1810141 - make browsingcontext's loadURI actually take a URI rather than a string, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D168389
2023-02-13 12:55:22 +00:00
Cristian Tuns b25ff1fab8 Backed out 3 changesets (bug 1768495) for causing reftest failures in 1478035.html CLOSED TREE
Backed out changeset 6a48a9418fb3 (bug 1768495)
Backed out changeset ac0c0d68e31d (bug 1768495)
Backed out changeset 74c1903a5df6 (bug 1768495)
2023-02-09 21:31:43 -05:00
Brad Werth 421dfdd517 Bug 1768495 Part 2: Pause or resume compositor when CanonicalBrowsingContext recomputes its visibility. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D169345
2023-02-09 23:44:19 +00:00
Emilio Cobos Álvarez d28f1e4d47 Bug 1815255 - Fix tests to deal with flexbox emulation. r=Jamie,Gijs
Mostly changing XUL attributes to CSS properties, though there are a few
tricky ones:

 * test_offsets.xhtml expects the scroller to be full-width, while
   modern flexbox would honor width: 200px (so just remove it).

 * window_intrinsic_size.xhtml was relying on the div imposing a XUL
   min-size (the test is for SetSizeConstraints, bug 1447056). Use
   min-height instead as that's what modern flexbox reads. Confirmed
   that bug doesn't regress in any case.

 * object-fit-contain-png-001.xhtml has a float: left which had no
   effect on -moz-box, but which assert with modern layout[1]. In the
   future I think we could remove that assert but anyways, for now just
   keeping behavior.

 * image-size.xhtml has a couple uninvestigated sizing differences. They
   didn't seem problematic.

 * 579323-1-ref.html changes because the other file has a canvas with
   width=100 height=100 which imposes an aspect ratio (which XUL never
   honored).

 * window_largemenu.xhtml shows a regression, but this never worked on
   some platforms (at least Linux+Wayland) and nobody has noticed it in
   the browser area, so I suspect we're fine.

[1]: https://searchfox.org/mozilla-central/rev/08362489086b10de96e7a199b267ea5504c01583/layout/generic/ReflowInput.cpp#2137

Differential Revision: https://phabricator.services.mozilla.com/D169084
2023-02-09 12:24:53 +00:00
Nazım Can Altınova 3c14a0bff0 Bug 1812368 - Truncate the URLs we are passing into profiler markers r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D169053
2023-02-09 10:16:51 +00:00
Marian-Vasile Laza 7675a138b5 Backed out 2 changesets (bug 1815255) for causing reftest failures. CLOSED TREE
Backed out changeset b1173e8c7497 (bug 1815255)
Backed out changeset bd09cf2a4abb (bug 1815255)
2023-02-09 04:26:01 +02:00
Emilio Cobos Álvarez 656f11b2a0 Bug 1815255 - Fix tests to deal with flexbox emulation. r=Jamie,Gijs
Mostly changing XUL attributes to CSS properties, though there are a few
tricky ones:

 * test_offsets.xhtml expects the scroller to be full-width, while
   modern flexbox would honor width: 200px (so just remove it).

 * window_intrinsic_size.xhtml was relying on the div imposing a XUL
   min-size (the test is for SetSizeConstraints, bug 1447056). Use
   min-height instead as that's what modern flexbox reads. Confirmed
   that bug doesn't regress in any case.

 * object-fit-contain-png-001.xhtml has a float: left which had no
   effect on -moz-box, but which assert with modern layout[1]. In the
   future I think we could remove that assert but anyways, for now just
   keeping behavior.

 * image-size.xhtml has a couple uninvestigated sizing differences. They
   didn't seem problematic.

 * 579323-1-ref.html changes because the other file has a canvas with
   width=100 height=100 which imposes an aspect ratio (which XUL never
   honored).

 * window_largemenu.xhtml shows a regression, but this never worked on
   some platforms (at least Linux+Wayland) and nobody has noticed it in
   the browser area, so I suspect we're fine.

[1]: https://searchfox.org/mozilla-central/rev/08362489086b10de96e7a199b267ea5504c01583/layout/generic/ReflowInput.cpp#2137

Differential Revision: https://phabricator.services.mozilla.com/D169084
2023-02-09 00:55:13 +00:00
Cristina Horotan fbcc0f66b4 Backed out 2 changesets (bug 1815255) for causing chrome failures at test_focus.xhtml on a CLOSED TREE
Backed out changeset 983fe4e70647 (bug 1815255)
Backed out changeset f8c6426c60f9 (bug 1815255)
2023-02-08 19:50:19 +02:00
Emilio Cobos Álvarez 5db814c383 Bug 1815255 - Fix tests to deal with flexbox emulation. r=Jamie,Gijs
Mostly changing XUL attributes to CSS properties, though there are a few
tricky ones:

 * test_offsets.xhtml expects the scroller to be full-width, while
   modern flexbox would honor width: 200px (so just remove it).

 * window_intrinsic_size.xhtml was relying on the div imposing a XUL
   min-size (the test is for SetSizeConstraints, bug 1447056). Use
   min-height instead as that's what modern flexbox reads. Confirmed
   that bug doesn't regress in any case.

 * object-fit-contain-png-001.xhtml has a float: left which had no
   effect on -moz-box, but which assert with modern layout[1]. In the
   future I think we could remove that assert but anyways, for now just
   keeping behavior.

 * image-size.xhtml has a couple uninvestigated sizing differences. They
   didn't seem problematic.

 * 579323-1-ref.html changes because the other file has a canvas with
   width=100 height=100 which imposes an aspect ratio (which XUL never
   honored).

 * window_largemenu.xhtml shows a regression, but this never worked on
   some platforms (at least Linux+Wayland) and nobody has noticed it in
   the browser area, so I suspect we're fine.

[1]: https://searchfox.org/mozilla-central/rev/08362489086b10de96e7a199b267ea5504c01583/layout/generic/ReflowInput.cpp#2137

Differential Revision: https://phabricator.services.mozilla.com/D169084
2023-02-08 16:52:18 +00:00
Jens Stutte a5cf43833e Bug 1814603 - Change more ContentParent::IsDead checks to ContentParent::IsShuttingDown. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D168995
2023-02-07 18:07:19 +00:00
Greg Tatum a254222081 Bug 1805476 - Stub out an about:translations page with no real functionality; r=nordzilla
This page is hidden behind a pref, but not behind an ifdef. I chose to
do this in order to simplify the potential release of this feature. I
don't foresee issues with bloating the binary during the development,
so this doesn't feel like a risk to me.

Differential Revision: https://phabricator.services.mozilla.com/D164613
2023-02-06 21:56:37 +00:00
Jens Stutte 75a94959cb Bug 1813391 - Have ContentParent::IsShuttingDown and check it instead of IsAlive where appropriate. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D168225
2023-02-01 15:50:49 +00:00
Olli Pettay 2cc9c7eaf8 Bug 1810903, return early from LoadErrorPage if the docshell is going away, r=peterv
We'd return early anyhow later in nsDocShell::InternalLoad.
The patch is based on code inspection. If one is closing the window while printing, we could get to this state, among other cases.

Differential Revision: https://phabricator.services.mozilla.com/D168368
2023-01-31 13:47:50 +00:00
Gijs Kruitbosch c906d6f529 Bug 1795255 - manual fixes for tests that break after applying this lint rule, r=Standard8,necko-reviewers,extension-reviewers,credential-management-reviewers,sgalich,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D167802
2023-01-31 11:48:41 +00:00
Stanca Serban 373a25b201 Merge mozilla-central to autoland. CLOSED TREE 2023-01-25 11:48:07 +02:00
Stanca Serban e1b4aec181 Backed out changeset efdaaeb6ecf2 (bug 1804803) for causing Bug 1812257. a=backout 2023-01-25 11:41:08 +02:00
Gijs Kruitbosch 129735a58b Bug 1811854 - switch remaining tests to BrowserTestUtils.loadURIString from BrowserTestUtils.loadURI, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D167558
2023-01-24 13:19:11 +00:00
Peter Van der Beken 12f9eda269 Bug 1804803 - Hit MOZ_CRASH(DocumentLoadListener::Open for invalid history entry due to mismatch of 'Invalid LoadId'). r=smaug
When we start the load for a reload, check that the entry we're trying to
reload is still connected to session history.

Differential Revision: https://phabricator.services.mozilla.com/D165049
2023-01-24 11:11:26 +00:00
Emilio Cobos Álvarez 9e530f224a Bug 1811834 - Clean up nsWidgetInitData. r=cmartin,geckoview-reviewers,calu
Move it to the mozilla::widget namespace.

Use enum classes for transparency, popup type, popup level, etc.

Mostly automated with sed, but there were a few manual changes required
as well in windows code because they relied on Atomic<TransparencyMode>
working (which now doesn't because TransparencyMode is 1 byte instead of
4 bytes).

Differential Revision: https://phabricator.services.mozilla.com/D167537
2023-01-23 23:58:41 +00:00
Olli Pettay ee07926a1f Bug 1803628, initiate frameloader destroy asynchronously, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D166830
2023-01-20 16:39:39 +00:00
Gijs Kruitbosch cb015ad1d8 Bug 1810995 - update BrowserTestUtils.loadURI consumers to use loadURIString (automated) - dom and docshell - r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D167152
2023-01-19 20:16:41 +00:00
Cosmin Sabou 0869b4045d Backed out changeset 7e708c1c9d9d (bug 1805182) for causing SessionHistory related failures. 2023-01-19 19:37:59 +02:00
Sean Feng 930130580b Bug 1805182 - Fix the bug where postData is lost when the LoadingSessionHistoryEntry is replaced for redirect r=peterv
The postData should be carried over when we replace the
LoadingSessionHistoryEntry for the redirect.

Differential Revision: https://phabricator.services.mozilla.com/D166176
2023-01-19 15:34:47 +00:00
Emilio Cobos Álvarez 2a47aa3103 Bug 1569439 - Cleanup tooltip pref handling. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D166943
2023-01-19 10:28:28 +00:00
Adam Vandolder 1267f7d14f Bug 1509346 - Add support for <form rel>. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D166489
2023-01-18 16:41:04 +00:00
Edgar Chen b7397e64ea Bug 1794622; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161133
2023-01-17 20:22:16 +00:00
Butkovits Atila a7d3e99d52 Backed out changeset 704407d7ca31 (bug 1509346) for causing wpt failures at put-forwards.html. 2023-01-17 20:04:52 +02:00
Adam Vandolder 629f0f42e1 Bug 1509346 - Add support for <form rel>. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D166489
2023-01-17 16:11:06 +00:00
Artur Iunusov c4ec4d7309 Bug 1671548 - Remove fission experiment support code and prefs, r=smaug,
r=tritter

- backed out changesets: 1660057, 1667426, 1674214,
1669749, 1685801, 1667381
- fission.experiment support removed everywhere, including telemetry

Differential Revision: https://phabricator.services.mozilla.com/D165169
2023-01-17 10:05:36 +00:00
Sandor Molnar 06e631d4a6 Backed out changeset 5ad22146a015 (bug 1509346) for causing failures in docshell/base/nsDocShell.cpp 2023-01-17 03:16:20 +02:00
Adam Vandolder b2b544c7ed Bug 1509346 - Add support for <form rel>. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D166489
2023-01-16 21:32:19 +00:00
Mark Banner d691c51a0d Bug 1808173 - Convert prompts imports to direct ES imports. r=Gijs,webdriver-reviewers,necko-reviewers,application-update-reviewers,credential-management-reviewers,valentin,whimboo,dimi,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D165794
2023-01-16 13:32:20 +00:00
Nika Layzell 7955f931fa Bug 1808630 - Part 3: Handle cross-group system openers in BrowsingContext::FindWithName, r=smaug
This is possible in test situations, as a content document with a system
principal can call methods like window.open on a chrome document, which has a
different BCG. Treat these cross-group calls like they're coming from the
target document.

Differential Revision: https://phabricator.services.mozilla.com/D166120
2023-01-09 22:22:06 +00:00
Narcis Beleuzu 83d927b5f0 Backed out changeset 30d7636620f8 (bug 1804684) as req by smaug 2023-01-09 22:51:57 +02:00
Emilio Cobos Álvarez aedb1cbcd6 Bug 1808748 - Add a browsing context flag to force the top level chrome browsing context to remain active. r=nika
This will be useful for bug 1770429.

Differential Revision: https://phabricator.services.mozilla.com/D166105
2023-01-09 16:38:47 +00:00
lyavor b91a327df6 Bug 1804684 - Fragment navigation may change document URI scheme from https to http r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D165282
2023-01-05 21:26:43 +00:00
Sean Feng d3a8f2d77f Bug 1791083 - Unset the hover state when a page enters BFCache r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D165894
2023-01-04 22:53:07 +00:00
lyavor a1593f002b Bug 1802505 - Add disable next line for all docshell/test/mochitest and docshell/test/chrome r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D164229
2022-12-29 12:24:15 +00:00
Sylvestre Ledru 1f8d23143a Bug 1802288 - remove trailing whitespaces in idl/webidl files r=credential-management-reviewers,webidl,smaug,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D165559
2022-12-28 09:52:44 +00:00
Olli Pettay 2e25a827e0 Bug 1804295 - Remove the current use of favorPerformanceHint, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163964
2022-12-27 13:12:21 +00:00
Valentin Gosu df13492ee4 Bug 1596845 - Make DNSServices available as `Services.dns` r=necko-reviewers,webdriver-reviewers,kershaw
Depends on D164347

Differential Revision: https://phabricator.services.mozilla.com/D164856
2022-12-23 09:26:17 +00:00
Marian-Vasile Laza 56b22ee0ba Backed out 9 changesets (bug 1596845) for causing xpcshell failures on test_trr_enterprise_policy.js. CLOSED TREE
Backed out changeset 231acfc052bb (bug 1596845)
Backed out changeset 7d02dad4d720 (bug 1596845)
Backed out changeset b0449eec2671 (bug 1596845)
Backed out changeset 5cd033c9ef7c (bug 1596845)
Backed out changeset 98d583f1d19e (bug 1596845)
Backed out changeset b78bc0049605 (bug 1596845)
Backed out changeset 88919aaff89b (bug 1596845)
Backed out changeset f4adb3e7b8e1 (bug 1596845)
Backed out changeset b171f7ac0b40 (bug 1596845)
2022-12-23 09:21:39 +02:00
Valentin Gosu 6ca2987fe1 Bug 1596845 - Make DNSServices available as `Services.dns` r=necko-reviewers,webdriver-reviewers,kershaw
Depends on D164347

Differential Revision: https://phabricator.services.mozilla.com/D164856
2022-12-23 01:20:03 +00:00
Sandor Molnar 56d5efdcae Backed out 9 changesets (bug 1596845) for causing mochitest failures in browser/base/content/test/about/browser_aboutCertError_telemetry.js
Backed out changeset eb1e34c3041f (bug 1596845)
Backed out changeset af6d41439c60 (bug 1596845)
Backed out changeset f1447dd8df04 (bug 1596845)
Backed out changeset a383f2bbcaae (bug 1596845)
Backed out changeset 950c66dd6133 (bug 1596845)
Backed out changeset ab300239fd69 (bug 1596845)
Backed out changeset 8e1fe024b680 (bug 1596845)
Backed out changeset 80e5048d1f35 (bug 1596845)
Backed out changeset b14a4910d73b (bug 1596845)
2022-12-23 00:56:35 +02:00
Valentin Gosu ff04cde9bd Bug 1596845 - Make DNSServices available as `Services.dns` r=necko-reviewers,webdriver-reviewers,kershaw
Depends on D164347

Differential Revision: https://phabricator.services.mozilla.com/D164856
2022-12-22 21:16:07 +00:00
Andreas Farre 95de092629 Bug 1745645 - Set the value for HasActivePeerConnections early. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D165400
2022-12-22 16:53:54 +00:00
Norisz Fay acaf348a8b Backed out changeset 6b39ac73fb99 (bug 1804803) for causing build bustages CLOSED TREE 2022-12-21 14:37:39 +02:00
Peter Van der Beken 2e0e3168ab Bug 1804803 - Hit MOZ_CRASH(DocumentLoadListener::Open for invalid history entry due to mismatch of 'Invalid LoadId'). r=smaug
When we start the load for a reload, check that the entry we're trying to
reload is still connected to session history.

Differential Revision: https://phabricator.services.mozilla.com/D165049
2022-12-21 10:48:38 +00:00
lyavor b28d8cdf5f Bug 1731210 - pdf.js modal for unsaved data on a pdf page appears twice in private window r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D153612
2022-12-20 13:31:07 +00:00
Matthias Camenzind c341905d11 Bug 1786048 - Part 4: Remove cross process SizeShellTo. r=emilio
Because the parent process lacks information about the current shell
size, the child has to send both the current and the new shell size to
the parent. The parent then applies the delta to the window size. This
can produce different results for calls with the same arguments,
whenever a previous call did not have enough time to update the child
with its new size.

The implementation is replaced by applying the delta in the child.

Differential Revision: https://phabricator.services.mozilla.com/D160261
2022-12-15 23:13:01 +00:00
Matthias Camenzind c9300fab1e Bug 1786048 - Part 3: Merge nsIEmbeddingSiteWindow into nsIBaseWindow. r=emilio
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().

This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.

Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".

GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.

nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().

The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).

Differential Revision: https://phabricator.services.mozilla.com/D160260
2022-12-15 23:13:00 +00:00
Matthias Camenzind 5ca3ed6b88 Bug 1786048 - Part 2: Use layout device pixels for AppWindow primary content size. r=emilio
The getter used to return CSS pixels, while the setter expected layout
device pixels. The nsIDocShellTreeOwner documentation used to suggest that
CSS pixels are used for getters and setters of the primary content and
the root shell size. Only the getter for the primary content size
happend to match that documentation.

Differential Revision: https://phabricator.services.mozilla.com/D161944
2022-12-15 23:13:00 +00:00
Andrew McCreight ce28c41da0 Bug 1805931, part 2 - Automated removal of uses of ROOT and UNROOT CC macros. r=smaug
As of the prior patch, these are no longer needed. I removed
these with a script, then ran clang-format on the files, then
manually reverted a few unrelated changed from the formatter.

Differential Revision: https://phabricator.services.mozilla.com/D164829
2022-12-15 19:45:01 +00:00
Tom Schuster bf618bbc4a Bug 1774866 - Always allow cloning error stacks. r=nika,sfink,smaug
Differential Revision: https://phabricator.services.mozilla.com/D164577
2022-12-15 19:03:53 +00:00
Emilio Cobos Álvarez a14c746228 Bug 1805415 - Use activateItem() rather than click() to activate menuitems. r=Gijs,extension-reviewers,pip-reviewers,search-reviewers
Bug 1805414 will move menu event handling to the DOM.

With that change the current synthetic click behavior of XUL menuitems
breaks. On current central, we rely on nsMenuFrame::HandleEvent not
getting called at all for synthetic clicks, and instead we just fire a
command event synchronously here:

  https://searchfox.org/mozilla-central/rev/a0d4f8f112c5c792ae272bf6ce50763ddd23ffa2/dom/xul/nsXULElement.cpp#1071

After my patch the command event is fired properly (potentially
asynchronously too) by the regular menu activation machinery, which is
preferable.

 * They fire a command event synchronously (even though on some
   platforms like macOS activating a context menu item is async).

 * They use a totally different codepath from what a user does.

 * They don't deal with native menus, etc.

We have a proper API for this (activateItem) which takes a much more
closer codepath to what users do, requires that the menu is shown, etc.
Use that API instead for testing.

As a benefit, tests now do not need to close the context menu manually
when clicking on a menu item (because we trigger the same code path as
users clicking the menu).

Differential Revision: https://phabricator.services.mozilla.com/D164567
2022-12-15 03:11:55 +00:00
Cristian Tuns b638ccfac9 Backed out 2 changesets (bug 1805415) for causing dt failures on browser_net_telemetry_throttle_changed.js CLOSED TREE
Backed out changeset 5056d7df9f1e (bug 1805415)
Backed out changeset e13513500184 (bug 1805415)
2022-12-14 08:52:21 -05:00
Emilio Cobos Álvarez be1f057109 Bug 1805415 - Use activateItem() rather than click() to activate menuitems. r=Gijs,extension-reviewers,pip-reviewers,search-reviewers
Bug 1805414 will move menu event handling to the DOM.

With that change the current synthetic click behavior of XUL menuitems
breaks. On current central, we rely on nsMenuFrame::HandleEvent not
getting called at all for synthetic clicks, and instead we just fire a
command event synchronously here:

  https://searchfox.org/mozilla-central/rev/a0d4f8f112c5c792ae272bf6ce50763ddd23ffa2/dom/xul/nsXULElement.cpp#1071

After my patch the command event is fired properly (potentially
asynchronously too) by the regular menu activation machinery, which is
preferable.

 * They fire a command event synchronously (even though on some
   platforms like macOS activating a context menu item is async).

 * They use a totally different codepath from what a user does.

 * They don't deal with native menus, etc.

We have a proper API for this (activateItem) which takes a much more
closer codepath to what users do, requires that the menu is shown, etc.
Use that API instead for testing.

As a benefit, tests now do not need to close the context menu manually
when clicking on a menu item (because we trigger the same code path as
users clicking the menu).

Differential Revision: https://phabricator.services.mozilla.com/D164567
2022-12-14 10:25:17 +00:00
Adam Vandolder 78234d7b22 Bug 1402292 - Ignore form submission attempt to navigate from already navigated document. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D163723
2022-12-12 16:15:25 +00:00
lyavor eb81c040db Bug 1801843 - Add disable next line for all docshell/test/browser r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D162713
2022-12-08 12:41:59 +00:00
Gijs Kruitbosch ec920ad31c Bug 1804512 - convert SessionStoreFunctions.jsm to sys.mjs ES module, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D164117
2022-12-08 09:51:18 +00:00
Sandor Molnar a1e9c1d43b Backed out 4 changesets (bug 1786048) for causing multiple failures. CLOSED TREE
Backed out changeset ae94135e68ef (bug 1786048)
Backed out changeset f505df8a481a (bug 1786048)
Backed out changeset 999a18d6f33e (bug 1786048)
Backed out changeset e71e8644b8a9 (bug 1786048)
2022-12-02 20:30:07 +02:00
Matthias Camenzind 2d534f1a5a Bug 1786048 - Part 4: Remove cross process SizeShellTo. r=emilio
Because the parent process lacks information about the current shell
size, the child has to send both the current and the new shell size to
the parent. The parent then applies the delta to the window size. This
can produce different results for calls with the same arguments,
whenever a previous call did not have enough time to update the child
with its new size.

The implementation is replaced by applying the delta in the child.

Differential Revision: https://phabricator.services.mozilla.com/D160261
2022-12-02 16:47:46 +00:00
Matthias Camenzind 562af0a9b4 Bug 1786048 - Part 3: Merge nsIEmbeddingSiteWindow into nsIBaseWindow. r=emilio
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().

This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.

Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".

GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.

nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().

The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).

Differential Revision: https://phabricator.services.mozilla.com/D160260
2022-12-02 16:47:46 +00:00
Matthias Camenzind d5275b050e Bug 1786048 - Part 2: Use layout device pixels for AppWindow primary content size. r=emilio
The getter used to return CSS pixels, while the setter expected layout
device pixels. The nsIDocShellTreeOwner documentation used to suggest that
CSS pixels are used for getters and setters of the primary content and
the root shell size. Only the getter for the primary content size
happend to match that documentation.

Differential Revision: https://phabricator.services.mozilla.com/D161944
2022-12-02 16:47:45 +00:00
Manuel Bucher b7aff527da Bug 1771867 - Early Hints Phase 2 - Part 8: Add list of open channels from OngoingEarlyHints to RedirectToRealChannelArgs r=necko-reviewers,valentin,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D161179
2022-12-02 16:15:56 +00:00
Martin Robinson abb5044ca7 Bug 1803377 - Rename the values of the `IntrinsicDirty` enum r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163607
2022-12-02 12:27:31 +00:00
Csoregi Natalia 5a260d61a4 Backed out 13 changesets (bug 1771867) for causing CanonicalBrowsingContext crashes. CLOSED TREE
Backed out changeset 120838b58449 (bug 1771867)
Backed out changeset aea7ca0bbd17 (bug 1771867)
Backed out changeset 2fe2afdee09d (bug 1771867)
Backed out changeset 8bdb1f682d22 (bug 1771867)
Backed out changeset a9f3158ed688 (bug 1771867)
Backed out changeset 1177913e1edf (bug 1771867)
Backed out changeset d33ccbbf407d (bug 1771867)
Backed out changeset 110ac12e16f5 (bug 1771867)
Backed out changeset 7f20525f5e94 (bug 1771867)
Backed out changeset b3d65b1aa872 (bug 1771867)
Backed out changeset 7cdf3cef2773 (bug 1771867)
Backed out changeset 5090eae24a5c (bug 1771867)
Backed out changeset f8a03d226c73 (bug 1771867)
2022-12-02 13:44:55 +02:00
Manuel Bucher 95a28e77f3 Bug 1771867 - Early Hints Phase 2 - Part 8: Add list of open channels from OngoingEarlyHints to RedirectToRealChannelArgs r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161179
2022-12-02 09:45:27 +00:00
Nika Layzell bca0a6965b Bug 1793463 - Part 4: Generate static components entries for protocols, r=necko-reviewers,xpcom-reviewers,valentin,kmag
This adds a new set of options to static components.conf files to allow
specifying the protocol flags and default ports of a protocol handler, and
generates a separate table just for this purpose.

This will be used in the next part as part of replacing the existing protocol
handler lookup infrastructure.

Differential Revision: https://phabricator.services.mozilla.com/D162803
2022-12-01 15:43:19 +00:00
Kris Maglione d41332a044 Bug 1797219 - Bump the timeout limit of browser_onbeforeunload test again. r=nika
Splitting the test wasn't enough to prevent the frequent timeouts, and there really isn't a sensible way to split it any further.

Differential Revision: https://phabricator.services.mozilla.com/D163502
2022-11-30 21:12:10 +00:00
Marian-Vasile Laza bec56391bf Backed out 4 changesets (bug 1786048) for causing bc failures on browser_modal_resize.js. CLOSED TREE
Backed out changeset 318a2d2e6e39 (bug 1786048)
Backed out changeset 17a9990d6d19 (bug 1786048)
Backed out changeset 205f129c648a (bug 1786048)
Backed out changeset 0750c885a688 (bug 1786048)
2022-12-01 05:00:38 +02:00
Matthias Camenzind 1238151864 Bug 1786048 - Part 4: Remove cross process SizeShellTo. r=emilio
Because the parent process lacks information about the current shell
size, the child has to send both the current and the new shell size to
the parent. The parent then applies the delta to the window size. This
can produce different results for calls with the same arguments,
whenever a previous call did not have enough time to update the child
with its new size.

The implementation is replaced by applying the delta in the child.

Differential Revision: https://phabricator.services.mozilla.com/D160261
2022-11-30 19:37:17 +00:00
Matthias Camenzind 81ce314e5c Bug 1786048 - Part 3: Merge nsIEmbeddingSiteWindow into nsIBaseWindow. r=emilio
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().

This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.

Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".

GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.

nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().

The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).

Differential Revision: https://phabricator.services.mozilla.com/D160260
2022-11-30 19:37:16 +00:00
Matthias Camenzind 08f5c2d5b0 Bug 1786048 - Part 2: Use layout device pixels for AppWindow primary content size. r=emilio
The getter used to return CSS pixels, while the setter expected layout
device pixels. The nsIDocShellTreeOwner documentation used to suggest that
CSS pixels are used for getters and setters of the primary content and
the root shell size. Only the getter for the primary content size
happend to match that documentation.

Differential Revision: https://phabricator.services.mozilla.com/D161944
2022-11-30 19:37:16 +00:00
Marian-Vasile Laza 7492025127 Backed out 7 changesets (bug 1793463) for causing bustages on nsIOService.cpp. CLOSED TREE
Backed out changeset 47c3acb30de2 (bug 1793463)
Backed out changeset 71afe900eb17 (bug 1793463)
Backed out changeset d168599a269e (bug 1793463)
Backed out changeset d0f18d300818 (bug 1793463)
Backed out changeset a116e6f089f2 (bug 1793463)
Backed out changeset eba1123c8b56 (bug 1793463)
Backed out changeset 68a3eb8a3057 (bug 1793463)
2022-12-01 02:30:02 +02:00
Nika Layzell 90f7562d95 Bug 1793463 - Part 4: Generate static components entries for protocols, r=necko-reviewers,xpcom-reviewers,valentin,kmag
This adds a new set of options to static components.conf files to allow
specifying the protocol flags and default ports of a protocol handler, and
generates a separate table just for this purpose.

This will be used in the next part as part of replacing the existing protocol
handler lookup infrastructure.

Differential Revision: https://phabricator.services.mozilla.com/D162803
2022-11-30 18:13:42 +00:00
Olli Pettay c142ec355c Bug 1798780, ensure we don't evict the current frameloader, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D163391
2022-11-30 15:38:00 +00:00
Nika Layzell 39cfe43333 Bug 1538028 - Part 4: Pass TriggeringRemoteType through the frontend, r=Gijs,emilio
Propagate the ability to pass triggeringRemoteType through the desktop frontend
in various places, such that it is set when using the context menu or content
click handler.

Differential Revision: https://phabricator.services.mozilla.com/D161834
2022-11-29 20:41:46 +00:00
Nika Layzell 34e62a0d9c Bug 1538028 - Part 2: Track TriggeringRemoteType through nsDocShellLoadState and LoadInfo, r=smaug,ckerschb,necko-reviewers,valentin
This is done using slightly different mechanisms for each of LoadInfo and
nsDocShellLoadState, and will be used in the next part to validate document
loads based on the RemoteType responsible for the load.

For subresource loads, the TriggeringRemoteType is fairly straightforward - it
is the process which created the channel. We can handle this by getting the
current remote type when creating the channel, and then using the remote type
of the sending process when receiving the LoadInfo over IPC to either replace
the triggering remote type, or validate it.

For document loads, the situation is a bit more complex, as there are at least
3 (potentially-)different processes responsible for different parts of the
navigation:

 1. The "Triggering Process" is the process which provided the URI to load.
    This is also the process which provides the Triggering Principal. This is
    the process being tracked in this patch.

 2. The "Loading Process" is the process which actually creates the channel and
    starts the load. This may be the same as the triggering process, or may be
    a different process starting the navigation on behalf of the triggering
    process. In general this is the process hosting the current docshell,
    though it may be the parent process in the case of parent-initiated loads.

 3. The "Final Process" is the process which receives the response and renders
    the final document. This isn't known at channel creation time, and is
    determined by the result principal and process isolation policy.

This change uses a serializer and special field on nsDocShellLoadState to track
the "Triggering Process" for the load, even as the load state is serialized
between processes by tracking which loads were sent into which content
processes, and matching them up when the parent process sees them again. The
information is then copied into the LoadInfo before configuring the real
channel, so it can be used for security checks.

The "Triggering Process" is overridden to be the parent process for history
loads, as history loads are often started in processes which wouldn't normally
be able to navigate to those pages. This is OK thanks to the changes in part 1
which validate history loads against the real session history when SHIP is
enabled.

Differential Revision: https://phabricator.services.mozilla.com/D161198
2022-11-29 20:41:45 +00:00
Nika Layzell 03335b6d32 Bug 1538028 - Part 1: Validate SHIP history loads in DocumentLoadListener, r=smaug,necko-reviewers,valentin
With SHIP, we have a copy of the actual SessionHistoryEntry which is
responsible for a history load locally within the parent process. Using this,
we can validate any session history loads coming from the content process to
ensure that they correspond to actual outstanding history loads.

We can't do this for non-SHIP loads, as session history exists only within the
content process.

Differential Revision: https://phabricator.services.mozilla.com/D161197
2022-11-29 20:41:44 +00:00
Olli Pettay e9dd1d0c7b Bug 1803152, destroy nsFrameLoader asynchronously when destroyed from SessionHistoryEntry's/SHEntrySharedParentState's destructor. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D163344
2022-11-29 18:01:14 +00:00
Nika Layzell 3c3be46ec8 Bug 1798986 - Track UnstrippedURI in SessionHistory, r=smaug,timhuang
Previously, we tracked UnstrippedURI on the nsDocShellLoadState and LoadInfo,
and manually filled it in to match the previous load when doing a
LOAD_CMD_RELOAD in nsDocShell. It is more consistent with other load types to
instead store the information in the load state, allowing it to be handled
consistently for reloads and other history operations.

Unfortunately, this patch has some extra complexity right now, as it needs to
support both SHIP and non-SHIP session history. This should disappear in the
future when we switch to using exclusively SHIP.

Differential Revision: https://phabricator.services.mozilla.com/D161196
2022-11-25 22:09:46 +00:00
Greg Stoll 5265544a3f Bug 1793834 - part 1/12: adding a mostly-empty about:windows-messages page r=Gijs,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D161148
2022-11-22 03:44:51 +00:00
Cristian Tuns fc0780ef1b Backed out 10 changesets (bug 1793834, bug 1801724) for causing mochitest failures in browser_preferences_usage.js CLOSED TREE
Backed out changeset 89c9e4e1c3ad (bug 1801724)
Backed out changeset 9130ed00888e (bug 1793834)
Backed out changeset 34f582bdc341 (bug 1793834)
Backed out changeset c34df1dc8ff8 (bug 1793834)
Backed out changeset 2ae1429c886a (bug 1793834)
Backed out changeset a49eff0693ce (bug 1793834)
Backed out changeset 034466342a3b (bug 1793834)
Backed out changeset 2d19fa85af4e (bug 1793834)
Backed out changeset d16ff7dbd155 (bug 1793834)
Backed out changeset a39300a8ddff (bug 1793834)
2022-11-21 17:30:12 -05:00
Greg Stoll 0e9cbaa4d2 Bug 1793834 - part 1/12: adding a mostly-empty about:windows-messages page r=Gijs,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D161148
2022-11-21 19:15:53 +00:00
Mark Banner 7e3d560461 Bug 1791974 - Use setAsDefault* parameters where appropriate for consumers of SearchTestUtils.installSearchExtension. r=mcheang
Differential Revision: https://phabricator.services.mozilla.com/D161045
2022-11-18 14:30:27 +00:00
Mark Banner 7dbd48b340 Bug 1791974 - Add set as default (private) search engine options to SearchTestUtils.promiseNewSearchEngine. r=mcheang
Differential Revision: https://phabricator.services.mozilla.com/D161043
2022-11-18 14:30:26 +00:00
Mark Banner a9ec0b8434 Bug 1799314 - Convert consumers of testing modules to import ES modules direct (uriloader/ dom/ docshell/). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161909
2022-11-17 12:00:28 +00:00
Cristian Tuns a01e4b7166 Backed out changeset 5a6645284357 (bug 1798986) for causing xpcshell failures 2022-11-16 16:10:04 -05:00
Nika Layzell fb1cb73fa2 Bug 1798986 - Track UnstrippedURI in SessionHistory, r=smaug,timhuang
Previously, we tracked UnstrippedURI on the nsDocShellLoadState and LoadInfo,
and manually filled it in to match the previous load when doing a
LOAD_CMD_RELOAD in nsDocShell. It is more consistent with other load types to
instead store the information in the load state, allowing it to be handled
consistently for reloads and other history operations.

Unfortunately, this patch has some extra complexity right now, as it needs to
support both SHIP and non-SHIP session history. This should disappear in the
future when we switch to using exclusively SHIP.

Differential Revision: https://phabricator.services.mozilla.com/D161196
2022-11-16 18:25:21 +00:00
Csoregi Natalia 1107d2eb9a Backed out changeset 2c479e5f52df (bug 1798986) for causing failures on browser_urlQueryStringStripping_telemetry.js. CLOSED TREE 2022-11-14 20:51:27 +02:00
Nika Layzell 6ee60888da Bug 1798986 - Track UnstrippedURI in SessionHistory, r=smaug,timhuang
Previously, we tracked UnstrippedURI on the nsDocShellLoadState and LoadInfo,
and manually filled it in to match the previous load when doing a
LOAD_CMD_RELOAD in nsDocShell. It is more consistent with other load types to
instead store the information in the load state, allowing it to be handled
consistently for reloads and other history operations.

Unfortunately, this patch has some extra complexity right now, as it needs to
support both SHIP and non-SHIP session history. This should disappear in the
future when we switch to using exclusively SHIP.

Differential Revision: https://phabricator.services.mozilla.com/D161196
2022-11-14 17:10:29 +00:00
Emilio Cobos Álvarez 25e4585462 Bug 1798836 - Improve sizing of the profile manager (again). r=Gijs,webidl,smaug
Instead of imposing the min-width as a max-size, make prefwidth act as
it should (as suggesting a preferred width, but with min-content as a
minimum).

This can be reproduced locally by applying a patch like:

```
diff --git a/toolkit/profile/content/profileSelection.xhtml b/toolkit/profile/content/profileSelection.xhtml
index 3dd1c864f79f1..7e8cbf8ce8c3e 100644
--- a/toolkit/profile/content/profileSelection.xhtml
+++ b/toolkit/profile/content/profileSelection.xhtml
@@ -17,7 +17,7 @@
   data-l10n-id="profile-selection-window"
   orient="vertical"
   prefwidth="min-width"
-  style="min-width: 30em;"
+  style="min-width: 10em;"
   onload="startup();">
 <dialog id="profileWindow"
   buttons="accept,cancel"
```

Before patch, stuff overflowed. This patch guarantees that everything is
on-screen.

Differential Revision: https://phabricator.services.mozilla.com/D161229
2022-11-05 19:24:31 +00:00
Cosmin Sabou d6ab6f4a98 Backed out changeset f456713ddff8 (bug 1798836) for causing build bustages on Window.webidl. CLOSED TREE 2022-11-05 15:15:53 +02:00
Emilio Cobos Álvarez fe3a1ffba6 Bug 1798836 - Improve sizing of the profile manager (again). r=Gijs,webidl,smaug
Instead of imposing the min-width as a max-size, make prefwidth act as
it should (as suggesting a preferred width, but with min-content as a
minimum).

This can be reproduced locally by applying a patch like:

```
diff --git a/toolkit/profile/content/profileSelection.xhtml b/toolkit/profile/content/profileSelection.xhtml
index 3dd1c864f79f1..7e8cbf8ce8c3e 100644
--- a/toolkit/profile/content/profileSelection.xhtml
+++ b/toolkit/profile/content/profileSelection.xhtml
@@ -17,7 +17,7 @@
   data-l10n-id="profile-selection-window"
   orient="vertical"
   prefwidth="min-width"
-  style="min-width: 30em;"
+  style="min-width: 10em;"
   onload="startup();">
 <dialog id="profileWindow"
   buttons="accept,cancel"
```

Before patch, stuff overflowed. This patch guarantees that everything is
on-screen.

Differential Revision: https://phabricator.services.mozilla.com/D161229
2022-11-05 13:02:31 +00:00
Olli Pettay 549492fdf4 Bug 1787315, starting a new load after reload() should take precedence, r=peterv,ochameau
The devtools test reloads a page twice in a row and depending on timing it isn't guaranteed that it leads to two requests anymore.
That test seems to fail on debug builds every now and then. The test itself expects 1 or more requests, but then assumes later that there
are at least 2.

Differential Revision: https://phabricator.services.mozilla.com/D160573
2022-11-04 10:29:54 +00:00
Neil Deakin cc3da6c652 Bug 1676492, when new tab page is configured to show a blank page, it should not be added to session history, r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D156303
2022-11-01 20:43:02 +00:00
Daniel Holbert 16170f25a6 Bug 1797840: Replace stray tab characters with spaces in IDL files throughout the tree. r=mccr8,necko-reviewers,credential-management-reviewers,smaug,sgalich,valentin
DONTBUILD because this is just whitespace cleanup.

I found the files to fix up here using this command:
    grep -r '   ' * 2>/dev/null | grep -v "other-licenses" | grep "idl:"

I replaced the tab characters with however many spaces seemed consistent with
the indentation in the surrounding code (and did some minor space-indentation
cleanup in contextual lines to preserve alignment, in a few cases).

Differential Revision: https://phabricator.services.mozilla.com/D160577
2022-10-28 18:08:17 +00:00
Joel Maher 7d57e8ce58 Bug 1797751 - carry over skip-if conditions from win10 to win11. r=bxbrenden,necko-reviewers,settings-reviewers,credential-management-reviewers,valentin,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D160529
2022-10-28 00:00:40 +00:00
Mark Banner 9613c19f16 Bug 1795880 - Add an ESLint rule to enforce using static imports where possible. r=arai,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D160131
2022-10-26 09:37:46 +00:00
Mark Banner 7f41141c4b Bug 1796143 - Update *.sjs files for imports that have already been transitioned to ES module files. r=arai,extension-reviewers,credential-management-reviewers,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D159709
2022-10-25 07:10:55 +00:00
Kris Maglione 1a5132c440 Bug 1775925: Split up browser_onbeforeunload.js somewhat. r=nika
This splits the parent-triggered and child-triggered unload attempts into
separate tests. I could also split the tests for each subframe level into
separate tests, but let's see how this does for now.

Differential Revision: https://phabricator.services.mozilla.com/D159228
2022-10-24 22:47:51 +00:00
Simon Friedberger 3c5991df13 Bug 1549057 - Rename (Gg)etCSP to (Gg)etCsp - r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D159268
2022-10-24 20:38:11 +00:00
Iulian Moraru 7f78673181 Backed out 3 changesets (bug 1796143) for causing mochitest failures on test_double_submit.html. CLOSED TREE
Backed out changeset d02d2c2ad921 (bug 1796143)
Backed out changeset 680008b18ad1 (bug 1796143)
Backed out changeset 61a9ae6c1a8f (bug 1796143)
2022-10-20 22:59:56 +03:00
Mark Banner 41fe0ea28c Bug 1796143 - Update *.sjs files for imports that have already been transitioned to ES module files. r=arai,extension-reviewers,credential-management-reviewers,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D159709
2022-10-20 18:13:11 +00:00
Paul Adenot ca7f20936f Bug 1347955 - Move the logging facilities from about:networking to a new page, about:logging. r=valentin,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D159606
2022-10-20 12:10:19 +00:00
James Teow b1eefaa0d6 Bug 1792635 - Prevent DNS not found page from suggesting the same URI - r=mak
I modified the boolean associated with fixupCreateAlternateURI to only
be true if the host which contains the prefix and suffix differs from
the fixed up version. This will allow the boolean to be false in cases
where the fixup doesn't change the host. Then for the DNS error page,
there is a check as to whether the host or protocol was changed.

Differential Revision: https://phabricator.services.mozilla.com/D159175
2022-10-18 13:24:51 +00:00
Mark Banner 2ffde1e92f Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Mark Banner 3a86c6fa41 Bug 1445134 - Migrate docshell xpcshell-tests away from using enterprise policies. r=mcheang
Differential Revision: https://phabricator.services.mozilla.com/D159056
2022-10-18 07:21:46 +00:00
Emilio Cobos Álvarez d798a8796a Bug 1793829 - Don't steal focus for navigations without user activation. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D158758
2022-10-17 20:04:14 +00:00
Butkovits Atila 86c65085e5 Backed out 6 changesets (bug 1445134) for causing xpcshell failures. CLOSED TREE
Backed out changeset 59f902b761b5 (bug 1445134)
Backed out changeset 2ec41e23c593 (bug 1445134)
Backed out changeset b0dc583fff47 (bug 1445134)
Backed out changeset a09ccaf19501 (bug 1445134)
Backed out changeset 2d736481d13d (bug 1445134)
Backed out changeset 57ec56757493 (bug 1445134)
2022-10-17 17:54:39 +03:00
Olli Pettay b989d9a4ca Bug 1769189, ensure history state is updated if beforeunload listener calls replaceState, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D152170
2022-10-17 12:56:37 +00:00
Mark Banner eb7d918413 Bug 1445134 - Migrate docshell xpcshell-tests away from using enterprise policies. r=mcheang
Differential Revision: https://phabricator.services.mozilla.com/D159056
2022-10-17 12:56:06 +00:00
Eemeli Aro 45a8fe66c1 Bug 1734217 - Merge all about:neterror front-end handling under toolkit. r=mkmelin,smaug,nalexander,flod,Gijs
Following a suggestion from :mkmelin, this seems like an optimal solution: the overriding/duplication in m-c is removed, and all users get a more powerful default choice that they're still able to override with their own, should they so wish.

For clarity and to match other `about:` pages, the shared code is placed under `toolkit/content/`, and all content under `docshell/resources/` is removed.

Differential Revision: https://phabricator.services.mozilla.com/D156478
2022-10-07 18:40:27 +00:00
Mike Conley ba5ca544c2 Bug 1793652 - Convert docshell/ JSMs to ESMs. r=nika,arai
Differential Revision: https://phabricator.services.mozilla.com/D158599
2022-10-05 13:55:10 +00:00
Emilio Cobos Álvarez ab8ce397d0 Bug 1792337 - Add a more convenient API to size a window constrained to a default size. r=bytesized,extension-reviewers,robwu,TYLin
Differential Revision: https://phabricator.services.mozilla.com/D158235
2022-09-30 00:45:36 +00:00
Mark Banner 8d1ebcb9d6 Bug 1792365 - Convert toolkit/modules consumers to use ES module imports directly. r=webdriver-reviewers,perftest-reviewers,geckoview-reviewers,extension-reviewers,preferences-reviewers,desktop-theme-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,robwu,Gijs,sgalich,bytesized,AlexandruIonescu,dao,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D158094
2022-09-29 06:52:34 +00:00
Mark Banner c0b3131dd9 Bug 1634555 - Send event telemetry for search default engine changes. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D157471
2022-09-28 09:40:36 +00:00
Pier Angelo Vendrame aa21b01cfa Bug 1768907 - Part 1: Make browser.privatebrowsing.autostart a static pref. r=handyman,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D157843
2022-09-22 00:26:17 +00:00
Nika Layzell 613c259d7c Bug 1694993 - Part 6: Preserve precursor principal through LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL, r=ckerschb,smaug
If we don't preserve the precursor principal in this case, we'll end up
doing an unnecessary process switch in some cases, which lead to a
test failure.

This patch also cleans up some logic around the first party origin
attribute with null principals, as the logic was only used in one place
and generally added some unnecessary complexity to NullPrincipal
itself.

Differential Revision: https://phabricator.services.mozilla.com/D155277
2022-09-20 23:29:08 +00:00
Nika Layzell cfdd2c8fad Bug 1694993 - Part 5: Add a simple test for javascript URIs with noopener, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D154567
2022-09-20 23:29:08 +00:00
Sebastian Hengst 558810a337 Bug 1791519 - use really non-resolving domain for bug529119 tests. r=MasterWayZ DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D157744
2022-09-20 19:32:03 +00:00
Andreea Pavel 0cf09ac249 Bug 1791519 - temporarily disable test_bug529119-1.html to reduce in tree noise r=aryx DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D157730
2022-09-20 14:51:22 +00:00
Dana Keeler 923d7b2029 Bug 1790451 - make nsIChannel.securityInfo concrete as nsITransportSecurityInfo r=kershaw,necko-reviewers,valentin,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D157136
2022-09-20 03:58:49 +00:00
Christian Holler 0ecbfcaa6a Bug 1790555 - Add missing fuzzing instrumentation. r=truber
Differential Revision: https://phabricator.services.mozilla.com/D157188
2022-09-14 15:52:20 +00:00
Nika Layzell a696fb5ae6 Bug 1705978 - Part 1: Track whether BrowsingContext is embedded in a content document, r=smaug
This will be used by APZ in a follow-up patch.

Differential Revision: https://phabricator.services.mozilla.com/D156721
2022-09-12 06:20:38 +00:00
Peter Van der Beken f30f94b8ec Bug 1789812 - ContentParent::RecvHistoryGo should always resolve, even if not navigating. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D156812
2022-09-08 13:41:09 +00:00
Kershaw Chang d164608d66 Bug 1760580 - P2: Provide a reason when request is cancelled with NS_BINDING_ABORTED, r=necko-reviewers,media-playback-reviewers,valentin,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D156071
2022-09-08 09:11:19 +00:00
Kershaw Chang cc6c147f88 Bug 1760580 - P1: Make nsIRequest support to store canceled reason, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D156070
2022-09-08 09:11:18 +00:00
Norisz Fay 9eee1bc1e3 Backed out changeset 426e74dbe01e (bug 1731210) for causing lint failure on browser_beforeunload_permit_http.js CLOSED TREE 2022-09-08 11:59:30 +03:00
lyavor 21fc88c527 Bug 1731210 - pdf.js modal for unsaved data on a pdf page appears twice in private window r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D153612
2022-09-08 08:32:48 +00:00
Olli Pettay 93acdfad59 Bug 1777574, automate CC zone handling, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D155084
2022-09-07 11:22:51 +00:00
Emilio Cobos Álvarez 52927ddd54 Bug 1787127 - Use used color-scheme (not preferred) to determine canvas background adjustments. r=tnikkel
As per spec, see https://drafts.csswg.org/css-color-adjust/#color-scheme-effect:

> In order to preserve expected color contrasts, in the case of embedded
> documents typically rendered over a transparent canvas (such as
> provided via an HTML iframe element), if the used color scheme of the
> element and the used color scheme of the embedded document’s root
> element do not match, then the UA must use an opaque canvas of the
> Canvas color appropriate to the embedded document’s used color scheme
> instead of a transparent canvas.

After bug 1782596 we were using the preferred rather than used
color-scheme, which is the right thing to do for prefers-color-scheme,
but not for the canvas background.

Differential Revision: https://phabricator.services.mozilla.com/D155831
2022-09-04 23:16:32 +00:00
Emilio Cobos Álvarez f32093456d Bug 1786513 - Make SimpleResizeReflow not flush by default. r=jfkthame,layout-reviewers
Only GeckoMVMContext really needs the flush, to measure scrolled height
afterwards. Do that explicitly.

This shouldn't change behavior, for the most part; there was a preload
test that relied on the flush when changing DPI to start a run really
clean, but other than that this looks green on try.

Should at best be neutral (just code clean-up), or be a performance
improvement.

In a follow-up, we can possibly remove the DelayedResize code from the
view manager, though I need to think how to possibly coalesce the MVM
reflows, so let's not do that yet.

Differential Revision: https://phabricator.services.mozilla.com/D155385
2022-09-01 10:54:24 +00:00
Sean Feng 712dda078c Bug 1750034 - Remove lazyload telemetry related code r=emilio
We have decided to use 600px in all directions, there's no need
to keep the telemetry stuff around.

Differential Revision: https://phabricator.services.mozilla.com/D155879
2022-08-30 16:00:11 +00:00
Cristian Tuns 24652e5425 Backed out changeset e29b0fbf77f1 (bug 1786513) for causing mochitest failures on /browser_unified_extensions.js CLOSED TREE 2022-08-26 11:11:46 -04:00
Mark Banner b4cf869f32 Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for docshell. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D155168
2022-08-26 13:39:35 +00:00
Emilio Cobos Álvarez 7c34c8de9a Bug 1786513 - Make SimpleResizeReflow not flush by default. r=jfkthame,layout-reviewers
Only GeckoMVMContext really needs the flush, to measure scrolled height
afterwards. Do that explicitly.

This shouldn't change behavior, for the most part; there was a preload
test that relied on the flush when changing DPI to start a run really
clean, but other than that this looks green on try.

Should at best be neutral (just code clean-up), or be a performance
improvement.

In a follow-up, we can possibly remove the DelayedResize code from the
view manager, though I need to think how to possibly coalesce the MVM
reflows, so let's not do that yet.

Differential Revision: https://phabricator.services.mozilla.com/D155385
2022-08-26 12:58:12 +00:00
Kagami Sascha Rosylight 102bd338be Bug 1695435 - Part 2: Add more words to the chrome script heuristic in use-isInstance r=preferences-reviewers,Gijs,webdriver-reviewers,whimboo,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D110932
2022-08-24 22:47:42 +00:00
Edgar Chen 2a142eba28 Bug 1782211 - Init feature policy; r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D154161
2022-08-24 20:56:16 +00:00
Emilio Cobos Álvarez c20ec755c9 Bug 1782751 - Make desktop viewport mode a synced BrowsingContext field. r=twisniewski
So that it's preserved properly across replacements (bug 1781936).

Differential Revision: https://phabricator.services.mozilla.com/D155274
2022-08-22 22:12:07 +00:00
Narcis Beleuzu 94d309143f Backed out 5 changesets (bug 1694993) for bc failure on browser_cross_process_csp_inheritance.js
Backed out changeset 1d21d911b3e7 (bug 1694993)
Backed out changeset 3b412d5fbdcf (bug 1694993)
Backed out changeset c9585ce37fe5 (bug 1694993)
Backed out changeset 05d7cbbfe9e2 (bug 1694993)
Backed out changeset 3821545ab46b (bug 1694993)
2022-08-22 20:32:02 +03:00
Nika Layzell 373e6ff98e Bug 1694993 - Part 5: Add a simple test for javascript URIs with noopener, r=smaug
Depends on D154566

Differential Revision: https://phabricator.services.mozilla.com/D154567
2022-08-22 15:35:28 +00:00
Neil Deakin 0de8be3ac6 Bug 1759604, check CanDropLink during the drop event as sites can cancel the dragover event causing the drop event to still fire, r=arai
Differential Revision: https://phabricator.services.mozilla.com/D154896
2022-08-19 22:15:50 +00:00
Sean Feng 011405bf32 Bug 1785227 - Consider all browsing context as non-synthetic when we don't want to hide image document for <object> and <embed> r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D154997
2022-08-18 20:04:59 +00:00
Andreas Farre 4b493b6a30 Bug 1595491 - Part 1: Make <embed> and <object> behave more like <iframe>. r=smaug,emilio
By making image loading in <embed> and <object> behave more like when
an <iframe> loads an image, we can make sure that the synthetic
document generated is process switched if the image is cross
origin. This is done by making image loading in nsObjectLoadingContent
follow the document loading path.

We also make sure that we pass the image size back to the embedder
element to not get stuck with the intrinsic size.

To avoid named targeting being able to target these synthetic
documents, as well as showing up in `Window.frames` and being counted
in `Window.length`, we keep a filtered list of non-synthetic browsing
contexts for that use-case.

This feature is controlled by two prefs:

* browser.opaqueResponseBlocking.syntheticBrowsingContext

  This triggers the creation of synthetic documents for images loaded
  in <object> or embed.

* browser.opaqueResponseBlocking.syntheticBrowsingContext.filter

  This turns on the filtering of synthetic browsing contexts in named
  targeting, `Window.length` and `Window.frames`.

Differential Revision: https://phabricator.services.mozilla.com/D148117
2022-08-16 16:42:58 +00:00
Olli Pettay 4aea9c65b6 Bug 1784387 - Crash in [@ nsDocShell::Reload] in ContentChild::RecvReload, r=mccr8
No test, since the patch is based on the crash reports. Creating a test which relies on some race conditions through IPC is hard.

Differential Revision: https://phabricator.services.mozilla.com/D154634
2022-08-15 15:50:27 +00:00