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

  Changed paths:
    A LayoutTests/fast/inline/selection-gap-with-block-in-inline-expected.html
    A LayoutTests/fast/inline/selection-gap-with-block-in-inline.html
    M Source/WebCore/editing/VisiblePosition.cpp
    M Source/WebCore/layout/integration/inline/LineSelection.h
    M Source/WebCore/rendering/EllipsisBoxPainter.cpp
    M Source/WebCore/rendering/RenderBlockFlow.cpp
    M Source/WebCore/rendering/RenderReplaced.cpp

  Log Message:
  -----------
  [block-in-inline] Selection gaps are not filled around a block level box on a 
line
https://bugs.webkit.org/show_bug.cgi?id=321382

Reviewed by Antti Koivisto.

RenderBlock::blockSelectionGaps does four things per block level child: it 
fills the gap above the child,
fills the gaps beside it or recurs into it, and carries the bottom of the child 
forward so the next gap
starts from there. RenderBlockFlow::inlineSelectionGaps does none of that for a 
block level box on a line,
so the gaps around such a box go unpainted.

Give the line loop the same four.

* LayoutTests/fast/inline/selection-gap-with-block-in-inline.html: Added.
* LayoutTests/fast/inline/selection-gap-with-block-in-inline-expected.html: 
Added.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::inlineSelectionGaps):
* Source/WebCore/layout/integration/inline/LineSelection.h:
(WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):
* Source/WebCore/editing/VisiblePosition.cpp:
* Source/WebCore/rendering/EllipsisBoxPainter.cpp:
* Source/WebCore/rendering/RenderReplaced.cpp:

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



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

Reply via email to