[webkit-changes] [WebKit/WebKit] c9e4f6: AX: AccessibilityARIAGridCell::parentTable() needl...

Tyler Wilcock noreply at github.com
Wed May 24 11:34:35 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c9e4f6d7c6845c7fa6edd99fdf33047be40fc13b
      https://github.com/WebKit/WebKit/commit/c9e4f6d7c6845c7fa6edd99fdf33047be40fc13b
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2023-05-24 (Wed, 24 May 2023)

  Changed paths:
    M Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp

  Log Message:
  -----------
  AX: AccessibilityARIAGridCell::parentTable() needlessly computes accessibilityIsIgnored
https://bugs.webkit.org/show_bug.cgi?id=257249
rdar://problem/109753927

Reviewed by Chris Fleizach.

AccessibilityARIAGridCell::parentTable() is currently implemented by
traversing its unignored ancestors and checking if each one is an
exposed-to-accessibility table. This is extremely inefficient because it
frontloads the expensive work (computing accessibilityIsIgnored) and
backloads the cheap work (is<AccessibilityTable>(ancestor), and is that table exposed).

This patch inverts those checks, navigating from ancestor to ancestor
(not considering ignored status), checking if each is a table that is
exposed. Only when both of these conditions are met do we compute
ignored status of the candidate table.

>From a sample on Quip with 130k samples, this saves ~8k samples.

* Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::parentTable const):

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




More information about the webkit-changes mailing list