Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 30eb0d2436fdfd6fd44c879092b935c730dc671f
      
https://github.com/WebKit/WebKit/commit/30eb0d2436fdfd6fd44c879092b935c730dc671f
  Author: Alan Baradlay <[email protected]>
  Date:   2025-11-20 (Thu, 20 Nov 2025)

  Changed paths:
    A 
LayoutTests/fast/inline/blocks-in-inline-with-text-box-trim-end-expected.html
    A LayoutTests/fast/inline/blocks-in-inline-with-text-box-trim-end.html
    M Source/WebCore/layout/integration/inline/InlineIteratorLineBox.h
    M Source/WebCore/rendering/RenderBlockFlow.cpp
    M Source/WebCore/rendering/TextBoxTrimmer.cpp

  Log Message:
  -----------
  [blocks-in-inline] Fix 
imported/w3c/web-platform-tests/css/css-inline/text-box-trim/text-box-trim-block-in-inline-end-002.html
 -003.html -004.html
https://bugs.webkit.org/show_bug.cgi?id=302881

Reviewed by Antti Koivisto.

1. TextBoxTrimmer's lastFormattedLineRoot now looks inside IFC content to find 
blocks
that themselves may have IFC lines inside -they might contain the actual last 
formatted line as far as the larger block is concerned.
e.g.
<div text-box-trim>
  first line
  <span>
    <div>this is the last formatted line</div>
  </span>
</div>

2. In RenderBlockFlow, now we need to run applyTextBoxTrimEndIfNeeded when 
childrenInline() as it may have blocks inside.

Test: fast/inline/blocks-in-inline-with-text-box-trim-end.html

* 
LayoutTests/fast/inline/blocks-in-inline-with-text-box-trim-end-expected.html: 
Added.
* LayoutTests/fast/inline/blocks-in-inline-with-text-box-trim-end.html: Added.
* Source/WebCore/layout/integration/inline/InlineIteratorLineBox.h:
(WebCore::InlineIterator::LineBoxIterator::operator--):
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutInFlowChildren):
* Source/WebCore/rendering/TextBoxTrimmer.cpp:
(WebCore::firstFormattedLineRoot):
(WebCore::lastFormattedLineRoot):
(WebCore::TextBoxTrimmer::lastInlineFormattingContextRootForTrimEnd):

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



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

Reply via email to