[webkit-changes] [WebKit/WebKit] ff720c: AX: Voice Control cannot access any web content

Tyler Wilcock noreply at github.com
Tue Aug 8 21:55:34 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ff720c41980277529a7b77a9389f0205888a9ebe
      https://github.com/WebKit/WebKit/commit/ff720c41980277529a7b77a9389f0205888a9ebe
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
    M Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm

  Log Message:
  -----------
  AX: Voice Control cannot access any web content
https://bugs.webkit.org/show_bug.cgi?id=259951
rdar://113280724

Reviewed by Chris Fleizach.

This is a regression from https://bugs.webkit.org/show_bug.cgi?id=256238, which changed
`-[WKAccessibilityWebPageObjectMac accessibilityAttributeNames]` to return `m_attributeNames`
via `.autorelease()` rather than `.get()`. Returning via autorelease causes the backing NSArray
to be released after the next iteration of the runloop, meaning subsequent requests to
`accessibilityAttributeNames` return nil. Voice Control relies on this output being correct to function.

With this patch, both `m_attributeNames` and `m_parameterizedAttributeNames` are returned via
`RetainPtr::get()`, preventing their early deletion. This matches the getters for other
`RetainPtr<NSArray> m_foo` types throughout WebKit.

* Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):

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




More information about the webkit-changes mailing list