[webkit-changes] [WebKit/WebKit] ae7bf7: VoiceOver not reading entered text in text fields.

AndresGonzalezApple noreply at github.com
Sun Mar 26 10:24:35 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ae7bf78d3f4f404ae4ac04efda9ca9ef599f1ce5
      https://github.com/WebKit/WebKit/commit/ae7bf78d3f4f404ae4ac04efda9ca9ef599f1ce5
  Author: Andres Gonzalez <andresg_22 at apple.com>
  Date:   2023-03-26 (Sun, 26 Mar 2023)

  Changed paths:
    M LayoutTests/accessibility/native-text-control-attributed-string-expected.txt
    M LayoutTests/platform/mac/accessibility/content-editable-as-textarea-expected.txt
    M LayoutTests/platform/mac/accessibility/element-line-rects-and-text-expected.txt
    M Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm

  Log Message:
  -----------
  VoiceOver not reading entered text in text fields.
https://bugs.webkit.org/show_bug.cgi?id=254468
rdar://106958414

Reviewed by Chris Fleizach.

* Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::attributedStringSetColor):
The cause of the problem was that we were setting the color attribute in the AttributedString using the NSColor pointer that is not retained after the caller of this function returns. Thus, when the AttributedString is going to be serialized to be sent over VoiceOver, this attribute has been already GC-ed and the whole AttributedString is ditched and the client gets nil. We now use the NSColor.CGColor which is properly retained.

(WebCore::attributedStringSetStyle):
Checks for the containment of range instead of attributedStringSetColor doing it multiple times.

The following tests have to be rebased because the output for the color attribute in the AttributedStrings changes the format between NSColor and CGColor.

* LayoutTests/accessibility/native-text-control-attributed-string-expected.txt:
* LayoutTests/platform/mac/accessibility/content-editable-as-textarea-expected.txt:
* LayoutTests/platform/mac/accessibility/element-line-rects-and-text-expected.txt:

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




More information about the webkit-changes mailing list