Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1b63f3ca0691eb93ab0e8c69d733b9454d5c44a9
      
https://github.com/WebKit/WebKit/commit/1b63f3ca0691eb93ab0e8c69d733b9454d5c44a9
  Author: Tyler Wilcock <[email protected]>
  Date:   2026-09-06 (Sun, 06 Sep 2026)

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

  Log Message:
  -----------
  AX: isARIAHidden() does its cheapest check last, causing samples in 
Speedometer profile
https://bugs.webkit.org/show_bug.cgi?id=323521
rdar://186764926

Reviewed by Chris Fleizach.

isARIAHidden() called isFocused(), then shouldIgnoreARIAHidden(), then compared 
the
element's local name against body, html and svg, and only then looked at whether
aria-hidden was actually specified. Every one of those earlier conditions can 
only
turn a true result into false -- none of them can make the function return true 
on
its own -- so for the vast majority of objects, which specify no aria-hidden at 
all,
all of that work is done just to reach a check that was always going to return 
false.

Check aria-hidden first and bail out there. shouldIgnoreARIAHidden() stays 
ahead of it
since it's an inline bitfield read. The focus and tag name checks now only run 
for the
objects that actually claim to be hidden, where they still override the result 
as
before.

A profile of Speedometer 3.1 with VoiceOver enabled attributes 223 samples to
isARIAHidden() across 176 call sites, out of 12845 active main-thread samples.

* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isARIAHidden const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to