As taking timestamps can be expensive on certain devices we should try
to avoid taking them where possible. This patch fixes a few occasions
where we take a timestamp solely for a profiler marker even when the
current thread is not being profiled.
Differential Revision: https://phabricator.services.mozilla.com/D185008
These telemetry probes have long since expired, so remove them. This
avoids taking unnecessary timestamps in these functions, which we have
seen can be expensive on certain devices.
Differential Revision: https://phabricator.services.mozilla.com/D185007
Implemented the new <search> HTML element.
All WPT tests for it now pass (except one for iso-8859-8, not done generally).
A11y role uses just landmark as recommended instead of a new search role (for now).
Co-authored-by: Henri Sivonen <hsivonen@mozilla.com>
Differential Revision: https://phabricator.services.mozilla.com/D176967
Also update offset-path-url-001.html because it seems its ref html is
incorrect per the spec. We are using its `<coord-box>` (i.e. the reference box
of its containing block) as the viewport and user coordinate system, so its
offset-starting-position should be independent from its current position
from CSS reflow. The SVG shape element always provides the offset starting
position.
So I tweak offset-path-url-001.html a little bit to make it passed for all
browsers, and add some other tests to cover the case mentioned above and
other cases.
Differential Revision: https://phabricator.services.mozilla.com/D184431
Per https://drafts.fxtf.org/motion/#path-distance, we follow these rules
when `offset-path` references to a SVG shape:
1. Offset paths (including references to SVG Paths) are closed loops only if
the final command in the path list is a closepath command ("z" or "Z"),
otherwise they are unclosed intervals.
2. References to SVG circles, ellipses, images, polygons and rects are closed
loops.
3. References to SVG lines and polylines are unclosed intervals.
Also, rename `mIsClosedIntervals` as `mIsClosedLoop` to be consistent.
Differential Revision: https://phabricator.services.mozilla.com/D184430
In layout, we build a default `path("m 0 0")` for now. We will implement
it later.
Besides, we don't support compositor animations for `url()`, so we don't
have to serialize it for IPC.
Note:
`<url>` includes `url()` and `src()`. For now we only support `url()`.
We should revisit `src()` in Bug 1845390.
Differential Revision: https://phabricator.services.mozilla.com/D184429
Right now, when binding to the tree we queue a runnable to update the
stylesheet, even though mEnableUpdates is false.
Even though the redundant update is nowadays always cached, it's just
wasted work, and the code is simpler without it.
This will be tested by bug 1771113, which is what made me look at this.
We need to tweak a bit the dispatch of applicable state change events
for DevTools, because for a case like:
div.attachShadow({ mode: "open" }).innerHTML = `<style>...</style>`;
Before we'd go through the stylesheet cache here due to the redundant
update:
https://searchfox.org/mozilla-central/rev/fb43eb3bdf5b51000bc7dfe3474cbe56ca2ab63c/layout/style/SharedStyleSheetCache.cpp#161-165
But now we won't, and the code in StyleSheet.cpp wasn't quite correct /
didn't dispatch the event.
Nobody listens to style-sheet-applicable-state-changed, so remove that
code while at it.
Differential Revision: https://phabricator.services.mozilla.com/D185559
Implemented the new <search> HTML element.
All WPT tests for it now pass (except one for iso-8859-8, not done generally).
A11y role uses just landmark as recommended instead of a new search role (for now).
Co-authored-by: Henri Sivonen <hsivonen@mozilla.com>
Differential Revision: https://phabricator.services.mozilla.com/D176967
Implemented the new <search> HTML element.
All WPT tests for it now pass (except one for iso-8859-8, not done generally).
A11y role uses just landmark as recommended instead of a new search role (for now).
Co-authored-by: Henri Sivonen <hsivonen@mozilla.com>
Differential Revision: https://phabricator.services.mozilla.com/D176967
This comes back all the way to bug 654411. This doesn't work great with
semi-transparent backgrounds (like the one on that theme) because we
don't bother computing the "real" background (we can't really, since
it's partially a background image).
I don't think text rendering quality should be worse with alpha text
nowadays. I guess we could preserve it with some effort for opaque
mFrameBackgroundColor values (propagating whether it was really opaque
or not), but let's not do it unless we really need to.
Differential Revision: https://phabricator.services.mozilla.com/D185512
We've already known that `WidgetQueryContentEvent` is dispatched at initializing
a popup menu on macOS (bug 1530188). Therefore, I made the dispatcher under
`widget/cocoa` set `WidgetQueryContentEvent::mNeedLayoutFlush` to `false` to
avoid to flush pending things in `ContentEventHandler`, but
`PresShell::EventHandler` does it.
Differential Revision: https://phabricator.services.mozilla.com/D185264
The warning message for deprecated math space values is tweaked a bit so
that the actual attribute value that triggered it is reported. This
provides correct message for 'negative*mathspace' values.
test_bug1845461.html, test_bug553917.html and test_bug827713-2.html are
rewritten as an internal testharness WPT test, with the following
modifications:
* Preferences are forced in the ini file, avoiding issues that happened
in the past due to inconsistent values for Nightly and Beta.
dom.use_components_shim is set to prevent the deprecation message for
the Components object and confuse the test (bug 1845910).
legacy_mathvariant_attribute and mathspace_names are disabled to
to properly test deprecated mathvariant and math space values.
* Console messages are triggered inside an iframe, allowing to test
multiple source codes for the same deprecation warning. In particular,
all mathvariant and named space values are now tested.
* Helper testMessageForMarkup/testNoMessageForMarkup functions are
introduced to easily test some markup and improve readability.
The expected message is provided as a regexp argument for more
flexibility and severity level (error or warning) is verified.
* It's not clear why the tests for InvalidChild don't test msup or why
they use this specific number of children. Keep them but add new ones
for msub/msub/msubsup with the usual number of children.
Differential Revision: https://phabricator.services.mozilla.com/D185399
Now the default of a color is the modern syntax and converting to legacy
syntax is very explicit.
AbsoluteColor::new can now take u8, f32 and Option<f32> as component
arguments and the flags will be set automagically.
Differential Revision: https://phabricator.services.mozilla.com/D184685
The tests exported in this patch use complex embellished operators and
verify whether or not the operator stretches. To avoid relying on
systems fonts and make the visual rendering more reliable, we use the
Ahem font for text as well as operators.woff for stretchy operators.
stretchy-mover-2a.html is currently failing so we preserve this
annotation. Some unrelated alignment issue were happening with
stretchy-mover-1a/b, which are worked around by wrapping the <math>
tag in a container div.
Differential Revision: https://phabricator.services.mozilla.com/D185308
* opentype-axis-height.html: This is verifying Gecko's special behavior
to calculate fallback for AxisHeight fallback
(see nsMathMLFrame::GetAxisHeight) but that's not part of MathML
Core so keep it as an internal testharness test.
* opentype-limits.html: This is verifying the Gecko's interpretation
of AccentBaseHeight / accent property, which is different from
MathML Core so keep it as an internal testharness test. Remove
failure for Win XP, which we no longer support.
* opentype-fraction-dynamic-linethickness: Remove since that's covered
by mathml/presentation-markup/fractions/frac-parameters-2.html
* dtls-*: Tests for the dtls OpenType feature, which are not part of
MathML Core.
* ssty-*, mathscript-*: Tests for the ssty OpenType feature, which are
not part of MathML Core.
* default-font.html: This is testing Gecko's x-math preferences, so keep
it as internal test.
* font-inflation-1.html: This is testing Gecko's font inflation feature,
so keep it as internal test.
* opentype-stretchy.html: There are similar testharness tests in the
official WPT but this reftest additionally checks the painting of
stretchy/largeop. It's also possible that the
DisplayOperatorMinHeight test specifically checks Gecko's
handling of integrals which is not part of MathML Core
(see https://github.com/w3c/mathml-core/issues/126). For now, just
keep this as internal WPT test. Mark it as random on all Windows
platform as there does not seem to be an equivalent for 2d2.
Differential Revision: https://phabricator.services.mozilla.com/D185291
* whitespace-trim-*: These tests are testing whitespace trimming in
token elements but that's not described in MathML Core. Move them
into internal WPT tests.
* table-width-1,2,3,4: These tests verify that the intrinsic width
is properly calculated so that MathML content don't overflow in
tables. One of them is related to whitespace trimming, so
extract it to internal WPT test.
* test_bug330964.html: Convert this to a testharness test and
move it into internal WPT test (this is testing mtable
attributes that are not part of MathML Core).
* semantics-4: Restore the original testcase and move it into
internal WPT test with a failure annotation for now (as written
it uses mtable@width attribute which is not part of MathML Core
anyway). For details, see bug 1846930.
* dir-6a: This was introduced in bug 330964 and involves table
attributes that are not part of MathML Core.
* css-spacing-1.html: This was introduced by bug 1187673 but is already
covered by default-properties-on-the-math-root.html.
* columnlines/rowlines: Tests for columnlines/rowlines attributes that
are not part of the current version of MathML core. Move them to
mozilla/tests/mathml/tables. Use Ahem for rowlines/columnlines-3*
to make them more robust per bug 1309426.
* mstyle-2: extract the case for mtable@align test to internal
WPT mstyle-align.html since align is not part of MathML Core.
Differential Revision: https://phabricator.services.mozilla.com/D185270
As a bonus we now can throttle some additive and visibility animations
more properly, because before we couldn't compute a change hint for
those but now we don't need to.
Differential Revision: https://phabricator.services.mozilla.com/D185175
* dir-1: Ignore mfenced (no longer implemented) and move the remaining
case not tested by direction-overall.html into direction-mpadded.html
This seems complementary to the RTL test in mpadded-003.html
* link-1: We removed support for XLink in MathML. This is actually
testing non-XLink href, removed unnecessary XLink stuff.
* mstyle-1: We removed support for all these attributes except
linethickness, already covered by legacy-mstyle-attributes.html
* mstyle-2: We removed support for maction.
* mstyle-3: We removed support for nonzero unitless values, use
equivalent length expression.
* mstyle-5: We removed support for lquote/rquote.
* table-width-1: Remove test for mfenced (no longer implemented).
* semantics-1: We removed support for maction.
* ssty3/ssty4: These tests were removed in bug 1788637 but the
references were incorrectly left.
* opentype-stretchy.html: Was likely using scriptminsizemultiplier="1"
to make the test more robust, but unshipping support for this
attribute didn't affect the test.
* mathml_example_test.html: Ditto.
* mfrac-D-2.html: We removed support for linethickness="thin", use
another valid value different to the one set by JS.
* number-size: We removed support for non-zero unitless values.
Already covered by mathml/relations/css-styling/lengths-1.html
* mfrac-linethickness{1,2,3}: We removed support for
non-zero unitless values. Move uncovered tests into
presentation-markup/fractions/frac-linethickness-001.html
frac-linethickness-002.html also checks negative values,
but Firefox does not align with MathML Core (bug 1846718).
* munderover-align-accent-false.html: We removed support for
munderover@align. This was using the default "center" value
and had no effect.
* scriptshift-1: We removed support for subscriptshift and
superscriptshift. Already covered by
subsup-legacy-scriptshift-attributes-001.tentative.html
Differential Revision: https://phabricator.services.mozilla.com/D185146
This patch exports internal reftests for the menclose element to
mozilla/tests/mathml/menclose with basic tweaks (whitespace fix,
MozReftestInvalidate replacement, adding <link> meta). See more details
below. A README.md is also created for the internal MathML WPT tests.
* dir-2: This verifies that menclose notations are not affected by
directionality. Move it with a better name.
* mstyle-1: One case verifies that the notation attribute on mstyle has
no effect on menclose. Extract it into a new test.
* mphantom-1: One case verifies that menclose notations inside mphantom
are not visible. Extract it into a new test.
* menclose-2*: These tests verify that each individual notation is
painted in a restricted area covered by some SVG or CSS drawing
(lines, ellipses, boxes, etc). They are currently marked as random
or fuzzy due to the use of different fonts (bug 1309426). Tweak them
to use Ahem and more reliable drawing.
* menclose-5/menclose-6: These tests verify the rendering of
dynamically modified notation attribute against a static reference.
Tentatively remove the fuzzy annotations for some of them.
Note for sheriffs: If the one the menclose-{2,5,6} fail, they should
be annotated as fuzzy.
Differential Revision: https://phabricator.services.mozilla.com/D185127
414123.xhtml: The original test was checking that for dynamically
constructed MathML expressions, single-char '<mi>'s have italic style
applied. This used to be done via CSS but the test was later changed to
use `<mi mathvariant="italic">`. mathvariant="italic" is not longer
valid in MathML Core, so remove this explicit attribute and only verify
that dynamically constructed expression matches the static version of
the MathML tree. Also rename the test and move it to MathML WPT tests.
mi-mathvariant-1: The first test is verifying that multi-char mi is
rendered the same as mathvariant="normal". The second test is to verify
that single-char mi is rendered the same as mathvariant="italic"
(not in MathML Core) but there are better existing tests for that so
just tweak the reference to ignore it (using U+0078 in the reference
won't work on Android devices without proper math fonts).
mi-mathvariant-2: The two first tests verify that automatic italic is
not applied on U+221E and U+210E. The third test verifies fraktur B via
mathvariant="fraktur" (not in MathML Core) and is already covered by
mozilla/tests/mathml/mathvariant/mathvariant-fraktur.html
mi-mathvariant-3.html: This one is testing that single-char mi
(automatic italic) are not rendered with Tofu characters. This is very
similar to basic-mathematical-alphanumeric-symbols-with-default-font so
put it in the same directory and use similar name. It's still worth to
keep the test as it allows to exercise the preference
mathml.mathvariant_styling_fallback.disabled=false on Android.
mpadded-7,8,9: These tests are for mpadded, the use of the legacy
mathvariant="monospace" can be replaced with the equivalent use of the
corresponding Unicoded code points.
mathvariant-1a,1b,1c,1d,2,3,4,5: These are testing support for the
mathvariant attribute values that are not in MathML Core so move them
to testing/web-platform/mozilla/tests/mathml/mathvariant/. Keep the
failure expectation for Android (bug 1010679). The one for windows
(bug 1392106) seems to have been removed already.
table-width-4.html: Some tests are using legacy mathvariant values but
running with support disabled. Equivalent tests using corresponding
Unicode code points are provided in the same file.
whitespace-trim-3.html: This is using legacy mathvariant="italic" but
running with support disabled. It's done on single-char mi so the
attribute is useless anyway.
font-inflation-1.html: This is using legacy mathvariant="fraktur" but
should be equivalent to using the corresponding Unicode character.
dtls-3.html: This is similar to the other dtls tests, but using the
fraktur a instead of normal a. However, it's also specifically
checking update when mathvariant attribute is attached/removed so keep
it without change for now.
Differential Revision: https://phabricator.services.mozilla.com/D185033