fune/testing/web-platform/tests/css/css-ui/text-overflow-ellipsis-hyphen.html
Koji Ishii 0aaced1c0c Bug 1647086 [wpt PR 24265] - Initialize text_offset for layout-generated text items, a=testonly
Automatic update from web-platform-tests
Initialize text_offset for layout-generated text items

|NGLogicalLineItem::text_offset| is not used for layout-
generated text items, but |NGLineTruncator| may try to
truncate it in some edge cases since r779756
<crrev.com/c/2230583>.

This patch initializes |text_offset| for such items to
avoid accidental reads. Trying to truncate hyphens is not
correct, but this will be in future patches.

Bug: 1097042
Change-Id: Ife1f4def3568e387a17422c547e676dd2d88dac1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2256100
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780609}

--

wpt-commits: 40724da33edf9653287985ff4f7b226ce60a0097
wpt-pr: 24265
2020-06-23 11:04:48 +00:00

19 lines
503 B
HTML

<!DOCTYPE html>
<title>Ellipsizing hyphens should not crash</title>
<link rel="author" href="kojii@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#ellipsing-details">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
div {
width: 0.1ch;
text-overflow: ellipsis;
overflow: hidden;
}
</style>
<body>
<div dir="rtl">12345&shy;999</div>
<script>
test(() => {}, 'No crash or DCHECK failure');
</script>
</body>