[webkit-changes] [WebKit/WebKit] 150420: Selection should not set the cursor type to text o...

Ahmad Saleem noreply at github.com
Wed Jun 28 13:46:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 15042015b0c8ed72c5d6e8e226e117dcc8041d48
      https://github.com/WebKit/WebKit/commit/15042015b0c8ed72c5d6e8e226e117dcc8041d48
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-06-28 (Wed, 28 Jun 2023)

  Changed paths:
    A LayoutTests/editing/caret/caret-type-for-user-select-none-expected.txt
    A LayoutTests/editing/caret/caret-type-for-user-select-none.html
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebCore/page/EventHandler.cpp

  Log Message:
  -----------
  Selection should not set the cursor type to text over the explicitly set cursor type

https://bugs.webkit.org/show_bug.cgi?id=258622

Reviewed by Ryosuke Niwa.

This patch aligns WebKit with Blink / Chromium and Gecko / Firefox.

Merge: https://chromium.googlesource.com/chromium/blink/+/a5c471c481544403615780bce2845de58e37e341

When tried to select some text in an area that has style
cursor:default set, cursor type changes to text cursor ignoring
the cursor style that is explicitly set.

When the cursor style is explicitly set as default(or something else),
we should not change it to text cursor no matter what we are over
or what operation we are performing (be it hovering over the text
or selecting the text).

We change the cursor type to text during selection. But if there is
an explicit cursor style set then this explicitly set cursor style
should be given priority over the text style cursor during selection.

Currently if the area on which cursor:default is set is contenteditable,
in this particular case we do not change the cursor style to text on
selection. This should be the behavior irrespective of editability.

* Source/WebCore/page/EventHandler.cpp:
(EventHandler::selectCursor): As per commit message
* LayoutTests/editing/caret/caret-type-for-user-select-none.html: Add Test Case
* LayoutTests/editing/caret/caret-type-for-user-select-none-expected.txt: Add Test Case Expectation
* LayoutTests/platform/ios/TestExpectations: Add Platform Specific Expectation to Skip on iOS due to test leveraging 'eventSender' mousedown and mouseMoveTo.

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




More information about the webkit-changes mailing list