forked from mirrors/gecko-dev
Automatic update from web-platform-tests
Fix line cache when `-webkit-line-clamp` is specified
|NGBlockLayoutAlgorithm| has two branches, one when
|lines_until_clamp_| becomes |<= 0| by the layout, and another
when it is |== 0|.
To make sure we run all these logic, this patch:
* Updates |lines_until_clamp_| by the number of reused lines.
* Limits reusing only up to 1, so that conditions above go
normal layout codepath.
Bug: 1140951
Change-Id: I15fe81b4957fe70d23bb88aae700642297bb1550
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2491561
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819867}
--
wpt-commits: 97022d8af975e4f7612e58dbf56a8df93bf6c4d4
wpt-pr: 26229
28 lines
750 B
HTML
28 lines
750 B
HTML
<!DOCTYPE html>
|
|
<title>CSS Overflow: appending to a box with -webkit-line-clamp</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#webkit-line-clamp">
|
|
<link rel="match" href="reference/webkit-line-clamp-dynamic-001-ref.html">
|
|
<link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org">
|
|
<style>
|
|
#container {
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
font-size: 20px;
|
|
width: 10ch;
|
|
}
|
|
</style>
|
|
<body>
|
|
<div id="container">
|
|
abc def ghi jkl mno pqr stu vwx yz
|
|
</div>
|
|
<script>
|
|
testAppend();
|
|
function testAppend() {
|
|
document.body.offsetTop;
|
|
let span = document.createElement('span');
|
|
span.textContent = '123 456 789';
|
|
container.appendChild(span);
|
|
}
|
|
</script>
|
|
</body>
|