forked from mirrors/gecko-dev
Automatic update from web-platform-tests [LayoutNG] Add tests for text-overflow: ellipsis with scrolling These set of tests pass in Firefox but not in Chromium. They check what happens when you scroll an element with "text-overflow: ellipsis", right now in Chromium the rest of the content of the element is not visible at all (once truncated the text ellipsis is not moved). The solution would be to force a relayout during scrolling but it seems we prefer to keep current behavior to avoid performance issues on scrolling. The behavior is not mandatory according Both behaviors are allowed in the spec, so the tests are marked with the "should" flag: https://drafts.csswg.org/css-overflow/#ellipsis-scrolling Bug=745905 TEST=external/wpt/css/css-overflow/text-overflow-scroll-001.html TEST=external/wpt/css/css-overflow/text-overflow-scroll-rtl-001.html TEST=external/wpt/css/css-overflow/text-overflow-scroll-vertical-lr-001.html TEST=external/wpt/css/css-overflow/text-overflow-scroll-vertical-lr-rtl-001.html TEST=external/wpt/css/css-overflow/text-overflow-scroll-vertical-rl-001.html TEST=external/wpt/css/css-overflow/text-overflow-scroll-vertical-rl-rtl-001.html Change-Id: I975ca86dbdfedf92875c08736539fb2f33f68c54 Bug: 745905 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2113495 Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#753508} -- wpt-commits: 86103a7fabf985763c122276a67615da0ced4b3c wpt-pr: 22388
39 lines
1.4 KiB
HTML
39 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html class="reftest-wait">
|
|
<meta charset="utf-8">
|
|
<title>CSS Overflow: text-overflow: ellipsis and scrolling vertical-rl RTL</title>
|
|
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
|
|
<link rel="help" href="https://drafts.csswg.org/css-overflow-4/#ellipsis-scrolling">
|
|
<link rel="match" href="reference/text-overflow-scroll-vertical-lr-rtl-001-ref.html">
|
|
<meta name="flags" content="should">
|
|
<meta name="assert" content="If you scroll an element with 'text-overflow: ellipsis', the ellipsis should move to the new position. This should work in vertical-rl writing mode and RTL too.">
|
|
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
|
<style>
|
|
div {
|
|
display: inline-block;
|
|
writing-mode: vertical-rl;
|
|
font: 100px/1 Ahem;
|
|
white-space: pre;
|
|
height: 400px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
direction: rtl;
|
|
}
|
|
</style>
|
|
|
|
<p>The test passes if it matches the reference.</p>
|
|
|
|
<div id="test1">ppp pp p</div>
|
|
<div id="test2">ppp pp p</div>
|
|
<div id="test3"><span style="padding-inline-start: 400px;">ppp pp p</span></div>
|
|
<div id="test4"><span style="padding-inline-start: 600px;">ppp pp p</span></div>
|
|
|
|
<script>
|
|
requestAnimationFrame(() => requestAnimationFrame(() => {
|
|
test1.scrollTop = -200;
|
|
test2.scrollTop = -400;
|
|
test3.scrollTop = -200;
|
|
test4.scrollTop = -1000;
|
|
document.documentElement.className = "";
|
|
}));
|
|
</script>
|