Bug 1874611 [wpt PR 43987] - [text-spacing-trim] Implement line-end logic, a=testonly

Automatic update from web-platform-tests
[text-spacing-trim] Implement line-end logic

This patch implements the line-end logic of `text-spacing-trim`
by applying the kerning only if it would not fit, as per the
resolutions at:
* https://github.com/w3c/csswg-drafts/issues/9521
* https://github.com/w3c/csswg-drafts/issues/9736

Bug: 1463891
Change-Id: I7b5b2ae43f47ce13c6eaad55a973292e82cc264f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5191602
Auto-Submit: Koji Ishii <kojii@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1246972}

--

wpt-commits: 05918d61fbde7aee1ffaf7211be717eed86f6c5a
wpt-pr: 43987
This commit is contained in:
Koji Ishii 2024-01-15 16:45:37 +00:00 коммит произвёл moz-wptsync-bot
Родитель f72dfd12b0
Коммит 7d2411f09e
2 изменённых файлов: 53 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE html>
<meta charset="utf-8">
<script src="support/variant-class.js"></script>
<style>
@font-face {
font-family: halt-font;
src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt.otf');
}
#container {
font-family: halt-font;
font-size: 20px;
}
.vrl {
writing-mode: vertical-rl;
}
</style>
<div id="container">
<div>国国国)<br>国国国)</div>
</div>

Просмотреть файл

@ -0,0 +1,34 @@
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-spacing-trim-property">
<link rel="match" href="text-spacing-trim-end-001-ref.html">
<script src="support/variant-class.js"></script>
<meta name="variant" content="?class=halt,htb">
<meta name="variant" content="?class=chws,htb">
<meta name="variant" content="?class=halt,vrl">
<meta name="variant" content="?class=chws,vrl">
<style>
@font-face {
font-family: halt-font;
src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt.otf');
}
@font-face {
font-family: chws-font;
src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-chws.otf');
}
#container {
font-family: halt-font;
font-size: 20px;
inline-size: 3.6em;
text-spacing-trim: trim-start;
}
.chws #container {
font-family: chws-font;
}
.vrl {
writing-mode: vertical-rl;
}
</style>
<div id="container">
<div>国国国)国国国)</div>
</div>