Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5f26ab5d1188e9d6a5a6fa81d80aa03fc4cf93a2
      
https://github.com/WebKit/WebKit/commit/5f26ab5d1188e9d6a5a6fa81d80aa03fc4cf93a2
  Author: Cole Carley <[email protected]>
  Date:   2026-03-06 (Fri, 06 Mar 2026)

  Changed paths:
    A LayoutTests/editing/selection/anchor-on-boundary-expected.txt
    A LayoutTests/editing/selection/anchor-on-boundary.html
    M LayoutTests/editing/selection/extend-after-mouse-selection-expected.txt
    M LayoutTests/editing/style/style-3681552-fix-001-expected.txt
    M LayoutTests/editing/style/style-3690704-fix-expected.txt
    M 
LayoutTests/platform/glib/editing/deleting/delete-ws-fixup-002-expected.txt
    M LayoutTests/platform/glib/editing/style/style-3681552-fix-001-expected.txt
    M LayoutTests/platform/ios/editing/deleting/delete-ws-fixup-002-expected.txt
    M LayoutTests/platform/mac/editing/deleting/delete-ws-fixup-002-expected.txt
    M Source/WebCore/editing/FrameSelection.cpp

  Log Message:
  -----------
  User's selections have the wrong anchorNode on boundaries
https://bugs.webkit.org/show_bug.cgi?id=309205
rdar://123103456

Reviewed by Ryosuke Niwa and Megan Gardner.

When setting the base for FrameSelections, we were incorrectly passing
the extent as the focus parameter. Likewise, when setting the extent,
we were incorrectly passing the base as the anchor parameter.

To fix this issue, I pass the previous anchor and focus instead, which
keeps these fields unchanged in the selection.

Test: editing/selection/anchor-on-boundary.html

* LayoutTests/editing/selection/anchor-on-boundary-expected.txt: Added.
* LayoutTests/editing/selection/anchor-on-boundary.html: Added.
* Source/WebCore/editing/FrameSelection.cpp:
(WebCore::FrameSelection::setBase):
(WebCore::FrameSelection::setExtent):

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



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

Reply via email to