Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dbf78474e565a31156a1340287c14f00a2284dfb
      
https://github.com/WebKit/WebKit/commit/dbf78474e565a31156a1340287c14f00a2284dfb
  Author: Alan Baradlay <[email protected]>
  Date:   2026-02-26 (Thu, 26 Feb 2026)

  Changed paths:
    M LayoutTests/fast/inline/empty-inline-box-bounding-rect.html
    M 
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp
    M Source/WebCore/rendering/RenderInline.cpp

  Log Message:
  -----------
  [IFC] Do not create display boxes on constrained lines for empty spanning 
inline boxes
https://bugs.webkit.org/show_bug.cgi?id=308696

Reviewed by Antti Koivisto.

1. 303091@main: we started creating empty (inline box) display boxes to be able 
to
   provided offsetTop/offsetHeight values for cases like
   <div>
     content<br>
     <span id=empty-inline-box></span>
   </div>
   where before the fix, the trailing <span> did not initiate any display boxes 
(empty line).

2. However after 303091@main, we also started creating empty display boxes for 
_line_spanning_
   inline boxes when we couldn't fit any content on the line due to intrusive 
floats.
   <div>
     content
      <float><span> this does not fit the line due to the float here</span>
   </div>
  and this turned out to be not web-compatible.

3. 307916@main and 308175@main addressed this issue by filtering the display 
box rects
   as we collect them in RenderInline's generateLineBoxRects (this is called by 
functions like
   offsetHeight etc.

Let's fix #2 and undo #3.

* LayoutTests/fast/inline/empty-inline-box-bounding-rect.html:
* 
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):
* Source/WebCore/rendering/RenderInline.cpp:
(WebCore::RenderInline::generateLineBoxRects const):

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



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

Reply via email to