Closed Bug 1818354 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 38660 - [balance-text] Implement balancing algorithm

Categories

(Core :: Layout: Text and Fonts, task, P4)

task

Tracking

()

RESOLVED FIXED
112 Branch
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: I31a5859293622c14dda05e785c4495cd82db6f14

Reviewed-on: https://chromium-review.googlesource.com/3752780
WPT-Export-Revision: ef2b5071d9574d088ff80470618c444f12135b3a

Component: web-platform-tests → Layout: Text and Fonts
Product: Testing → Core
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/99a886ea64a3 [wpt PR 38660] - [balance-text] Implement balancing algorithm, a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in before you can comment on or make changes to this bug.