[webkit-changes] [WebKit/WebKit] dbe441: [text-wrap-style] Add faster algorithm for pretty.

Yulun Wu noreply at github.com
Tue Feb 18 15:19:53 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dbe441a76e45df563e5756de4721114bca3a4920
      https://github.com/WebKit/WebKit/commit/dbe441a76e45df563e5756de4721114bca3a4920
  Author: Yulun Wu <yulun_wu at apple.com>
  Date:   2025-02-18 (Tue, 18 Feb 2025)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/InlineContentConstrainer.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineContentConstrainer.h

  Log Message:
  -----------
  [text-wrap-style] Add faster algorithm for pretty.
https://bugs.webkit.org/show_bug.cgi?id=287596
<rdar://144742121>

Reviewed by Alan Baradlay.

[text-wrap-style:pretty] is expected to be more performant than
text-wrap-style:balance as it is intended for use on larger blocks
of text.

However, the current implementation is overly complex and
significantly slower. We should update text-wrap-style:pretty to
be more performant by removing multi solution tracking, as well
as adding minimum/maximum line width heuristics per Knuth-Plass.
This simultaneously reduces search space as well as acts as a
trigger for hyphenation.

Hyphenation support will be landed in a follow up PR.

Canonical link: https://commits.webkit.org/290568@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list