Closed Bug 2094450 Opened 11 days ago Closed 8 days ago

[wpt-sync] Sync PR 64933 - [ruby] Wrap <ruby> after a preserved space instead of overflowing

Categories

(Core :: Layout: Ruby, task, P4)

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 64933 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/64933
Details from upstream follow.

Gleb Mazovetskiy <glebm@google.com> wrote:

[ruby] Wrap <ruby> after a preserved space instead of overflowing

With white-space: pre-wrap or break-spaces, a \<ruby> that doesn't
fit after a space stays on the line and overflows the container. A
plain word, or the same ruby with white-space: normal, wraps at the
space.

Each ruby column starts with a bidi isolate control character.
CanBreakAfter() already skips it, but it asks the break iterator about
the position after the control character, and the line breaking rules
don't allow a break there. This CL removes the control characters from
the text and asks about the position right after the space, the same
way CanBreakAfterRubyColumn() does.

Text that ends a ruby column keeps the old behavior. Otherwise a
collapsible space between \</rt> and \</ruby> gains a break
opportunity, which breaks css-multicol/multicol-fill-balance-031.html.

The change is behind the RubySoftWrapAfterPreservedSpace runtime flag.

Test: blink_unittests --gtest_filter=LineBreakerTest.Ruby*
Test: external/wpt/css/css-ruby/line-break-around-ruby-preserved-space.html
Bug: 580840306
Change-Id: I16082ae8dcd73a85f7287928524d00ac16c38fb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8700341
Reviewed-by: Koji Ishii \<kojii@chromium.org>
Commit-Queue: Kent Tamura \<tkent@chromium.org>
Reviewed-by: Kent Tamura \<tkent@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1738805}

Component: web-platform-tests → Layout: Ruby
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 9 subtests

Status Summary

Firefox

OK : 1
PASS: 8
FAIL: 1

Chrome

OK : 1
PASS: 5
FAIL: 4

Safari

OK : 1
PASS: 9

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 8 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.