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

  Changed paths:
    A LayoutTests/fast/inline/selection-top-after-block-level-box-expected.html
    A LayoutTests/fast/inline/selection-top-after-block-level-box.html
    M Source/WebCore/layout/integration/inline/InlineIteratorLineBoxModernPath.h

  Log Message:
  -----------
  [block-in-inline] A highlight on the line after a block level box covers the 
box's margin
https://bugs.webkit.org/show_bug.cgi?id=321400

Reviewed by Antti Koivisto.

A line takes its selection and highlight top from the bottom of the line before 
it, so that the leading
between two lines is covered rather than left as a hole. The space below a line 
carrying a block level box is
not leading, it is that box's margin, and the box covers what is its own, so 
the line after it starts at its
own top instead.

An anonymous block hid this. The content after the box was the first line of 
its own formatting context,
which the m_lineIndex check already answers.

The following line gets the same treatment for a line inverted writing mode, 
where it plays the part the
preceding line plays here.

* LayoutTests/fast/inline/selection-top-after-block-level-box.html: Added.
* LayoutTests/fast/inline/selection-top-after-block-level-box-expected.html: 
Added.
* Source/WebCore/layout/integration/inline/InlineIteratorLineBoxModernPath.h:
(WebCore::InlineIterator::LineBoxIteratorModernPath::contentLogicalTopAdjustedForPrecedingLineBox
 const):
(WebCore::InlineIterator::LineBoxIteratorModernPath::contentLogicalBottomAdjustedForFollowingLineBox
 const):

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



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

Reply via email to