[webkit-changes] [WebKit/WebKit] 2d2117: [Live Range Selection] Selecting backwards in edit...

Ryosuke Niwa noreply at github.com
Tue Nov 22 21:51:10 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2d2117dc616644f07a90faee1da38d75c13151f9
      https://github.com/WebKit/WebKit/commit/2d2117dc616644f07a90faee1da38d75c13151f9
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2022-11-22 (Tue, 22 Nov 2022)

  Changed paths:
    M LayoutTests/editing/selection/user-select-all-with-shift-expected.txt
    A LayoutTests/editing/selection/user-select-all-with-shift-live-range-expected.txt
    A LayoutTests/editing/selection/user-select-all-with-shift-live-range.html
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebCore/page/EventHandler.cpp

  Log Message:
  -----------
  [Live Range Selection] Selecting backwards in editing/selection/user-select-all-with-shift-live-range.html fails for Windows
https://bugs.webkit.org/show_bug.cgi?id=248204

Reviewed by Darin Adler.

The bug was caused by handleMousePressEventSingleClick failing to expand the base appropriately with respect to user-select: all
when we're about to flip the direction of selection (e.g. base < extent to extent < base). In these cases, we need to expand
the selection base in the opposite direction with regards to user-select: all.

* LayoutTests/editing/selection/user-select-all-with-shift-expected.txt: Rebaselined.
* LayoutTests/editing/selection/user-select-all-with-shift-live-range-expected.txt: Added.
* LayoutTests/editing/selection/user-select-all-with-shift-live-range.html: Added.
* LayoutTests/platform/ios/TestExpectations: Skip the newly added test on iOS like the original.
* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEventSingleClick):

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




More information about the webkit-changes mailing list