Change `MergeSort` to directly modify its input instead of creating a copy.
`ArraySort` now needs to copy the input and re-arrange any holes, whereas
`ArrayToSorted` can directly return the result from `MergeSort`.
Depends on D154264
Differential Revision: https://phabricator.services.mozilla.com/D154265
Change `MergeSortTypedArray` to return the sorted array. `TypedArraySort` now
needs to copy the sorted elements back into the original array and
`TypedArrayToSorted` can directly return the sorted array. When `TypedArrayToSorted`
is called without a comparator function, we still have to create a copy in
`TypedArrayToSorted` which is then passed to `TypedArrayNativeSort`. When the
input has fewer than two elements, we only have to copy the input without performing
any sort operations.
Differential Revision: https://phabricator.services.mozilla.com/D154261
This only ports documentation for options which used to be documented on MDN.
Since then new sandbox options have been added, I will try to add documentation for them in a second changeset
Differential Revision: https://phabricator.services.mozilla.com/D154260
This patch make the pref value of the Email WebApp domain pref to be
cached in the memory. So, we won't get the pref everytime we access the
pref value. The cached pref value will be updated when the pref changes.
Differential Revision: https://phabricator.services.mozilla.com/D154085
There is a lot going on in renderer.rs, the initialization code takes a non-negligible chunk of it and touches all aspects of WebRender including setting up all of the threads. This patch moves it into its own init module.
In addition, RendererOptions is renamed into WebRenderOptions to better reflect that it configures every aspect of the engine, and init::create_webrender_instance replaces Renderer::new.
This a rebased version of an pld patch approved by kvark a while back.
Differential Revision: https://phabricator.services.mozilla.com/D103767
We implement SendNativeTouchpadPan/SynthesizeNativeTouchpadPan (like Windows does for this test).
I tried to use the existing functions SendNativeMouseScrollEvent/SynthesizeNativeMouseScrollEvent which are implemented on Linux and which are what we use for mac on this test, but it's already used for other stuff and it would be very clunky to overload it to make it work for this too.
I didn't see any way to "tag" the gdk events with more info, so making the observer notifier work was clunky. Similarly for getting the phase start/update/end work.
Differential Revision: https://phabricator.services.mozilla.com/D154386
With part 1, ReflowChildren and ReflowColumns are identical except for the
constness of the ReflowConfig. I choose to remove ReflowChildren because
ReflowColumns is more meaningful and keeping it requires less change to the
existing code.
Differential Revision: https://phabricator.services.mozilla.com/D154428
Remove the flag because it doesn't serve its purpose for current multicolumn
frame hierarchy (i.e. after we introduce ColumnSetWrapperFrame). Nowadays, we
limit the column's block-size with the column container's block-size and
max-block-size in [1]. If the column container has content which exceeds its
max-block-size, we are going to give up column balancing and reach [2] after the
first iteration in the column balancing `while` loop in FindBestBalanceBSize().
However, the flag can still be set in cases with absurd `nscoord` values, so
this patch still changes the behavior. For example, in crashtests with bogus
sizes such as 673770.html,
```
contentBEnd > aReflowInput.mCBReflowInput->ComputedMaxBSize() && aConfig.mIsBalancing
```
can still be true when `contentBEnd` is greater than `nscoord_MAX`. In such
cases, we might spend extra iterations in column balancing. Other than that, our
rendering shouldn't have perceived behavior change.
[1] https://searchfox.org/mozilla-central/rev/6a37a2ab9328bec6a29f688d1b2fba6974d34905/layout/generic/nsBlockFrame.cpp#3834-3844
[2] https://searchfox.org/mozilla-central/rev/6a37a2ab9328bec6a29f688d1b2fba6974d34905/layout/generic/nsColumnSetFrame.cpp#1145-1162,1169-1173
Differential Revision: https://phabricator.services.mozilla.com/D154427
This patch takes a bit of a nuclear option: it removes all
dependencies on SessionStore, and instead just inspects the
tab itself. This means that we no longer store the full
"url history", but no sync clients actually leverage that.
A nice side-effect of this is that we now can store more tabs
in the payload, so heavy tab users are likely to see even more
of their tabs synced.
Differential Revision: https://phabricator.services.mozilla.com/D154192
This patch moves where the skip_test function is used from so that it can benefit from additional changes that happen after the configs are built, and before the tests run.
Differential Revision: https://phabricator.services.mozilla.com/D154443
This still doesn't fire on print settings changes, so it uses the
default page size. Which is probably better than nothing, but...
To make viewport-size media-query listeners work more generally for
printed documents, we would need to re-clone the top document
unconditionally for all print settings changes, which needs front-end
work at least, and is dubious if the page changes dynamically.
Differential Revision: https://phabricator.services.mozilla.com/D150499
Now that we transfer all type definitions to Metadata, we can
remove the special debugging case where we would transfer all
function types. Instead, we can just transfer the funcTypeIndex
and find the function type in Metadata.
Differential Revision: https://phabricator.services.mozilla.com/D153500
ValType needed to be pointer size to support (rtt) types. Now that
they have been removed, we can revert to 32-bit on all platforms.
Differential Revision: https://phabricator.services.mozilla.com/D153499
Metadata stores a vector of TypeDef that comes from the type section of the module.
We currently only transfer a type if it's a struct type, array type, or else a
function type that cannot fit in an immediate for call_indirect signature checks.
Because we filter out some types, this means we need to renumber the type index
space to match. This is a bit hacky, and is difficult to do consistently.
The original reason for only bringing function types that cannot fit in an
immediate was to reduce the size of metadata as most function types can fit in an
immediate. However, I discovered that we make a copies of function types for
FuncExport and FuncImport metadata. This can create multiple copies of the original
function type, e.g. when multiple exported functions reference the same type
definition.
If we instead transfer all types and store the index of the function type in
FuncExport/FuncImport we can reduce total metadata size, reduce allocations,
and remove type renumbering.
This commit does this by:
1. Transferring all type definitions to Metadata (WasmGenerator.cpp)
2. Removing the typeRenumbering vector
3. Replacing FuncType with typeIndex on FuncImport/FuncExport
4. Updating all users of FuncImport/FuncExport to get the FuncType using
the typeIndex and Metadata. This the bulk of the changes.
Differential Revision: https://phabricator.services.mozilla.com/D153498