[webkit-changes] [WebKit/WebKit] 42da7d: AX: AccessibilityObject::listMarkerTextForNodeAndP...

Tyler Wilcock noreply at github.com
Thu Sep 21 00:34:15 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 42da7d77805d8e6dfa9eb5b35da5f603c6b41ff6
      https://github.com/WebKit/WebKit/commit/42da7d77805d8e6dfa9eb5b35da5f603c6b41ff6
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2023-09-21 (Thu, 21 Sep 2023)

  Changed paths:
    M Source/WebCore/accessibility/AccessibilityObject.cpp
    M Source/WebCore/accessibility/AccessibilityObject.h

  Log Message:
  -----------
  AX: AccessibilityObject::listMarkerTextForNodeAndPosition forces resolution of Position to VisiblePosition even when it's not used
https://bugs.webkit.org/show_bug.cgi?id=261838
rdar://problem/115801743

Reviewed by Chris Fleizach.

Converting a Position into a VisiblePosition can be very expensive, and listMarkerTextForNodeAndPosition
was doing this when it was often not needed (because the given node is not a descendant of a list item).

With this patch, we only do this work when in a list item.

This saves ~10.1k samples of 84832 total main-thread samples in a popular web email client.

* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::listMarkerText):
(WebCore::AccessibilityObject::listMarkerTextForNodeAndPosition):
* Source/WebCore/accessibility/AccessibilityObject.h:

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




More information about the webkit-changes mailing list