This patch implements the parent process' part of NavigationPreload API.
After receiving the IPC, using the corresponding ServiceWorkerRegistrationProxy to send data to the main thread, then saving the NavigationPreload data on ServiceWorkerRegistrationInfo.
Depends on D116916
Differential Revision: https://phabricator.services.mozilla.com/D116917
This patch implements the IPC for NavigationPreload APIs.
The IPC methods are created on PServiceWorkerRegistration.
Depends on D116914
Differential Revision: https://phabricator.services.mozilla.com/D116916
The test opens the inspector and retrieves the testActor,
then a navigation occurs and testActor is used to check
if the highlighter works.
When server-side target switching is enabled, the testActor
gets destroyed during the navigation, and when it throws
when we try to use it in the new document.
To fix this, we only retrieve the testActor once we navigated.
Differential Revision: https://phabricator.services.mozilla.com/D117267
These methods are replaced by a helper in shared-head that
sets the fullZoom property on the browsing context.
A new testActor method, waitForHighlighterUpdate, is added
so we can know when a given highlighter is updated (which
is something that was done in changeZoomLevel).
Differential Revision: https://phabricator.services.mozilla.com/D117263
We're getting some intermittent failures on automation where the PID does not
match the original privileged process in some checks. It isn't clear whether
that's because we're actually not in a privileged process, though, or whether
the original privileged process was simply replaced.
The new checks will tell us both things.
Differential Revision: https://phabricator.services.mozilla.com/D117361
It was already disabled for fuzzed code-coverage in bug 1695331. My
guess is that fuzzed code-coverage tripped on the extra allocations
due to the code-coverage runtime, but the code-coverage builds didn't
trip it because they also triggered an exception, which further
triggered a bug in the code with python3 (and somehow the fuzzed ccov
builds didn't trigger that). That bug effectively masked the failure.
Differential Revision: https://phabricator.services.mozilla.com/D117383
This patch implements the parent process' part of NavigationPreload API.
After receiving the IPC, using the corresponding ServiceWorkerRegistrationProxy to send data to the main thread, then saving the NavigationPreload data on ServiceWorkerRegistrationInfo.
Depends on D116916
Differential Revision: https://phabricator.services.mozilla.com/D116917
This patch implements the IPC for NavigationPreload APIs.
The IPC methods are created on PServiceWorkerRegistration.
Depends on D116914
Differential Revision: https://phabricator.services.mozilla.com/D116916
`EventQueuePriority::Vsync` was likely introduced for exactly this
use-case. This may reduce janks in certain animations.
Differential Revision: https://phabricator.services.mozilla.com/D117370
Before this patch, there's an edge case where we may drain a pushed float (with
a stale position), and then discover that it won't fit in the current block (so
we push it and leave its position untouched), but we still inadvertently
include its rect in the current block's overflow areas. This means we're
feeding stale/bogus position into the overflow areas, which can make them
unnecessarily huge.
This patch accounts for this by only considering overflow from floats that we
actually successfully placed, in ReflowPushedFloats.
(Also: this patch removes a stale bit of documentation about aLineLayout being
possibly-null in AddFloat. In actuality, AddFloat has a fatal assertion that
mandates that this arg is non-null.)
Differential Revision: https://phabricator.services.mozilla.com/D117218
While initializing `HTMLEditor` for `designMode`, `blur` event for the
previously focused element will be fired after `HTMLEditor` initialization
because of the script blocker in `Document::EditingStateChanged()`:
https://searchfox.org/mozilla-central/rev/c0f286b1f541c675bbe052b21bdefa80d150ec35/dom/base/Document.cpp#5878,5891,5923
This causes `EditorEventListener::Blur()` calling
`EditorBase::FinalizeSelection()` to make the editor stop handling selection.
Therefore, if the design mode is turned on from an event listener run by a
user operation cannot make the caret visible.
This patch makes the `Blur()` ignore `blur` events whose target is element
in the design mode since the target of `blur` events should be handled in the
design mode is always the DOM window or the document node.
Differential Revision: https://phabricator.services.mozilla.com/D117268
nsIX509Cert.keyUsages is only used by the front-end. As of bug 1688703, the new
certificate viewer utility files can be used anywhere in the front-end to
decode certificates. Since this code is JS instead of C/C++, this is
preferrable from the standpoint of reducing attack surface.
Differential Revision: https://phabricator.services.mozilla.com/D113197
This will allow us to select either rasterizing the tiles with a
scale factor of 1.0 (for high performance mode) or at the current
scale of the pinch-zoom (for high quality mode).
Differential Revision: https://phabricator.services.mozilla.com/D116796
Now that we always have an MTA active, we don't need to explicitly try to
start it anymore. These locations in our source were doing so, which is now
not only redundant, but fails (since `EnsureMTA`'s default constructor is now
`private`).
We also fix a spot in `JumpListBuilder` where we need a lambda to capture by
reference to fix a static analysis issue.
Differential Revision: https://phabricator.services.mozilla.com/D113563
* We make `EnsureMTA`'s default constructor `private`, and `ProcessRuntime` a friend.
`ProcessRuntime` calls this to eagerly create the MTA.
* The default constructor uses the new-ish `CoIncrementMTAUsage` to create the
MTA without requiring a dedicated thread (when available). Otherwise we
fall back to the traditional method. In the latter case, we synchronously
wait for the initialization to complete so that we are guaranteed to have
an MTA when we return.
* Some minor refactoring to make it easier to do the sync wait in the
default constructor. I also renamed a couple of things just to make them
more clear.
Differential Revision: https://phabricator.services.mozilla.com/D113562
This patch does the following:
* General cleanup:
* More explicit restrictions of how/when the various constructors are available.
* `InitializeSecurity` is made `static`, since it doesn't really manipulate instance variables.
* We move some logic for resolving `CoInitializeEx` flags into `GetDesiredApartmentType`.
* Addition of `PostInit`:
* This doesn't do anything at the moment, but since I'm already making a bunch
of changes, I wanted to add this too. `PostInit` is a static method that
is invoked once the `ProcessRuntime` is finished initializing, and, when
present, the sandbox is fully enabled.
* We call `EnsureMTA`'s default constructor to eagerly bring up the MTA. This
causes all background threads to implicitly become members of the MTA, which
means that we can eliminate `CoInitializeEx` calls throughout our codebase,
since they're slow and most developers do not have a clear understanding of
what those functions actually do.
* This also simplifies the COM initialization in sandboxed content processes
with Win32K lockdown, since if our main thread is in the implicit MTA, we
can immediately initialize ourselves without needing to punt that work
over to the persistent MTA thread.
Differential Revision: https://phabricator.services.mozilla.com/D113560
When using a mpath elememt which linked to a external path element, we use
GetDistancesFromOriginToEndsOfVisibleSegments() to do a quick check if we
really need to build the path (note: see
SVGMotionSMILAnimationFunction::RebuildPathAndVerticesFromMpathElem),
so we have to get the d property value from style in this function.
Differential Revision: https://phabricator.services.mozilla.com/D116920