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
Now we have d property, so the list of auto completion should include d
property when typing 'd'. We need to add more tabs or up/down keys to
choose the keyword we want.
Differential Revision: https://phabricator.services.mozilla.com/D115752
Unfortunately, we still have to convert the cpp version into rust version.
However, it's still better than parsing it again.
If we want to use the css parser to parse d attribute, we may need an
extra API to get the whole input as &str from Parser.
(expect_string() doesn't work because the SVG attribute value is not a quoted
string.) It seems Parser::slice() cannot get the whole input because we don't
know the end index of the whole input string. We should fix this in Bug 1714238.
Differential Revision: https://phabricator.services.mozilla.com/D115571
So we update d property in the style system as well. This makes sure we
have the correct computed style and the correct rendering result.
Differential Revision: https://phabricator.services.mozilla.com/D115570
Use the style value when building the SVG path and its display items.
Besides, we should also invalid the cache when there are any CSS updates.
Differential Revision: https://phabricator.services.mozilla.com/D115566
We parse the attribute and store it into CSS. We have tests already in
wpt, svg/path/property/*, but we cannot pass them for now because we
don't convert the relative commands into absolute commands. Those will
be fixed in Bug 1489392 once the spec issue is resolved.
Differential Revision: https://phabricator.services.mozilla.com/D81238
With this change we no longer incorrectly consider there is no visible rect for
the OOP iframe where we haven't yet received the rectangle from APZ.
Differential Revision: https://phabricator.services.mozilla.com/D117260
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
I'm not sure in what markup/style scenario a list item accessible
wouldn't have a frame, but would have a bullet. Apparently that can
happen in the wild. Added an assertion, hopefully we can trip it on
something reproducable in the future.
Differential Revision: https://phabricator.services.mozilla.com/D117347
- Added a new set of xpcshell-tests in toolkit/components/extensions/test/xpcshell/webidl-api
for unit tests related to the WebIDL bindings API request forwarding
Depends on D99886
Differential Revision: https://phabricator.services.mozilla.com/D99887
ExtensionMockAPI is a fake WebExtensions API, locked behind a pref and
used in unit tests related to the API requests handling and WebExtensionStub
methods without relying on a specific WebExtension API.
Depends on D84687
Differential Revision: https://phabricator.services.mozilla.com/D99886
The ExtensionPort represents the webidl definitions of the runtime.Port WebExtensions API object.
A webidl dictionary will represent the serializable definition of the port properties, sent from
the API request handler to provide all the internal properties needed to create an instance
of the ExtensionPort webidl interface on the worker thread (which will be returned to the
extension code as the return value of the runtime.connect/connectNative methods and as a
parameter of the calls to the runtime.onConnect API event listeners).
Depends on D84684
Differential Revision: https://phabricator.services.mozilla.com/D84685