Skip to content

Commit

Permalink
RubyLB: Support breaking in HandleOverflow()
Browse files Browse the repository at this point in the history
* The intrinsic inline-size of a ruby column fits in the available
  space of the current line,
* There is no soft break opportunity at the end of the ruby column, and
* The following text exceeds the available space.

If the above conditions met, the entire ruby column was rewound though
it has soft break opportunities.

This CL supports breaking at the last soft break opportunity inside
the ruby column.

Bug: 324111880
Change-Id: Ia40ba37d552fae8f411834a7a1288a285cff9202
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5569799
Commit-Queue: Koji Ishii <[email protected]>
Auto-Submit: Kent Tamura <[email protected]>
Reviewed-by: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1306306}
  • Loading branch information
tkent-google authored and chromium-wpt-export-bot committed May 27, 2024
1 parent e158060 commit dba739b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<meta charset="utf-8">
<style>
div {
font-size: 20px;
}
</style>

<body lang="ja">
<div>
ここは<ruby>優先通行<rt>ゆうせんつうこう</ruby><br><ruby><rt>たい</ruby>
</div>
</body>
19 changes: 19 additions & 0 deletions css/css-ruby/break-within-bases/no-break-opportunity-at-end.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="help" href="https://drafts.csswg.org/css-ruby/#break-within">
<link rel="match" href="no-break-opportunity-at-end-ref.html">
<style>
div {
width: 160px;
font-size: 20px;
}
</style>

<body lang="ja">

<!-- The ruby fits in the first line, but we can not break
the line at its end because of the following "。". -->
<div>
ここは<ruby>優先通行帯<rt>ゆうせんつうこうたい</ruby>
</div>
</body>

0 comments on commit dba739b

Please sign in to comment.