At initializing new element which has not been connected, undo transactions
are not necessary because just removing the new element gets same result for
users. Therefore, they should be able to work without transactions.
Differential Revision: https://phabricator.services.mozilla.com/D140468
For making initializing new element safer and faster, it's better to initialize
new element's attributes and appending children before inserting the new element
into the DOM tree.
Differential Revision: https://phabricator.services.mozilla.com/D140465
The llvm-symbolizer tasks currently extract a llvm-symbolizer from clang
tasks. Changes in clang 14 make the hack that we have in place to keep
llvm-symbolizer statically linked to libllvm while clang uses a dynamic
libllvm not work anymore, so it's time to bite the bullet and build
llvm-symbolizer separately.
We share most of the build setup with the compiler-rt build.
Differential Revision: https://phabricator.services.mozilla.com/D140711
The toolchain file is a helper for cross-compilation that even deals
with case-sensivity in MSVC, which simplifies our setup.
Differential Revision: https://phabricator.services.mozilla.com/D140710
When `Selection` instance is updated, the old selection may be in batch.
In the case, `UpdateSelectionCache` should clean up the batch in the old
selection and start new one in the new selection instead.
Differential Revision: https://phabricator.services.mozilla.com/D139349
Currently there's a fair bit of unneeded overhead when localizing the PDF Viewer, since *every single* string requires a round-trip from the `viewer.js` file to the `PdfStreamConverter.jsm` file.
This despite the fact that the relevant `viewer.properties` file is read *only once*, and its result is then cached, see https://searchfox.org/mozilla-central/rev/8f42809e51cb07aa4f5739932a06d14581e9dd4a/toolkit/components/pdfjs/content/PdfStreamConverter.jsm#470-473
Hence we can improve things here by instead sending the *entire* localization data at once when it's first requested, and also cache it in the viewer, to reduce completely unneeded message passing overhead caused by localizing the PDF Viewer.
To put these changes into perspective, let's look at what happens when loading the PDF Specification; i.e. https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf
When loading that document we first of all need to localize the viewer UI, however the initialization/rendering of the PDF Document itself also causes some l10n-string lookups. All-in-all, simply loading the above PDF document in Firefox currently results in just over `3900` l10n-strings being fetched (with most of them being duplicates).
Furthermore, all these l10n-string lookups also have a measurable performance impact on the viewer UI localization. Using some, admittedly crude, benchmarking with `console.time/timeEnd` around the viewer UI localization code in https://searchfox.org/mozilla-central/rev/8f42809e51cb07aa4f5739932a06d14581e9dd4a/toolkit/components/pdfjs/content/web/viewer.js#484-485 gives the following results (using the best observed values, with `privacy.reduceTimerPrecision = false` set):
- With the current code, the viewer UI localization takes around `12-13` ms.
- With this patch, the viewer UI localization takes around `4-5` ms.
While these improvements are obviously not huge, they thus cannot hurt as far as I'm concerned.
(Assuming this is accepted, I'll obviously follow-up with the relevant `web/viewer.js` patch at GitHub. However, these changes must be synchronized in the both the viewer/integration code.)
Differential Revision: https://phabricator.services.mozilla.com/D139928
Bug 1755092 changed how mozilla::pkix verifies signatures. This patch makes the
corresponding changes in PSM.
Depends on D140597
Differential Revision: https://phabricator.services.mozilla.com/D139202
Generate helper function for C++ to perform operations on backing objects for
each observable array attribute,
- ElementAt: Get the item at that index. Throw error if fail to get the element.
- ReplaceElementAt: Replace the item at the index, this will also trigger OnDelete
and OnSet callback. Throw error if fail to replace the element.
- AppendElement: Append one element to the end of the array, this will also trigger
OnSet callback. Throw error if fail to append the element.
- RemoveLastElement: Remove the element at the last index, this will also trigger
OnDelete callback. Throw error if fail to remove the element.
- Length: Get the number of the indexd value. Throw error if fail to get the length.
Depends on D113728
Differential Revision: https://phabricator.services.mozilla.com/D113862
The highlevel architecture:
- Each observable array attribute has corresponding ES proxy exotic object stored
in DOM reflector's reserved slot. It use the ObservableArrayProxyHandler as
proxy handler which implements the behaviour defined in the spec.
- Each observable array exotic objects has 2 reserved slots:
* one is to store the raw pointer of the interface, it is cleaned up when the
DOM reflector is finalized. It is used to run the SetAlgorithm and
DeleteAlgorithm defined in the spec.
* one is to store the backing list used to store the indexed value. The additional
properties are stored in the proxy target instead.
Depends on D112279
Differential Revision: https://phabricator.services.mozilla.com/D112280
This implements the base class for proxy handler of observable array exotic
objects, it implments the proxy behaviour define in
https://webidl.spec.whatwg.org/#es-observable-arrays, the virtual functions
, OnDeleteItem() and OnSetItem(), are for SetAlgorithm and DeleteAlgorithm that
are defined and implemented per interface.
Depends on D112277
Differential Revision: https://phabricator.services.mozilla.com/D112278
This is equivalent to the ResourceCommand, but isn't related to any context/descriptor.
This helps listen to things right away when connecting to a RDP server.
That, without having to instantiate any descriptor/watcher actor.
It works right away via the root actor which is instantiated by default.
Differential Revision: https://phabricator.services.mozilla.com/D140206