Bug 1647086 [wpt PR 24265] - Initialize text_offset for layout-generated text items, a=testonly
authorKoji Ishii <kojii@chromium.org>
Mon, 22 Jun 2020 10:45:39 +0000
changeset 600945 0e973f98258515a9640d3bd9569d7e672c7120ff
parent 600944 1e94519c3c73dc46f61080e6f93bcccbd3fc5ec1
child 600946 7ca3d4bada7371ff782a50f74a29126ad050a38a
push id13310
push userffxbld-merge
push dateMon, 29 Jun 2020 14:50:06 +0000
treeherdermozilla-beta@15a59a0afa5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1647086, 24265, 2230583, 1097042, 2256100, 780609
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
testing/web-platform/tests/css/css-ui/text-overflow-ellipsis-hyphen.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/text-overflow-ellipsis-hyphen.html
@@ -0,0 +1,19 @@
+<!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>