793338 Commits

Author SHA1 Message Date
Nika Layzell
3065034574 Bug 1764119 - Part 2: Don't check gXPCOMThreadsShutdown in ThreadEventTarget::Dispatch, r=xpcom-reviewers,kmag,jstutte
We already have a mechanism for ending threads accepting new messages
when they are shut down, so this only allows tasks started from thread
shutdown tasks during xpcom shutdown to behave consistently.

We already didn't prevent dispatching to the background thread pool at
this time, so it should make little difference there as well, and may
just instead save us from deadlocks where code expects a dispatch to
succeed and it does not during actor shutdown.

This patch both relaxes the check to only be a NS_ASSERTION, and relaxes
it to allow dispatching to the current thread even after
xpcom-shutdown-threads as that thread is definitely still alive.

Differential Revision: https://phabricator.services.mozilla.com/D144592
2022-05-02 20:38:43 +00:00
Nika Layzell
41458369b2 Bug 1764119 - Part 1: Do final KillClearOnShutdown after XPCOM threads shutdown, r=xpcom-reviewers,kmag,jstutte
This patch moves where we perform the final KillClearOnShutdown to occur
after we've shut down non-main threads, but before the main thread stops
accepting events. This should help ensure that unsuspecting events,
including those triggered from nsIThreadShutdownTask tasks, don't run
after KillClearOnShutdown has been run on background or main threads.

This KillClearOnShutdown was moved to occur before
nsThreadManager::Shutdown() in bug 1637890, as there were examples of
KillClearOnShutdown callbacks which needed to be able to dispatch
main-thread runnables. This change should not regress that use-case, as
we are still accepting new events on the main thread after the callback.

Non-main threads were already unreliable after this call as we already
block normal dispatches by setting gXPCOMThreadsShutdown, and new
threads cannot be started for the background thread pool.

Differential Revision: https://phabricator.services.mozilla.com/D144591
2022-05-02 20:38:43 +00:00
Nika Layzell
a19ea51981 Bug 1738106 - Part 5: Track TaskQueue lifetimes to avoid leaking TaskQueues, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D142606
2022-05-02 20:37:35 +00:00
Nika Layzell
d5c301d0bc Bug 1738106 - Part 4: Support ThreadSafeWeakPtr in TaskQueue, r=xpcom-reviewers,mccr8
This will be used to allow the BackgroundEventTarget to safely hold weak
references to active TaskQueues managed by it.

Differential Revision: https://phabricator.services.mozilla.com/D142605
2022-05-02 20:37:35 +00:00
Nika Layzell
052cba0853 Bug 1738106 - Part 3: Switch to TaskQueue::Create, r=xpcom-reviewers,necko-reviewers,media-playback-reviewers,dragana,alwu,barret
In future parts, TaskQueue will require extra initialization to be performed
which cannot happen in a constructor, as it takes references to the TaskQueue
object itself, which will require the introduction of a helper method. This
patch switches all callers of the TaskQueue constructor to use the new method.

Differential Revision: https://phabricator.services.mozilla.com/D142604
2022-05-02 20:37:34 +00:00
Nika Layzell
18f7866fc2 Bug 1738106 - Part 2: Allow XPCOM classes to use SupportsThreadSafeWeakPtr, r=glandium,xpcom-reviewers
Due to how this type of threadsafe refcounting is implemented, it needs to be
implemented using a MFBT-style refcounting base class, somewhat similar to
`SupportsWeakPtr`.

This patch makes NS_IMPL_{ADDREF,RELEASE}_INHERITED intelligently not add
refcount logging for types inheriting from SupportsThreadSafeWeakPtr, as the
default behaviour would break due to weak pointer upgrades not calling through
`AddRef` or `Release`.

In MFBT, the return value of `AddRef` and `Release` on
SupportsThreadSafeWeakPtr is changed to be compatible with nsISupports, so that
this type can be used to implement nsISupports refcounting.

Differential Revision: https://phabricator.services.mozilla.com/D142603
2022-05-02 20:37:34 +00:00
Nika Layzell
2f853cadea Bug 1738106 - Part 1: TaskQueue thread safety annotations, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D142602
2022-05-02 20:37:34 +00:00
Dan Robertson
2b825a79e9 Bug 1760986 - Modify APZ mochitest coordinatesRelativeToScreen callers to use await. r=tnikkel
Make the APZ mochitests use coor coordinatesRelativeToScreen and its callers
properly. When was made async not everything was made to await properly.

Differential Revision: https://phabricator.services.mozilla.com/D144756
2022-05-02 20:32:57 +00:00
Emilio Cobos Álvarez
46a3603363 Bug 1469174 - Factor out parsing the query feature name. r=boris
No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D145229
2022-05-02 20:27:55 +00:00
Steve Fink
31d977b6c4 Bug 1766648 - Disallow marking black if marking will revert to gray r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D145001
2022-05-02 20:08:42 +00:00
Boris Chiou
571e570cda Bug 1760658 - Part 3: Apply automatic content-based minimum on fieldset element. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D145013
2022-05-02 20:06:33 +00:00
Boris Chiou
e3d089f302 Bug 1760658 - Part 2: Apply automatic content-based minimum on grid container. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D144899
2022-05-02 20:06:33 +00:00
Boris Chiou
035220bf4c Bug 1760658 - Part 1: Apply automatic content-based minimum on flex container. r=emilio
Basides, factor out the utility function to AspectRatio so everyone can
use it.

Differential Revision: https://phabricator.services.mozilla.com/D144891
2022-05-02 20:06:32 +00:00
Jeff Muizelaar
c5077a5261 Bug 1767163 - Serialize stats from bug 1759931. r=ng
This serialization wasn't added when the stats from bug 1759931 were
added.

Differential Revision: https://phabricator.services.mozilla.com/D145172
2022-05-02 19:53:44 +00:00
Julian Descottes
e1a0f3e103 Bug 1753997 - [remote] Add documentation about remote hosts and origins for RemoteAgent r=webdriver-reviewers,jgraham
Depends on D144847

Differential Revision: https://phabricator.services.mozilla.com/D144851
2022-05-02 19:45:48 +00:00
Julian Descottes
6116396a7d Bug 1753997 - [wdspec] Enable all BiDi wdspec tests on beta and release channels r=webdriver-reviewers,whimboo
Depends on D144846

Differential Revision: https://phabricator.services.mozilla.com/D144847
2022-05-02 19:45:48 +00:00
Julian Descottes
87503e11b9 Bug 1753997 - [remote] Enable WebDriver BiDi on all channels r=webdriver-reviewers,whimboo
Depends on D144984

Differential Revision: https://phabricator.services.mozilla.com/D144846
2022-05-02 19:45:47 +00:00
Cathy Lu
3b90b13153 Bug 1601420 - Implement permissions.request/optional web extension permissions for geckoview r=geckoview-reviewers,agi,robwu
The general idea is that when extensions are installed at startup, they request permissions needed. Some examples of permissions might be access to downloads or bookmarks. This patch implements the ability to request permissions after install during runtime. A common optional permission is geolocation. The app won't request the user's location until needed.

GeckoView will provide a delegate to apps called onOptionalPrompt that provides the extension and the permissions the extension is requesting. They can then query the user to accept or reject the permission. The delegate works by listening to the browser API browser.permissions.request. Any browser API will be linked to a corresponding file and function such as ext-permissions.js::request() in this example. request() notifies observers of the topic webextension-optional-permission-prompt. ExtensionPromptObserver listens to that topic and dispatches an event GeckoView:WebExtension:OptionalPrompt. The geckoview web extension controller listens on that event and pass the extension and permissions to the skeleton delegate functions, that will get implemented by the app.

To verify this works, the test case WebExtensionTest.kt installs an extension through the package xpi. The package is created on build from moz.build to contain the extension's manifest.json and necessary scripts. Once the extension package is installed, we load the html script in the package that states when the page is clicked, trigger the browser API browser.permissions.request. The click is simulated with synthesizeTap. This request is then observed by listeners like mentioned in the previous paragraph. We verify in our skeleton delegate that the permissions provided match the ones requested.

Differential Revision: https://phabricator.services.mozilla.com/D143925
2022-05-02 19:45:39 +00:00
Scott
b9fb9a949d Bug 1764098 - Pocket newtab save to Pocket context menu items don't turn off if Pocket is turned off. r=gvn
Differential Revision: https://phabricator.services.mozilla.com/D144178
2022-05-02 19:21:06 +00:00
Daniel Holbert
968d8951a4 Bug 1767069 part 3: Modernize naming for some SizeComputationInput variables in float layout code. r=emilio
This patch does not impact behavior.

Before this patch, these variables' names are abbreviations of their original
type-name, "nsCSSOffsetState".  We renamed that type to SizeComputationInput in
bug 1277129, and this patch just updates the variable-names to reflect that
renaming, so that now they're abbreviations of the new type-name, rather than
the old one.

This patch also takes this opportunity to move these variables declarations
closer to their usage, and in one case we convert a variable to be a temporary
anonymous value in the middle of another assignment.

Differential Revision: https://phabricator.services.mozilla.com/D145137
2022-05-02 18:49:17 +00:00
Daniel Holbert
85eff7ef92 Bug 1767069 part 2: Remove unneeded "mozilla::" prefixes inside BlockReflowState's "namespace mozilla {}" section. r=emilio
This patch doesn't impact behavior.

The namespace prefix is unnecessary, given the fact that this code is all
inside `namespace mozilla {...}`.

Differential Revision: https://phabricator.services.mozilla.com/D145136
2022-05-02 18:49:17 +00:00
Daniel Holbert
92a40a8db1 Bug 1767069 part 1: Standardize on "float-avoiding block" in var/function names to refer to block-level elements that cannot intersect floats. r=emilio
This patch does not impact behavior; it's just a handful of renamings and
documentation-updates.

Before this patch, our float-handling code has a bunch of variables and
functions with "replaced" in the name. But in fact these aren't necessarily
replaced; they're just block-level frames that elicit a "false" return-value
from "BlockCanIntersectFloats".  This category *includes* replaced boxes, and
it also includes frames that establish a formatting context, e.g.:
scrollframes, flex/grid containers, flow-root, table.

This patch seeks to clarify things by renaming these to refer to the fact that
they "avoid" floats, e.g. s/replacedBlock/floatAvoidingBlock/.

I've included a comment to reference this term in the BlockCanIntersectFloats()
documentation (note that the "can intersect" concept is the opposite of
"avoids").  I've also renamed a few "aFrame" variables to
"aFloatAvoidingBlock", for a few functions that are explicitly dealing with
this scenario and only expect to be passed frames that are in this category.

Differential Revision: https://phabricator.services.mozilla.com/D145131
2022-05-02 18:49:16 +00:00
Butkovits Atila
7f98476cbe Backed out changeset 0e530e167af3 (bug 1766648) for causing SM bustages. CLOSED TREE 2022-05-02 21:50:07 +03:00
Tim Giles
4f0f925d5d Bug 1762070 - Add setStorage function for form autofill tests. r=sgalich
Differential Revision: https://phabricator.services.mozilla.com/D144621
2022-05-02 18:19:03 +00:00
Tim Giles
0f7e6a5e25 Bug 1764709 - Always normalize credit card expiration month and year when creating a new record. r=geckoview-reviewers,dimi,sgalich,agi
Differential Revision: https://phabricator.services.mozilla.com/D144055
2022-05-02 18:18:39 +00:00
Gavin Suntop
ab81ffd324 Bug 1766040 - Clickable save for STP refresh r=thecount
Differential Revision: https://phabricator.services.mozilla.com/D144995
2022-05-02 18:14:07 +00:00
Steve Fink
a2bc68d7fe Bug 1766648 - Disallow marking black if marking will revert to gray r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D145001
2022-05-02 17:27:49 +00:00
Dan Horák
a11b4b0bfc Bug 1767224 - don't guard struct CCIntervalMarker by MOZ_GECKO_PROFILER r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D145238
2022-05-02 16:49:51 +00:00
criss
c19d3ee5d7 Backed out 2 changesets (bug 1764119) for causing build bustages. CLOSED TREE
Backed out changeset 62743521627e (bug 1764119)
Backed out changeset f8ba6b0a8c6f (bug 1764119)
2022-05-02 19:35:23 +03:00
Nika Layzell
6f6f511c0a Bug 1764119 - Part 2: Don't check gXPCOMThreadsShutdown in ThreadEventTarget::Dispatch, r=xpcom-reviewers,kmag,jstutte
We already have a mechanism for ending threads accepting new messages
when they are shut down, so this only allows tasks started from thread
shutdown tasks during xpcom shutdown to behave consistently.

We already didn't prevent dispatching to the background thread pool at
this time, so it should make little difference there as well, and may
just instead save us from deadlocks where code expects a dispatch to
succeed and it does not during actor shutdown.

This patch both relaxes the check to only be a NS_ASSERTION, and relaxes
it to allow dispatching to the current thread even after
xpcom-shutdown-threads as that thread is definitely still alive.

Differential Revision: https://phabricator.services.mozilla.com/D144592
2022-05-02 16:09:03 +00:00
Nika Layzell
73061fa43e Bug 1764119 - Part 1: Do final KillClearOnShutdown after XPCOM threads shutdown, r=xpcom-reviewers,kmag,jstutte
This patch moves where we perform the final KillClearOnShutdown to occur
after we've shut down non-main threads, but before the main thread stops
accepting events. This should help ensure that unsuspecting events,
including those triggered from nsIThreadShutdownTask tasks, don't run
after KillClearOnShutdown has been run on background or main threads.

This KillClearOnShutdown was moved to occur before
nsThreadManager::Shutdown() in bug 1637890, as there were examples of
KillClearOnShutdown callbacks which needed to be able to dispatch
main-thread runnables. This change should not regress that use-case, as
we are still accepting new events on the main thread after the callback.

Non-main threads were already unreliable after this call as we already
block normal dispatches by setting gXPCOMThreadsShutdown, and new
threads cannot be started for the background thread pool.

Differential Revision: https://phabricator.services.mozilla.com/D144591
2022-05-02 16:09:03 +00:00
Alessio Placitelli
80ec444c16 Bug 1766980 - Add test coverage for the URL FOG type. r=chutten
This adds the required test coverage for the new type
and updates the GIFFT docs.

Depends on D145215

Differential Revision: https://phabricator.services.mozilla.com/D145216
2022-05-02 16:05:56 +00:00
Alessio Placitelli
2449975afb Bug 1766980 - Implement the URL type in FOG. r=chutten
This adds both the core Rust implementation and the
code to enable the needed language bindings. This
additionally enables GIFFT on the URL type, mirroring
them to a string scalar.

Differential Revision: https://phabricator.services.mozilla.com/D145215
2022-05-02 16:05:55 +00:00
Meg Viar
aed0360368 Bug 1765145 - The “Sign in” button is hardly visible if the browser is vertically resized and the “Dark” theme is enabled r=Mardak,emcminn
Differential Revision: https://phabricator.services.mozilla.com/D144725
2022-05-02 15:16:21 +00:00
Emilio Cobos Álvarez
063c03b0ec Bug 1751836 - Drive-by: Simplify L10nMutations::FlushPendingTranslations. r=dminor
Sequence can be downcasted to a const nsTArray, so we can clean up the
code a bit.

Depends on D145188

Differential Revision: https://phabricator.services.mozilla.com/D145189
2022-05-02 15:12:30 +00:00
Chris Martin
80881746de Bug 1763023 - Push nsBaseWidget::mSizeMode into child classes r=handyman
This member is no longer used on Windows, and having it in the
base class doesn't provide a real abstraction anyway since
the child classes will break if anything about it is changed.

Differential Revision: https://phabricator.services.mozilla.com/D145132
2022-05-02 14:06:17 +00:00
Thomas Wisniewski
fef480449a Bug 1766414 - Add a SmartBlock shim for WebTrends; r=pbz,denschub,webcompat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D145110
2022-05-02 13:23:22 +00:00
Nicolas B. Pierron
4bb6b75962 Bug 1766841 - Remove unnecessary AutoLockScriptData from DelazifyTask ctor. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D145101
2022-05-02 13:11:38 +00:00
Makoto Kato
34944ac4bd Bug 1757031 - Don't restore previous viewport when window size isn't same. r=emilio
Fenix's Picture-In-Picture uses full screen mode. So it isn't same as Firefox
Desktop. When exiting full screen, Fenix's window may not same as before
entering full screen.

When this occurs,

1. When device is portrait orientation, user changes to full screen by content
   script.
2. Fenix enters to full screen then orientation is changed to landscape.
3. User changes that device is changed to landscape by hand.
4. Fenix enters PiP mode. Android (Home screen) change to portrait orientation.
   Then PiP window keeps landscape orientation.
5. When exiting PiP, full screen will be exited.
6. Device is landscape (by Step 3.), so Fenix window is landscape. But Gecko
   restores 1.'s viewport by `nsIDOMWindowUtils.exitFullScreen`. So viewport
   becomes portrait orientation size even if window is landscape orientation.

For PiP mode, although nsIDOMWindowUtils.exitFullScreen is used, it doesn't
consider this situation. So I would like to add non-restore option for it.

Differential Revision: https://phabricator.services.mozilla.com/D143992
2022-05-02 13:00:39 +00:00
ffxbld
dc7cdcb8e8 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D145224
2022-05-02 12:27:06 +00:00
Gregory Mierzwinski
715892e27f Bug 1677559 - Trigger a clean rebuild for browsertime upgrades/installations. r=perftest-reviewers,kshampur
This patch causes us to trigger a rebuild for the python environment on browsertime upgrades and installations. This is needed for now because we are moving to python-based dependencies for visual-metrics processing and that requires a rebuild on the first upgrade/installation.

See bug 1766112 for the removal of this code.

Depends on D144464

Differential Revision: https://phabricator.services.mozilla.com/D144565
2022-05-02 12:26:15 +00:00
Gregory Mierzwinski
a2c6f436f4 Bug 1677559 - Re-install browsertime when FFMPEG is not found. r=perftest-reviewers,kshampur
This patch forces us to re-install browsertime if FFMPEG is not found in the cache. This fixes an issue where deleting the `.mozbuild/browsertime` folder would go undetected and cause failures later when running browsertime.

Alongside these changes, the patch also enables detecting for FFMPEG on Linux, and Windows machines. It works in the same way as mac, but it also requires using `browsertime_ffmpeg` since the `os.environ` settings don't get transferred to the required environment.

Depends on D143603

Differential Revision: https://phabricator.services.mozilla.com/D144464
2022-05-02 12:26:14 +00:00
Gregory Mierzwinski
fd53696f8f Bug 1677559 - Modify mach browsertime to use the new visualmetrics script. r=perftest-reviewers,kshampur
This patch modifies the mach browsertime file to use the new visualmetrics script and removes the usage, installation, and checks for ImageMagick.

Depends on D142838

Differential Revision: https://phabricator.services.mozilla.com/D143603
2022-05-02 12:26:14 +00:00
Gregory Mierzwinski
6fdd339b84 Bug 1677559 - Run visual-metrics in the browsertime test task. r=perftest-reviewers,kshampur
This patch runs the visual-metrics processing within the test task rather than the (deleted) `-vismet` tasks. It also updates the browsertime version to v15. It requires an update to node16 so new code was added to pull, and install the *-node-16 toolchain artifacts from CI.

This patch is possible because the browsertime update gives us the new `visualmetrics-portable.py` script which doesn't require ImageMagick anymore (they've been converted to Python dependencies). We did this conversion here: https://github.com/sitespeedio/browsertime/pull/1741

Furthermore, some changes are made to handle timeouts better, and increase the timeout for an interactive test.

Depends on D143502

Differential Revision: https://phabricator.services.mozilla.com/D142838
2022-05-02 12:26:14 +00:00
Gregory Mierzwinski
bd9eac6efd Bug 1677559 - Download, and install node-16 from the toolchain task. r=perftest-reviewers,kshampur
This patch adds the ability to raptor-browsertime for downloading, and installing a node binary from our Taskcluster CI. This makes it possible to seamlessly use raptor-browsertime with node-16, while using node-12 for the rest of the mozilla-central tooling.

Depends on D142837

Differential Revision: https://phabricator.services.mozilla.com/D143502
2022-05-02 12:26:13 +00:00
Gregory Mierzwinski
2ddffcb64a Bug 1677559 - Remove the vismet browsertime tasks. r=perftest-reviewers,afinder
This patch removes all the code related to the second task (the `*-vismet` tasks) we were using for visual-metrics processing.

Differential Revision: https://phabricator.services.mozilla.com/D142837
2022-05-02 12:26:13 +00:00
Tooru Fujisawa
ef2e0414f3 Bug 1767221 - Part 2: Update spec comment for NewPromiseReactionJob. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D145210
2022-05-02 11:59:38 +00:00
Tooru Fujisawa
cf05d0233f Bug 1767221 - Part 1: Rename Run{Fulfill,Reject}Function to CallPromise{Resolve,Reject}Function. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D145209
2022-05-02 11:59:38 +00:00
Tooru Fujisawa
6d23bba0dc Bug 1767087 - Part 8: Fix TaskController testcase. r=smaug
Depends on D145207

Differential Revision: https://phabricator.services.mozilla.com/D145208
2022-05-02 11:59:37 +00:00
Tooru Fujisawa
45fc9fa52e Bug 1767087 - Part 7: Add testcase. r=yulia
Depends on D145206

Differential Revision: https://phabricator.services.mozilla.com/D145207
2022-05-02 11:59:37 +00:00