[webkit-changes] [WebKit/WebKit] d25ec1: Support first-line related CSS interactions in `te...

Commit Queue noreply at github.com
Thu Aug 17 12:21:14 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d25ec10246e80f42254d80a6dc7fd94050e73313
      https://github.com/WebKit/WebKit/commit/d25ec10246e80f42254d80a6dc7fd94050e73313
  Author: David Choi <david_choi5 at apple.com>
  Date:   2023-08-17 (Thu, 17 Aug 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.h

  Log Message:
  -----------
  Support first-line related CSS interactions in `text-wrap: balance`
https://bugs.webkit.org/show_bug.cgi?id=260229
rdar://113934501

Reviewed by Alan Baradlay.

This patch implements support for first-line styling, text-indent,
and white-space-collapse in text-wrap: balance. All three of these
properties depend on special-casing the first line when balancing
inline content. In the case of white-space-collapse: preserve, we
mostly trim leading/trailing white space, except in the case where
there is preserved leading white space on the first line.

This patch also supports white-space-collapse: break-spaces.

* LayoutTests/TestExpectations:
* Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.cpp:
(WebCore::Layout::InlineContentBalancer::initialize):
(WebCore::Layout::InlineContentBalancer::computeBalanceConstraints):
(WebCore::Layout::InlineContentBalancer::balanceRangeWithLineRequirement):
(WebCore::Layout::InlineContentBalancer::balanceRangeWithNoLineRequirement):
(WebCore::Layout::InlineContentBalancer::inlineItemWidth const):
(WebCore::Layout::InlineContentBalancer::shouldTrimLeading const):
(WebCore::Layout::InlineContentBalancer::shouldTrimTrailing const):
(WebCore::Layout::InlineContentBalancer::SlidingWidth::SlidingWidth):
(WebCore::Layout::InlineContentBalancer::SlidingWidth::advanceStart):
(WebCore::Layout::InlineContentBalancer::SlidingWidth::advanceEnd):
* Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.h:

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




More information about the webkit-changes mailing list