[webkit-changes] [WebKit/WebKit] e05c6e: "-webkit-box-decoration-break: clone" with left an...

Alan Baradlay noreply at github.com
Thu Jul 13 17:08:45 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e05c6e3339f4c68128b1d8928bf0f7f056bec786
      https://github.com/WebKit/WebKit/commit/e05c6e3339f4c68128b1d8928bf0f7f056bec786
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-07-13 (Thu, 13 Jul 2023)

  Changed paths:
    A LayoutTests/fast/inline/shrink-to-fit-content-with-decoration-clone-expected.html
    A LayoutTests/fast/inline/shrink-to-fit-content-with-decoration-clone.html
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp

  Log Message:
  -----------
  "-webkit-box-decoration-break: clone" with left and right padding causes unexpected wrapping of inline content
https://bugs.webkit.org/show_bug.cgi?id=259188
<rdar://problem/112197978>

Reviewed by Antti Koivisto.

This bug is specific to shrink-to-fit content with "-webkit-box-decoration-break: clone" when
the content is supposed to fit the current line.

The fix is about accounting for the accumulated decoration end width when adjusting the available width for the continuous content.
We already do that for content on the current line and this patch adjusts it for the current continuous content as well.

* LayoutTests/fast/inline/shrink-to-fit-content-with-decoration-clone-expected.html: Added.
* LayoutTests/fast/inline/shrink-to-fit-content-with-decoration-clone.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineCandidate::InlineContent::setAccumulatedClonedDecorationEnd):
(WebCore::Layout::LineCandidate::InlineContent::accumulatedClonedDecorationEnd const):
(WebCore::Layout::LineCandidate::InlineContent::reset):
(WebCore::Layout::LineBuilder::candidateContentForLine):
(WebCore::Layout::availableWidth):

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




More information about the webkit-changes mailing list