commit | b26a84e991c88ed62030f9bc247cb10c65c77440 | [log] [tgz] |
---|---|---|
author | Frédéric Wang <fwang@igalia.com> | Thu Aug 26 04:38:29 2021 |
committer | Blink WPT Bot <blink-w3c-test-autoroller@chromium.org> | Thu Aug 26 04:50:32 2021 |
tree | eb5510c2676a9d96cd769d150050b6053c31561c | |
parent | e422ed37b639312c95feb2c90dea61e6de60f53a [diff] |
[mathml] Refine definition of embellished operators In [1], basic logic was added to prepare support for embellished operators [2]. For example in a LaTeX expression like $u +_V v$, which may be represented in MathML as <math> <mi>u</mi> <msub><mo>+</mo><mi>V</mi></msub> <mi>v</mi> </math> the spacing around the operators should be put around the whole embellished operator "+ subscript V". Similar behavior is expected for other operator properties. In [1], only <mo> elements were considered embellished operators. This CL extends it to the full definition from MathML Core but considering only <mtext> and <mspace> as space-like for now [3]. Together, these two CLs add special handling of properties lspace, rspace and movablelimits with embellished operators. Supporting other operator properties (e.g. stretchy) and refining the definition of space-like will happen in follow-up CLs. MathML Core's definition is based on MathML 3 and is still relatively complex. Determining whether an element is an embellished operator and retrieving the property of the core operator has bad worst-case complexity but it should be fine in practice [4]. An alternative would be to cache these properties somewhere in our trees for fast access but it does not seem worth adding that extra complexity for existing use cases. Finally, now that mrow-like elements can be embellished operators, this CL refines the row layout algorithm so that spacing is added around operator children only if the element being laid out is the <math> root or is not itself an embellished operator [5]. This basically addresses the use case of expressions like <math> <mi>u</mi> <mrow><mo>+</mo></mrow> <mi>v</mi> </math> where the operator spacing should be added during the layout of the <math> element, not during the one of the <mrow> element. This CL improves pass rate for existing WPT tests checking embellished operator support. Testing is essentially based on lspace/rspace spacing around embellished operators, as calculated by DetermineOperatorSpacing. mo-movablelimits-and-embellished-operator.html is added to verify the case of IsUnderOverLaidOutAsSubSup. This covers the combination of the change here and in [1]. [1] https://chromium-review.googlesource.com/c/chromium/src/+/3059616 [2] https://w3c.github.io/mathml-core/#embellished-operators [3] https://w3c.github.io/mathml-core/#dfn-space-like [4] https://github.com/w3c/mathml/issues/115 [5] https://w3c.github.io/mathml-core/#layout-of-mrow Bug: 6606, 1124298 Change-Id: I30214e6fadfe4f7deb35b1ebffbc40dbe5023e95 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3059456 Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Commit-Queue: Frédéric Wang <fwang@igalia.com> Cr-Commit-Position: refs/heads/main@{#915472}
The web-platform-tests Project is a cross-browser test suite for the Web-platform stack. Writing tests in a way that allows them to be run in all browsers gives browser projects confidence that they are shipping software that is compatible with other implementations, and that later implementations will be compatible with their implementations. This in turn gives Web authors/developers confidence that they can actually rely on the Web platform to deliver on the promise of working across browsers and devices without needing extra layers of abstraction to paper over the gaps left by specification editors and implementors.
The most important sources of information and activity are:
wpt:matrix.org
matrix channel; includes participants located around the world, but busiest during the European working day.If you'd like clarification about anything, don't hesitate to ask in the chat room or on the mailing list.
Clone or otherwise get https://github.com/web-platform-tests/wpt.
Note: because of the frequent creation and deletion of branches in this repo, it is recommended to “prune” stale branches when fetching updates, i.e. use git pull --prune
(or git fetch -p && git merge
).
See the documentation website and in particular the system setup for running tests locally.
The wpt
command provides a frontend to a variety of tools for working with and running web-platform-tests. Some of the most useful commands are:
wpt serve
- For starting the wpt http serverwpt run
- For running tests in a browserwpt lint
- For running the lint against all testswpt manifest
- For updating or generating a MANIFEST.json
test manifestwpt install
- For installing the latest release of a browser or webdriver server on the local machine.wpt serve-wave
- For starting the wpt http server and the WAVE test runner. For more details on how to use the WAVE test runner see the documentation.On Windows wpt
commands must be prefixed with python
or the path to the python binary (if python
is not in your %PATH%
).
python wpt [command]
Alternatively, you may also use Bash on Ubuntu on Windows in the Windows 10 Anniversary Update build, then access your windows partition from there to launch wpt
commands.
Please make sure git and your text editor do not automatically convert line endings, as it will cause lint errors. For git, please set git config core.autocrlf false
in your working tree.
The master branch is automatically synced to wpt.live and w3c-test.org.
Save the Web, Write Some Tests!
Absolutely everyone is welcome to contribute to test development. No test is too small or too simple, especially if it corresponds to something for which you've noted an interoperability bug in a browser.
The way to contribute is just as usual:
git checkout -b topic
../wpt lint
as described above.If you spot an issue with a test and are not comfortable providing a pull request per above to fix it, please file a new issue. Thank you!