[text-autospace] Adopt UTR#59
This patch changes the `text-autospace` to use [UTR#59] as per
the CSS WG resolution.
This means that the previous optimizations no longer apply.
To avoid the performance hit, this patch has two new
optimizations.
1. Uses `MayNeedEastAsianSpacing` to filter unapplicable text.
2. After that, the `InlineTextAutoSpace::Apply` runs. It must
do, at least:
a. Iterate all code points.
b. Compute the `EastAsianSpacingType` for each code point.
This patch does as little things as possible other than
above two, when there are no Wide code points.
When the flag is enabled, no visible impact to the
Speedometer3 score is observed. The Layout microbenchmarks are
a bit noisy; 2/4 runs are neutral, while 2 are mixed.
Note that not all old code were removed yet. They will be in
following patches.
[UTR#59]: https://unicode.org/reports/tr59/
Bug: 40275399
Change-Id: I8c482a62594795f297d758d464efcd87fadd74a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6572353
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1465954}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.