Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d34f39ba6c661d3cdd54f1a9b56f9f681c2669cd
      
https://github.com/WebKit/WebKit/commit/d34f39ba6c661d3cdd54f1a9b56f9f681c2669cd
  Author: Ian Gower <[email protected]>
  Date:   2026-08-13 (Thu, 13 Aug 2026)

  Changed paths:
    A 
LayoutTests/editing/selection/selection-does-not-extend-over-preceding-float-expected.txt
    A 
LayoutTests/editing/selection/selection-does-not-extend-over-preceding-float.html
    M Source/WebCore/layout/integration/inline/InlineIteratorLineBoxModernPath.h

  Log Message:
  -----------
  parks.ca.gov: Text highlight is misleading when image above is a float
https://bugs.webkit.org/show_bug.cgi?id=320703
rdar://109610452

Reviewed by Megan Gardner.

Selecting text on a line pushed below an intrusive float highlighted the float 
as well, so on
parks.ca.gov selecting text under a wide float:left image filled the whole 
image with selection
colour rather than just the text.

A line's selection top is inherited from the preceding line box to cover the 
half-leading gap
between lines. That inheritance was unconditional, so a line pushed below a 
float inherited from a
line box that does not reach it and started its selection at the block's 
content top instead. Only
inherit when the preceding line box is adjacent, otherwise start at this line's 
own content top.

* 
LayoutTests/editing/selection/selection-does-not-extend-over-preceding-float-expected.txt:
 Added.
* 
LayoutTests/editing/selection/selection-does-not-extend-over-preceding-float.html:
 Added.
* Source/WebCore/layout/integration/inline/InlineIteratorLineBoxModernPath.h:
(WebCore::InlineIterator::LineBoxIteratorModernPath::contentLogicalTopAdjustedForPrecedingLineBox
 const):

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



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

Reply via email to