зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1823108 [wpt PR 39064] - Fix a TextIterator crash in Greek text-transform, a=testonly
Automatic update from web-platform-tests Fix a TextIterator crash in Greek text-transform CSS text-transform can change text length in either ways, resulting in more or fewer characters in LayoutText. The former case is more well known and has been largely worked around. Now that we see the latter case being possible, this patch works around it in TextIterator to avoid reaching a NOTREACHED(). Fixed: 1424324 Bug: 750990 Change-Id: I4b8ba886bcacc06e9e491badb30af98d0f22c37c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4351287 Reviewed-by: Koji Ishii <kojii@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Auto-Submit: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/main@{#1119018} -- wpt-commits: ceb972b009e1b43c589dce3f36b050121493d2e0 wpt-pr: 39064
This commit is contained in:
Родитель
0d52704118
Коммит
f3b1dbb880
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text Test: text-transform uppercase Greek acute diaeresis iota and selection</title>
|
||||
<link rel="author" href="mailto:xiaochengh@chromium.org">
|
||||
<style>
|
||||
#target {
|
||||
color: white;
|
||||
background: red;
|
||||
}
|
||||
#target::selection {
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>The test passes if you see red below (by selecting the first letter only).</p>
|
||||
|
||||
<span id="target" lang="el">ΪΡ</span>
|
||||
|
||||
<script>
|
||||
window.getSelection().setBaseAndExtent(target.firstChild, 0, target.firstChild, 2);
|
||||
</script>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text Test: text-transform uppercase Greek acute diaeresis iota and selection</title>
|
||||
<link rel="author" href="mailto:xiaochengh@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text/#propdef-text-transform">
|
||||
<link rel="match" href="reference/text-transform-upperlower-106-ref.html">
|
||||
<meta name="assert" content="text-transform: uppercase will uppercase the Greek acute diaeresis iota by removing acute, and the rendered character is selectable.">
|
||||
<style>
|
||||
#target {
|
||||
text-transform: uppercase;
|
||||
color: white;
|
||||
background: red;
|
||||
}
|
||||
#target::selection {
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>The test passes if you see red below (by selecting the first letter only).</p>
|
||||
|
||||
<span id="target" lang="el">Ϊ́Ρ</span>
|
||||
|
||||
<script>
|
||||
window.getSelection().setBaseAndExtent(target.firstChild, 0, target.firstChild, 3);
|
||||
</script>
|
Загрузка…
Ссылка в новой задаче