The idea is to share more memory when expanding nested rules (so being
able to share the whole :is() / :where() allocation), and same for the
Dependency computation (basically, share it across all descendant
selectors).
This prevents exponential explosion in cases like the one in bug 1844446
if you replace tag selectors by class selectors (so that we build
invalidation maps for them).
Differential Revision: https://phabricator.services.mozilla.com/D184283
The idea is to share more memory when expanding nested rules (so being
able to share the whole :is() / :where() allocation), and same for the
Dependency computation (basically, share it across all descendant
selectors).
This prevents exponential explosion in cases like the one in bug 1844446
if you replace tag selectors by class selectors (so that we build
invalidation maps for them).
Differential Revision: https://phabricator.services.mozilla.com/D184283
Everytime I look at this code I find more stuff to remove... :)
-moz-default-appearance: groupbox is not used anywhere.
menulist-text is, but it does nothing (it only would prevent drawing a
background, but we don't specify another background anyways).
Differential Revision: https://phabricator.services.mozilla.com/D184647
In bug 1844755, a bunch of the time is spent allocating initial values.
There used to be more document-dependent initial values before
bug 1834487, but now that's only about default-font and direction.
This improves the situation by sharing initial structs that don't depend
on the document.
Differential Revision: https://phabricator.services.mozilla.com/D184256
We need to inline Self::new() so cbindgen generates the constants, which
is kinda lame, but seems better than duplicating the values and type
definitions.
Differential Revision: https://phabricator.services.mozilla.com/D183921
The font-size math keyword is implemented. It behaves as a font-size: 1em
with the extra fixup due to math-level change (and other legacy MathML
attributes). After that change, the CSS for math-level / font-size: math
is behaving as per the specification, so the math-depth is turned in
nightly.
The adjusting function for font-size: math is modified so that it's
executed only if both font-size: math (otherwise the spec says no scale
should apply) and math-depth (otherwise the scale is 1 and function exists
early anyway) are set on the element.
Differential Revision: https://phabricator.services.mozilla.com/D91744
We need to inline Self::new() so cbindgen generates the constants, which
is kinda lame, but seems better than duplicating the values and type
definitions.
Differential Revision: https://phabricator.services.mozilla.com/D183921
We need to inline Self::new() so cbindgen generates the constants, which
is kinda lame, but seems better than duplicating the values and type
definitions.
Differential Revision: https://phabricator.services.mozilla.com/D183921
This simple relative selector cache avoids O(n^2) behaviour when the relative
selector is not in the subject position. e.g. `.anchor:has(.a) ~ .subject`,
with a DOM tree .anchor + .subject + .. + .subject.
Differential Revision: https://phabricator.services.mozilla.com/D184373
Note that rect() computes to the equivalent inset() function as well.
i.e. Given `rect(t r b l)`, the equivalent function is
`inset(t calc(100% - r) calc(100% - b) l)`.
The implementation is straightforward, and we don't have to change
anything in cpp because it is always `inset()` when building the gfx::Path.
The tests for clip-path will be added in the following patch.
Differential Revision: https://phabricator.services.mozilla.com/D183528
Previous code actually could not distinguish when `:has()` is on the rightmost
side or not. This caused every candidate containing any `:has()` selector to be
outright refused from being inserted into style sharing cache.
Differential Revision: https://phabricator.services.mozilla.com/D183405
This commit removes the runtime flags and related code for the
scriptminsize and scriptsizemultiplier, which have been disabled by
default for a while. The hardcoded default values
kMathMLDefaultScriptSizeMultiplier and kMathMLDefaultScriptMinSizePt
are still used in some places and are preserved for now.
Differential Revision: https://phabricator.services.mozilla.com/D157426
The remaining CustomIdent::from_ident usages do case-insensitive
comparisons (which should stay, since <custom-ident> is case-sensitive)
or reuse the token/ident instead of only creating a CustomIdent.
Differential Revision: https://phabricator.services.mozilla.com/D184207