Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 66fe01ec84acda612d27f76459c2ea9d5f191b97
      
https://github.com/WebKit/WebKit/commit/66fe01ec84acda612d27f76459c2ea9d5f191b97
  Author: Antti Koivisto <[email protected]>
  Date:   2025-11-19 (Wed, 19 Nov 2025)

  Changed paths:
    A LayoutTests/editing/deleting/pruning-after-merge-3-expected.html
    A LayoutTests/editing/deleting/pruning-after-merge-3.html
    M Source/WebCore/editing/VisibleUnits.cpp

  Log Message:
  -----------
  [blocks-in-inline] Fix local previous/nextLinePosition to adjust for local 
offset
https://bugs.webkit.org/show_bug.cgi?id=302777
rdar://165041221

Reviewed by Alan Baradlay.

Blocks-in-inline revealed an existing bug in these functions.
If the selection was extended to an inline block we would select wrong line 
inside it because
bad coordinates. This becomes more important with blocks-in-inline.

Test: editing/deleting/pruning-after-merge-3.html
* LayoutTests/editing/deleting/pruning-after-merge-3-expected.html: Added.
* LayoutTests/editing/deleting/pruning-after-merge-3.html: Added.

Add a test where we extend selection to an inline-block.
The tested behavior matches Chrome.

* Source/WebCore/editing/VisibleUnits.cpp:
(WebCore::previousLinePosition):
(WebCore::nextLinePosition):

visiblePositionForPoint() expects point in the local coordinates of the 
renderer.

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



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

Reply via email to