Skip to content

Commit

Permalink
[text-balance] Disable line cache if text-wrap: balance
Browse files Browse the repository at this point in the history
When parts of inline formatting context was changed, we try to
reuse existing fragments for lines above the change. When
`text-wrap: balance`, this should not apply, because lines
above the change may also be affected.

This patch disables the line cache in such case.

Fixed: 1421423
Change-Id: Ib4bb2b65838290940e713de6b09d725c7bb2931e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4314764
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Auto-Submit: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1114150}
  • Loading branch information
kojiishi authored and chromium-wpt-export-bot committed Mar 7, 2023
1 parent 6dd9e79 commit d4bad53
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<style>
#container {
width: 20ch;
text-wrap: balance;
}
span:hover {
color: red;
}
</style>
<div id="container">
123 567 901 345 789
123 567 901 345 789
123 567 901 345 789
999
</div>
21 changes: 21 additions & 0 deletions css/css-text/white-space/text-wrap-balance-dynamic-001.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<link rel="help" href="https://w3c.github.io/csswg-drafts/css-text-4/#valdef-text-wrap-balance">
<link rel="match" href="reference/text-wrap-balance-dynamic-001-ref.html">
<style>
#container {
width: 20ch;
text-wrap: balance;
}
span:hover {
color: red;
}
</style>
<div id="container">
123 567 901 345 789
123 567 901 345 789
123 567 901 345 789
</div>
<script>
document.body.offsetTop;
container.appendChild(document.createTextNode('999'));
</script>

0 comments on commit d4bad53

Please sign in to comment.