Files
shinyobjectz 85beee43c6 text-autospace's initial value is no-autospace, as Chrome's and Gecko's are (closes #44). raea's stylo enabled text-autospace for Servo (for parley's layout/autospace.rs) with an initial value of normal, so every page without the property got Chrome's ideograph-alpha/ideograph-numeric spacing anyway: "2026년" at 48px sans-serif drew 6 px wider unstyled than with text-autospace: no-autospace. Chrome 148 draws the unstyled line as no-autospace and only text-autospace: normal wider. The initial value is now NO_AUTOSPACE (vendor/stylo longhands.toml); parley's comments said Chrome's initial was normal and now say what it is.
bench/text-autospace/check.sh draws three "2026년" lines (unstyled, normal, no-autospace) and finds where each line's ink ends. The unstyled line must end where no-autospace's does, and normal's 5-7 px further right. The raea before this ends them at 202/202/196 and fails, the raea with it at 196/202/196 and passes; Chrome 148 ends them at 184/190/184 (a different sans-serif, the same 6 px). WPT css-text --only text-autospace: 13 of 26 pass before and after, the same tests.

fps, the same 120-frame text-autospace page back to back, three runs each: 4.3, 3.3, 3.9 ms a frame before, 3.7, 3.5, 4.3 after (about 260 fps both).

Upstream candidate: stylo's text-autospace is Gecko-only upstream; enabling it for Servo would need this initial value.
2026-11-08 02:07:51 -08:00

18 lines
855 B
HTML

<!doctype html>
<!-- #44: text-autospace's initial value is no-autospace, as Chrome's is: an unstyled "2026년" is drawn tight, as with
no-autospace, and only text-autospace: normal puts 1/8 em (6 px at 48 px) between the digits and the Hangul.
Chrome 148: getComputedStyle(body).textAutospace is "no-autospace", and the three lines measure 148.31, 154.31
and 148.31 px wide. check.sh compares where each line's ink ends. -->
<meta charset="utf-8">
<style>
body { margin: 0; background: #fff; color: #000; font: 48px sans-serif; }
div { height: 80px; padding-left: 20px; }
</style>
<body>
<div data-composition-id="main" data-start="0" data-duration="1" data-width="320" data-height="240">
<div>2026년</div>
<div style="text-autospace: normal">2026년</div>
<div style="text-autospace: no-autospace">2026년</div>
</div>
</body>