[webkit-changes] [WebKit/WebKit] a20779: HTML notes is showing gray underline for autocorre...

Richard Robinson noreply at github.com
Wed Nov 29 08:29:27 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a20779d6520da7441b3bc16829f21bc39ca6294d
      https://github.com/WebKit/WebKit/commit/a20779d6520da7441b3bc16829f21bc39ca6294d
  Author: Richard Robinson <richard_robinson2 at apple.com>
  Date:   2023-11-29 (Wed, 29 Nov 2023)

  Changed paths:
    M Source/WebCore/editing/FrameSelection.cpp
    M Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm

  Log Message:
  -----------
  HTML notes is showing gray underline for autocorrection
https://bugs.webkit.org/show_bug.cgi?id=265050
rdar://118401826

Reviewed by Wenson Hsieh.

Before 266070 at main, the caret color on iOS was almost always blue (specifically, always except for
when the caret color was explicitly set by the CSS author). The change was needed on macOS because
otherwise some sites would have overlapping carets. The commit changed both macOS and iOS to be more
consistent, and more compliant with the CSS spec. However, while this did technically improve web
compatibility in iOS, it made things worse than they were before:

- The caret on iOS is now almost always black (it is on macOS too, but it is worse on iOS because
the caret was always blue previously)

- It has caused several issues in apps with custom tint colors (like https://bugs.webkit.org/show_bug.cgi?id=263123
and several others)

This specific bug is due to the fact that the correct underlines directly use the caret color. The
reason the commit that addressed the color of the caret itself on iOS and not this color as well
is because the two colors come from different paths, and the fix only fixed the actual caret
(insertion point) color.

To fix, and prevent similar bugs, undo the part of 266070 at main that changed the iOS behavior. This
restores the previous behavior, in addition to fixing this bug.

* Source/WebCore/editing/FrameSelection.cpp:
(WebCore::CaretBase::computeCaretColor):

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




More information about the webkit-changes mailing list