forked from mirrors/gecko-dev
Automatic update from web-platform-tests [LayoutNG] Keep trucated fragments for `text-overflow: ellipsis` This patch keeps truncated fragments for `text-overflow: ellipsis` as "hidden for paint", but still uses them for when querying layout information such as `offsetWidth` or editing. Bug: 947593, 978392 Change-Id: Ic9d6888728339dc3ea37672b1ba004cddd295216 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1678915 Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Emil A Eklund <eae@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#673777} -- wpt-commits: 424e3bce2245105a515ba8f5d97e6852bb69e973 wpt-pr: 17588
26 lines
828 B
HTML
26 lines
828 B
HTML
<!DOCTYPE html>
|
|
<title>Ellipsizing should not affect `offsetWidth` of inline boxes.</title>
|
|
<link rel="author" href="kojii@chromium.org">
|
|
<link rel="help" href="https://crbug.com/978392">
|
|
<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>
|
|
#ellipsis {
|
|
width: 50px;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
}
|
|
</style>
|
|
<body>
|
|
<div id="normal"><span>This is a test text.</span></div>
|
|
<div id="ellipsis"><span>This is a test text.</span></div>
|
|
<script>
|
|
test(() => {
|
|
let normal_child = normal.firstElementChild;
|
|
let ellipsis_child = ellipsis.firstElementChild;
|
|
assert_equals(normal_child.offsetWidth, ellipsis_child.offsetWidth);
|
|
});
|
|
</script>
|
|
</body>
|