Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2bcee61b68defc143d6fafdb5efb009b69228c26
      
https://github.com/WebKit/WebKit/commit/2bcee61b68defc143d6fafdb5efb009b69228c26
  Author: Alan Baradlay <[email protected]>
  Date:   2026-08-05 (Wed, 05 Aug 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/trailing-space-before-block-in-inline-001-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/trailing-space-before-block-in-inline-001.html
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp

  Log Message:
  -----------
  [block-in-inline] Trailing whitespace is not collapsed before a block nested 
in an inline box
https://bugs.webkit.org/show_bug.cgi?id=321088

Reviewed by Antti Koivisto.

isLastLineWithInlineContent() looks past the line's own content for more inline 
items to decide whether
this is the last line with inline content. A block level box is not 
"contentful" per
isContentfulOrHasDecoration(), which only accepts atomic inline level boxes and 
line breaks, so the scan
stepped straight over it, found the content after the block and concluded the 
line was not last.

* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::isLastLineWithInlineContent):
(WebCore::Layout::LineBuilder::isLastLineWithInlineContent const):
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/trailing-space-before-block-in-inline-001-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/trailing-space-before-block-in-inline-001.html:
 Added.

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



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

Reply via email to