Files
firefox/testing/web-platform/tests/css/css-text/text-transform/math
Frédéric Wang fd8ea8c34d Bug 1843252 [wpt PR 41012] - Add tests for Selection.toString() and text-transform, a=testonly
Automatic update from web-platform-tests
Add tests for Selection.toString() and text-transform (#41012)

* Add tests for Selection.toString() and text-transform

This is a variation of the test added in [1] verifying how selection
works on the single char 'ß' with text-transform: uppercase. This is
special because the transformed text is 'SS' which has length 2. Instead
of using a reftest to check the rendered selection really spans the 2
characters, we use a JS test to directly check the returned value of
Selection.toString().

We generalize this approach to characters that are converted to their
italic equivalent via text-transform: math-auto. Note that for most of
them, the transformed text is a character in the Mathematical
Alphanumeric Symbols block, which is represented as a surrogate pair in
UTF-16. So it has length 2 as a UTF-16 string, although it's really
rendered as one character. The new approach works better than the reftest
approach in order to exhibit Chromium's bug 750990 [2].

A similar test is added for single-char <mi> elements, which perform
the same transformations as math-auto. That way it could work with
browsers implementing this MathML feature without relying on math-auto.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/2987819
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=750990

* Update mathvariant-transforms.py
--

wpt-commits: 97823484f33ffdcd85ebd4657af6433ad7c2c757
wpt-pr: 41012
2024-01-18 08:23:27 +00:00
..