Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 26548fe7a849e8be3133d0b9ff2022e992fddb7b
      
https://github.com/WebKit/WebKit/commit/26548fe7a849e8be3133d0b9ff2022e992fddb7b
  Author: Yulun Wu <[email protected]>
  Date:   2025-02-17 (Mon, 17 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:pretty] Refactor line width calculations.
https://bugs.webkit.org/show_bug.cgi?id=287764
<rdar://144930453>

Reviewed by Alan Baradlay.

This PR refactors out the logic for computing line width from sliding width and
updates text-wrap-style:pretty and text-wrap-style:balance to use correct widths
of the inline items when performing cost/raggedness calculations.

This will also remove duplicate code and functionality. This will also enable 
use to
backtrack line widths for text-wrap-style:pretty.

Finally, line width backtracking is necessary to enable hyphenation: these will 
be
landed in a follow up PR.

* Source/WebCore/layout/formattingContexts/inline/InlineContentConstrainer.cpp:
(WebCore::Layout::InlineContentConstrainer::balanceRangeWithLineRequirement):
(WebCore::Layout::InlineContentConstrainer::balanceRangeWithNoLineRequirement):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to