Commit Graph

777667 Commits

Author SHA1 Message Date
Nicolas Chevobbe
9cf2c0002f Bug 1741804 - [devtools] Fix getPropNamesFromObject + storage performance issues. r=jdescottes.
The function, which is only used from previewers.js to retrieve
the first then interesting properties of an object, has a special
case for (local|session)Storage so we loop through their entries
and not their properties.
We're using storage#key to achieve this, but the problem is that
the function is quite slow, and if the storage object has a lot
of entries, it can end up freezing Firefox.
In order to avoid such freeze, for storage object, we're not returning
an array but an iterable object, which most of the time will only be
called 10 times and prevent any perf issue.

Differential Revision: https://phabricator.services.mozilla.com/D131913
2021-11-25 15:03:19 +00:00
Claudia
fad8547640 Bug 1731770 - [devtools] Persit expanded nodes state in the Response Panel. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D128190
2021-11-25 14:56:48 +00:00
Emilio Cobos Álvarez
6a990fe849 Bug 1718846 - Draw our own titlebar buttons when using lightweight themes. r=dao
Co-authored-by: Bernard Igiri <bigiri@mozilla.com>

Differential Revision: https://phabricator.services.mozilla.com/D129400
2021-11-25 14:56:15 +00:00
Ben Hearsum
65d4d3399a Bug 1737108: Part 2: Differentiate MSIX packages intended for the Microsoft Store and others in Telemetry. r=mhowell,chutten
I considered dropping `hasWinPackageId` because this new field is nearly a richer form of the same thing, but keeping it will allow us to distinguish the small edge case of an MSIX package _not_ produced by Mozilla. Were we to remove `hasWinPackageId`, those builds would not longer be distinguishable as MSIX packages.

Differential Revision: https://phabricator.services.mozilla.com/D131521
2021-11-25 14:30:21 +00:00
Ben Hearsum
ad498c6aa5 Bug 1737108: Part 1: Expose MSIX PackageFamilyName in nsSystemInfo. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D131520
2021-11-25 14:30:21 +00:00
Mark Banner
40d51d328c Bug 1741868 - Add a scorer for scoring snapshots based on a relevancy score. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D131515
2021-11-25 14:24:48 +00:00
Dave Townsend
21104fb09f Bug 1742963: Disable the page thumbs service in tests. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D132142
2021-11-25 14:24:48 +00:00
Gregory Mierzwinski
34cc45b193 Bug 1734466 - Increase testing resolution to 1280x1024. r=perftest-reviewers,AlexandruIonescu
This patch increases the viewport size/resolution to 1280x1024 in all of our desktop browsertime tests.

Differential Revision: https://phabricator.services.mozilla.com/D131607
2021-11-25 14:23:55 +00:00
Andreas Pehrson
2bf895a8ab Bug 1576335 - Fix DeviceInfoImpl::_apiLock leaks by cherry-pick. r=padenot
This is a cherry-pick of upstream libwebrtc's
https://webrtc.googlesource.com/src/+/5b5de21accfd29e21cba2d6f38e3087e1f731be6

This gets rid of the path in DeviceInfoImpl::GetBestMatchedCapability that can
leave the _apiLock exclusively locked forever.

Differential Revision: https://phabricator.services.mozilla.com/D132139
2021-11-25 14:02:28 +00:00
Tim Huang
12a8b3dd9d Bug 1731990 - Part 5: Add tests for partitioned third-party service worker. r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D131555
2021-11-25 13:11:36 +00:00
Tim Huang
8f9ee3f20e Bug 1731990 - Part 4: Populate the partitionKey from the prinicpal of the service worker in ServiceWorkerScriptCache. r=asuth
This patch changes ServiceWorkerScriptCache to use the principal of the
service worker to populate the partitionKey to the cookieJarSettings.
The service workers are using foreign partitioned principal. This means
it will contain a correct partitionKey if it's in a third-party context.
So we can use it to populate the partitionKey. In the first-party
context, we can use the script uri to get the partionKey, which is the
original approach.

Differential Revision: https://phabricator.services.mozilla.com/D128734
2021-11-25 13:11:35 +00:00
Tim Huang
7ff4cf104f Bug 1731990 - Part 3: Use the partitionKey from the foreign partitioned principal in ServiceWorkerPrivate. r=pbz,dom-storage-reviewers,edenchuang
We used to use the principal URL for the partitionKey in
ServiceWorkerPrivateImpl. This is correct if the ServiceWorker only
works in first-party context. But, it isn't correct in third-party
context.

To fix that, we can directly use the foreign paritioned principal from
the ServiceWorkerPrivate to get the partitionKey in third-party context.
For the first-party context, we can still use the original approach to
get the partitionKey.

Differential Revision: https://phabricator.services.mozilla.com/D128733
2021-11-25 13:11:35 +00:00
Tim Huang
bdeaf4cf23 Bug 1731990 - Part 2: Using foreignPartitionedPrincipal in ServiceWorkerContainer. r=asuth
The patch modifies ServiceWorkerContainer::GetScopeForUrl() to use the
foreign partitioned principal.

Differential Revision: https://phabricator.services.mozilla.com/D128732
2021-11-25 13:11:34 +00:00
Tim Huang
fdc08933ea Bug 1731990 - Part 1: Using ForeignPartitionedPrincipal in ServiceWorkerInterceptController. r=asuth
This patch changes to use the foreign partitioned principal when check
if a channel needs to be intercepted by a certain service worker.

Differential Revision: https://phabricator.services.mozilla.com/D128731
2021-11-25 13:11:34 +00:00
Tim Huang
6f33bfde14 Bug 1736401 - Compute IsThirdPartyToTopWindow in StoragePrincipalHelper::GetPrincipal(). r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D128783
2021-11-25 13:11:33 +00:00
Tim Huang
713d89b9ec Bug 1731982 - Part 11: Set the IsThirdPartyContextToTopWindow flag to the main worker script loading channel. r=asuth
When loading the main worker script, we will need to get the clientInfo
for the loading channel. However, the loading channel is created in
content processes and the `IsThirdPartyContextToTopWindow` won't be set
in this case. So, we will get an incorrect clientInfo with a wrong
foreign patitioned principal.

To resolve this, we have to set the flag in the content processes so
that we can get a correct clientInfo. The flag comes from the
workerPrivate which reflects the fact if the worker was created in a
third-party context. And the loading channel should have the same flag
as the document which creates the worker.

Differential Revision: https://phabricator.services.mozilla.com/D129060
2021-11-25 13:11:33 +00:00
Tim Huang
e9fcc1c87e Bug 1731982 - Part 10: Populate IsThirdPartyContextToTopWindow to WorkerPrivate. r=asuth
To know if a worker is created under a third-party context, we need to
populate the `IsThirdPartyContextToTopWindow` to WorkerPrivate. This is
needed to get the correct foreign partitioned prinipal when loading
worker script in the content processes.

Differential Revision: https://phabricator.services.mozilla.com/D129059
2021-11-25 13:11:33 +00:00
Tim Huang
6d96956b62 Bug 1731982 - Part 9: Add a test to ensure that the dedicated/shared worker can be intercepted by a service worker. r=asuth
The test verifies that if a dedicated/shared worker can be intercepted by a
service worker.

Differential Revision: https://phabricator.services.mozilla.com/D129058
2021-11-25 13:11:32 +00:00
Tim Huang
42cde75cf8 Bug 1731982 - Part 8: Modify the test browser_partitionedServiceWorkers.js. r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D127842
2021-11-25 13:11:32 +00:00
Tim Huang
e05ade8128 Bug 1731982 - Part 7: Ignoring the partitionKey when verify loadingPrincipal with clientInfo. r=asuth,necko-reviewers
Given that we use the partitioned Principal in the third-party context
and the loading principal won't have it, we should ignore the
partitionKey when doing the verfication.

Differential Revision: https://phabricator.services.mozilla.com/D127841
2021-11-25 13:11:32 +00:00
Tim Huang
45bfad05fe Bug 1731982 - Part 6: Use the client's principal to verify client in localStorage. r=asuth
Currently, we use the script principal to verify the client to prevent
the principal forgery. After we moving to use foreign partitioned
principal for the Client, this no longer works. Instead, we can directly
use the client's principal to verify client.

Also, the patch rename StoragePrincipalHelper::VerifyValidStoragePrincipalInfoForPrincipalInfo() to
StoragePrincipalHelper::VerifyValidPartitionedPrincipalInfoForPrincipalInfo()
and fix a problem in the function that it should ignore the PartitionKey
instead of the FirstPartyDomain.

Differential Revision: https://phabricator.services.mozilla.com/D127840
2021-11-25 13:11:31 +00:00
Tim Huang
e65d0db962 Bug 1731982 - Part 5: Using foreign partitioned principal when creating clientSource in ServiceWorkerManager. r=asuth
Currently, the ServiceWorkerManager creates a content prinipcal based
on the regular originAttributes when dispatch the fetch event. This
patch changes to use the foreign partitioned originAttributs.

Note that we don't add tests for this because the change doesn't change
the behavior. And we don't enable partitioned third-party Service Worker.
So, the existing test cases is enough for this.

Differential Revision: https://phabricator.services.mozilla.com/D127632
2021-11-25 13:11:31 +00:00
Tim Huang
2997f5f4a1 Bug 1731982 - Part 4: Using StoragePrincipalHelper::GetPrincipal() in ClientChannelHelper. r=asuth
To support foreign partitioned prinicpal for Client, we use
StoragePrincipalHelper::GetPrincipal() to get the foreign partitioned
principal from the channel in the ClientChannelHelper. And use it to
create client.

Differential Revision: https://phabricator.services.mozilla.com/D127631
2021-11-25 13:11:31 +00:00
Tim Huang
4e521d6a11 Bug 1731982 - Part 3: Using foreign partitioned principal when creating clientSource in nsGlobalWindowInner. r=asuth
Currently, we use the node principal to create clientSource in
nsGloblaWindowInner. This patch change this to use foreign partitioned
principal.

Differential Revision: https://phabricator.services.mozilla.com/D127630
2021-11-25 13:11:30 +00:00
Tim Huang
5cdaa70075 Bug 1731982 - Part 2: Use partitioned principal for creating initial client source if needed in nsDocShell. r=asuth
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.

Differential Revision: https://phabricator.services.mozilla.com/D127629
2021-11-25 13:11:30 +00:00
Tim Huang
8ec7198e19 Bug 1731982 - Part 1: Implement StoragePrincipalHelper::ShouldUsePartitionPrincipalForServiceWorker(). r=dimi
We implement
StoragePrincipalHelper::ShouldUsePartitionPrincipalForServiceWorker() to
help with deciding the principal needed to be used when creating a
initial clientSource in docShell.

Differential Revision: https://phabricator.services.mozilla.com/D127628
2021-11-25 13:11:29 +00:00
Nicolas Chevobbe
3509ad57ad Bug 1605330 - [devtools] Enable context selector on Nightly. r=ochameau.
We take this opportunity to merge the browser toolbox and content toolbox preferences
into a single one.

Depends on D131600

Differential Revision: https://phabricator.services.mozilla.com/D131770
2021-11-25 13:05:39 +00:00
Nicolas Chevobbe
46e9e2731c Bug 1741808 - [devtools] Enable EFT on Nightly. r=bomsy.
Depends on D131884

Differential Revision: https://phabricator.services.mozilla.com/D131477
2021-11-25 13:05:39 +00:00
Nicolas Chevobbe
f4522de05f Bug 1742800 - [devtools] Fix custom inspector DAMP test with EFT. r=ochameau,perftest-reviewers,AlexandruIonescu.
Use nodeFront walkerFront instead of root one.

Differential Revision: https://phabricator.services.mozilla.com/D132027
2021-11-25 13:05:38 +00:00
Henrik Skupin
845726dde5 Bug 1742759 - [wdspec] Remove multiple statuses entries for mac opt jobs from meta files. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D132005
2021-11-25 12:57:14 +00:00
Robert Mader
999eacba80 Bug 1742862 - Bump required nvidia driver version for EGL to 470.82, r=gfx-reviewers,nical
`470.82` is the first version that supports `EGL_NV_robustness_video_memory_purge`
which is required so we don't run into bug 1731172. The first stable release of
the `495` series also supports that extension, previous beta versions don't need
to be considered.

Differential Revision: https://phabricator.services.mozilla.com/D132101
2021-11-25 12:25:11 +00:00
Tim Huang
1d247f883c Bug 1742598 - Part 2: Add a test to ensure we don't encode query parameter after query stripping. r=dimi
Depends on D131964

Differential Revision: https://phabricator.services.mozilla.com/D131965
2021-11-25 12:13:48 +00:00
Tim Huang
db88fe8435 Bug 1742598 - Part 1: Add an parameter to URLParams::Serialize() to indicate if the encoding is needed for the serialization result. r=smaug,necko-reviewers,dragana
The URL query stripping doesn't want the URLParams::Serialize() to
encode the result because it will encode the unstripped parameters. This
will change the unstripped parameters once stripping was happened.

Therefore, we introduce an parameter to URLParams::Serialize() to
disable encoding.

Differential Revision: https://phabricator.services.mozilla.com/D131964
2021-11-25 12:13:48 +00:00
sotaro
5477d7dc1d Bug 1742440 - Add debug capability to check window visibility state by overlay r=gfx-reviewers,nical
It is helpful if window visibility state could be checked by debug overlay.
For now, it works only on Windows with compositor.

Differential Revision: https://phabricator.services.mozilla.com/D131807
2021-11-25 11:33:46 +00:00
Christian Holler
6110156f18 Bug 1738278 - Add fuzzing snapshot API. r=truber,firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D129823
2021-11-25 11:20:43 +00:00
Emma Malysz
0d116a492d Bug 1649605 - Replace osfile.jsm usage in SessionWorker.jsm. r=Gijs
Add a mutex to prevent simultaneous I/O requests.

Co-authored-by: Mathew Hodson <mathew.hodson@gmail.com>

Differential Revision: https://phabricator.services.mozilla.com/D129367
2021-11-25 10:45:55 +00:00
Mathew Hodson
691b1a0c53 Bug 1741548 - Add ignoreAbsent option to IOUtils.getChildren method. r=barret
Remove an incorrect comment.

Differential Revision: https://phabricator.services.mozilla.com/D131323
2021-11-25 10:45:55 +00:00
Mark Banner
01fe642138 Bug 1742661 - Add documentation for search engine icon sizes. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D131809
2021-11-25 10:28:45 +00:00
Cosmin Sabou
25cf5ad843 Backed out changeset b7318976c3b9 (bug 1741995) causing assertion failures on htmlparser/nsExpatDriver.cpp. CLOSED TREE 2021-11-25 11:59:02 +02:00
Nicolas Chevobbe
7d7d367707 Bug 1742332 - Enable devtools no eft config. r=jdescottes,jmaher.
Since we're going to enable EFT on Nightly and let it bake there a bit to
get feedback, we might face a situation where we have to disable EFT.
Having these test variants will help us to not regress non-EFT cases so if
we ever have to rollback EFT, there wouldn't be extra work.

Depends on D131477

Differential Revision: https://phabricator.services.mozilla.com/D131600
2021-11-25 06:24:12 +00:00
Nicolas Chevobbe
459fde3136 Bug 1742541 - [devtools] Don't try to show PausedDebuggerOverlay if document isn't ready. r=ochameau.
At the moment, the overlay can't be displayed if the DOM isn't loaded,
and we were waiting for that state before trying to show the overlay.
But we can't move forward in the document loading process until we resume,
which mean we could end up in weird state with the overlay, where the
page wasn't paused anymore, but we'd display it.
In this patch, we simply bail out if the document isn't ready.

Differential Revision: https://phabricator.services.mozilla.com/D131884
2021-11-25 06:24:12 +00:00
Cosmin Sabou
f8f59c4e24 Backed out 2 changesets (bug 1742332, bug 1742541) for causing assertion failures on htmlparser/nsExpatDriver.cpp. CLOSED TREE
Backed out changeset 333fa37b4df2 (bug 1742332)
Backed out changeset 762649eb6709 (bug 1742541)
2021-11-25 11:26:14 +02:00
Shravan Narayan
361d7f84bb Bug 1742914 - Add explicit casts for u8 and u16 parameters to RLBox sandbox_invoke r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D132113
2021-11-25 05:17:33 +00:00
Cosmin Sabou
a543cd6cc8 Backed out changeset 524df7136a1f (bug 1742914) for causing assertion failures on htmlparser/nsExpatDriver.cpp. CLOSED TREE 2021-11-25 11:14:20 +02:00
Christoph Kerschbaumer
ca94879d3a Bug 1742785: Update more tests within dom/ and docshell/ to work with https-first enabled r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D132007
2021-11-25 08:19:22 +00:00
Markus Stange
e6f5ab87fd Bug 1685798 - Don't use //iu regular expressions in form autofill regex matching, in order to avoid a performance cliff. r=dimi
Instead, we try to get similar effects by calling toLowerCase() both on the
regex string and on the matched string.
This is probably not equivalent for non-English text. If we notice problems,
we can add more regexes. But as far as I know, this feature is currently
only enabled in the US and Canada.

In my testing, this change improves performance by 30x.

Before: https://share.firefox.dev/3kccIw8
After: https://share.firefox.dev/3EkZsNt

Differential Revision: https://phabricator.services.mozilla.com/D118231
2021-11-25 08:19:05 +00:00
Christoph Kerschbaumer
4e687e9b41 Bug 1742786: Update test devtools/.../browser_resources_document_events.js to work with https-first enabled r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D132008
2021-11-25 07:23:18 +00:00
Masayuki Nakano
71fc64caea Bug 1735745 - Make SelectionChangeEventDispatcher dispatch select event and selectchange event only when there may be corresponding event listeners r=smaug
`select` event on text controls now dispatched immediately before
`selectionchange`.  However, it needs to create `AsyncEventDispatcher` for
each.  This cost may not be expensive, but they are called really a lot even
if there is no corresponding event listener.

Therefore, this patch makes `nsPIDOMWindow` and `EventListenerManager` have
`MayHave*EventListeners` flag separately for each, and makes
`SelectionChangeEventDispatcher` does not try to do create
`AsyncEventDispatcher` when there is no corresponding event listener.

Differential Revision: https://phabricator.services.mozilla.com/D131750
2021-11-25 07:09:23 +00:00
Nicolas Chevobbe
dee0023a4e Bug 1742332 - Enable devtools no eft config. r=jdescottes,jmaher.
Since we're going to enable EFT on Nightly and let it bake there a bit to
get feedback, we might face a situation where we have to disable EFT.
Having these test variants will help us to not regress non-EFT cases so if
we ever have to rollback EFT, there wouldn't be extra work.

Depends on D131477

Differential Revision: https://phabricator.services.mozilla.com/D131600
2021-11-25 06:24:12 +00:00
Nicolas Chevobbe
50f18c0c83 Bug 1742541 - [devtools] Don't try to show PausedDebuggerOverlay if document isn't ready. r=ochameau.
At the moment, the overlay can't be displayed if the DOM isn't loaded,
and we were waiting for that state before trying to show the overlay.
But we can't move forward in the document loading process until we resume,
which mean we could end up in weird state with the overlay, where the
page wasn't paused anymore, but we'd display it.
In this patch, we simply bail out if the document isn't ready.

Differential Revision: https://phabricator.services.mozilla.com/D131884
2021-11-25 06:24:12 +00:00