-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
layout: Linebreak the entire InlineFormattingContext at once #32483
Conversation
🔨 Triggering try run (#9485659762) for Linux WPT |
Test results for linux-wpt-layout-2020 from try job (#9485659762): Flaky unexpected result (17)
Stable unexpected results that are known to be intermittent (11)
Stable unexpected results (54)
|
|
f36a150
to
9d627a9
Compare
🔨 Triggering try run (#9496542933) for Linux WPT |
A large portion of the unexpected results is that the linebreaker no longer seems to be putting a soft line break opportunity after the zero-width joiner. This causes the Arabic ('ع') character to render differently when it's shaped together with a zero-width joiner and no followup character. This happens in tests because the character that it is supposed to join with is in a different inline box and we do not shape across inline box boundaries. So, in summary, changes in the line breaker are causing tests that were passing by accident to start failing, when they should have been failing all along. |
Test results for linux-wpt-layout-2020 from try job (#9496542933): Flaky unexpected result (17)
Stable unexpected results that are known to be intermittent (13)
Stable unexpected results (43)
|
|
Instead of linebreaking inside each single-font text segment, linebreak the entire inline formatting context at once. This has several benefits: 1. It allows us to use `icu_segmenter` (already in use from style), which is written against a newer version of the Unicode spec -- preventing breaking emoji clusters. 2. Opens up the possibility of changing the way that linebreaking and shaping work -- eventually allowing shaping across inline box boundaries and line breaking *after* shaping. Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
9d627a9
to
fb82f8f
Compare
🔨 Triggering try run (#9498216149) for Linux WPT |
Test results for linux-wpt-layout-2020 from try job (#9498216149): Flaky unexpected result (15)
Stable unexpected results that are known to be intermittent (10)
|
✨ Try run (#9498216149) succeeded. |
This collected inline layout would be the perfect boundary at which to break out an external library. Or indeed build upon an existing library: cosmic-text and parley both already exist at this level of abstraction and already implement things like shaping before line breaking. It seems such a shame to have duplicates of all this low-level text work when everyone needs the same thing. |
Instead of linebreaking inside each single-font text segment, linebreak
the entire inline formatting context at once. This has several benefits:
icu_segmenter
(already in use from style),which is written against a newer version of the Unicode spec --
preventing breaking emoji clusters.
shaping work -- eventually allowing shaping across inline box
boundaries and line breaking after shaping.
Some tests start to fail:
line-break: anywhere
andword-break: manual
.Co-authored-by: Rakhi Sharma atbrakhi@igalia.com
./mach build -d
does not report any errors./mach test-tidy
does not report any errors