[wpt-sync] Sync PR 38660 - [balance-text] Implement balancing algorithm
Categories
(Core :: Layout: Text and Fonts, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox112 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
(Depends on 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 38660 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/38660
Details from upstream follow.
Koji Ishii <kojii@chromium.org> wrote:
[balance-text] Implement balancing algorithm
This patch implements
NGParagraphLineBreaker
that implements
the headline balancing algorithm. It computes the minimum
available width that produces the same number of lines as the
normal line breaker by bisecting.The algorithm is O(log n). To mitigate the performance penalty,
it skips if the block has more than 4 lines, or it is
estimated to have more than 8 lines.See the document[1] for more details.
[1] https://docs.google.com/document/d/16-T9gqCagJxcST6hcnneSb7qGunxXa37_UHYqMqhPL0/edit?usp=sharing
Bug: 1251079
Change-Id: I31a5859293622c14dda05e785c4495cd82db6f14Reviewed-on: https://chromium-review.googlesource.com/3752780
WPT-Export-Revision: ef2b5071d9574d088ff80470618c444f12135b3a
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 3•2 years ago
|
||
Comment 4•2 years ago
|
||
bugherder |
Description
•