This commit replaces the struct.new instruction with the
struct.new_with_rtt and rtt.canon instructions. The new struct
instruction takes an rtt value as an operand. An rtt value is defined
to be the TypeDescr JSObject currently used by the constructor of
TypedObject's. This gives rtt values the same representation as
our reference values, although this doesn't need to be the case
in the future. rtt.canon is then implemented as a load of the
TypeDescr* stored in the TlsData global area for the specific
type index. When we implement type canonicalization, the
initialization of the instance will be changed to store the
canonical TypeDescr* for each type index in each slot.
The ValType representation is changed in this commit to support
the depth field of an rtt. As we're now packing 5 separate fields
in PackedTypeCode, the approach of manual shifts and masks isn't
scaling anymore. The PackedTypeCode representation is changed to
a POD union with bitfields to make access easier.
There isn't enough bits for all the fields in a ValType with our
current implementation limits when on 32-bit systems. To workaround
this, a MaxTypeIndex limit is added independent for MaxTypes which
controls the highest (ref $t) allowed. This value is the same as
MaxTypes on 64-bit systems, and a lower value for 32-bit systems.
This gives us room to keep PackedTypeCode to the native pointer
size.
Differential Revision: https://phabricator.services.mozilla.com/D104267
The baseline compiler assumes the struct type given to an instruction
can be used to determine if the input value will be an inline or
outline struct. This is incorrect with subtyping. A test is added
and struct instructions are made dynamic upon the kind of TypedObject
given. Longer term we should optimize this further, but this was
simplest.
Differential Revision: https://phabricator.services.mozilla.com/D104266
The previous patch removed the only use of RadioButtonCell and CheckboxCell.
And it made FocusIsDrawnByDrawWithFrame always return false.
Differential Revision: https://phabricator.services.mozilla.com/D107907
I skipped anything in third-party libraries. There's also one instance in plugin code but it'll be removed as part of the plugin removal effort.
Differential Revision: https://phabricator.services.mozilla.com/D107760
When an offscreen surface establishes a raster root, this code
was causing incorrect snapping / rounded (even on non-inflated
surfaces), resulting in test failures in some cases.
In theory, this should not be necessary, since scroll offsets are
snapped, and primitives are already snapped during scene building.
Additionally, the picture surface allocation code expects surfaces
with fractional offsets and handles this case (by rounding out the
allocation size, and creating a UV set that samples from the subpixel
offsets of the surface).
In practice, there may be content that relies on this which isn't
tested by CI, so let's land this as a separate patch and see if it
causes any real-world content regressions, before landing the
changes that rely on this.
Differential Revision: https://phabricator.services.mozilla.com/D107768
When an offscreen surface establishes a raster root, this code
was causing incorrect snapping / rounded (even on non-inflated
surfaces), resulting in test failures in some cases.
In theory, this should not be necessary, since scroll offsets are
snapped, and primitives are already snapped during scene building.
Additionally, the picture surface allocation code expects surfaces
with fractional offsets and handles this case (by rounding out the
allocation size, and creating a UV set that samples from the subpixel
offsets of the surface).
In practice, there may be content that relies on this which isn't
tested by CI, so let's land this as a separate patch and see if it
causes any real-world content regressions, before landing the
changes that rely on this.
Differential Revision: https://phabricator.services.mozilla.com/D107768
Because the previous commit changed how MFBT tests are linked, they now
use mozjemalloc. Mozjemalloc randomizes small allocations, which id does
by using MFBT's RandomNum. The code in RandomNum, on mac, uses a system
API that allocates memory. So mozjemalloc has some code to handle the
recursion gracefully.
When the RandomNum test runs, it essentially only runs the RNG... which
goes on to allocate memory, which then goes into the RNG. Needless to
say, that doesn't go well. In typical cases, this is not the type of
things that would happen, but it does happen for that one test.
We work around the issue by allocating memory first, which is actually
hard, because compilers like to optimize unused allocations away. So we
turn the existing code into one that uses an allocation instead of an
array on the stack.
Differential Revision: https://phabricator.services.mozilla.com/D105242
Instead of snprintf.
Because some standalone code uses those functions directly or indirectly,
and PrintfTarget lives in mozglue, they now need to depend on mozglue
instead of mfbt. Except logalloc/replay, which cherry-picks what it
uses, and the updater, for which we keep using vsnprintf.
Differential Revision: https://phabricator.services.mozilla.com/D103730
The test send two taps, which triggers a double tap zoom if it's enabled, and then the test doesn't get the expected events. So change the test to disable zooming and then enable the meta viewport pref so that we respect it on desktop.
Differential Revision: https://phabricator.services.mozilla.com/D107791
Based on the discussion in
https://github.com/w3c/csswg-drafts/issues/5721#issuecomment-781702159,
the default ratio-dependent axis is block axis (though the spec issue is
for replaced elements, but I think the behavior should be consistent).
So we should apply aspect-ratio not matter what the inline size is (e.g.
nscoord_MAX, auto or other values).
In the test case, the min-block-size is 1073741823, and its transferred
min-inline-size is also 1073741823, so we get a 1073741823 (i.e. nscoord_MAX)
preferred inline size (i.e. result.ISize(aWM) == NS_UNCONSTRAINEDSIZE).
However, we still have to apply aspect-ratio because the style of block-size is
auto, and so mFlags.mBSizeIsSetByAspectRatio should be set unconditionally here.
I still keep this assertion because it helps me catch this potential
issue. (Just reword it anyway.)
Differential Revision: https://phabricator.services.mozilla.com/D107764
This also prevents incorrectly selecting two words when double-clicking at
the end of the first word (before the inter-word space).
We also update the selectAtPoint testcase to target more widely-spread glyphs,
to check that it is behaving accurately across a larger distance.
Differential Revision: https://phabricator.services.mozilla.com/D107309
Xcode hasn't been necessary to build Firefox for a while. Command line
tools are enough, but if Xcode is available, that's also sufficient.
Mach bootstrap, however, for historic reasons, mostly, ends up wanting
to install both, which is a waste of time and disk space.
Differential Revision: https://phabricator.services.mozilla.com/D107770
Note that I made this a browser test rather than an xpcshell test, despite not using any particular browser functionality. I made this choice because I expect to expand this test a bit later, adding checking for preferences UI, much like the browser_policy_app_auto_update.js test in the same directory does.
Depends on D107922
Differential Revision: https://phabricator.services.mozilla.com/D107923