-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AX: AccessibilityRenderObject::updateRoleAfterChildrenCreation causes…
… unnecessary AXRoleChanged notifications for several subclasses https://bugs.webkit.org/show_bug.cgi?id=262351 rdar://problem/116213145 Reviewed by Andres Gonzalez. AccessibilityRenderObject::updateRoleAfterChildrenCreation is predicated on the assumption that the class uses m_role. However, many subclasses don't, instead hard-coding a value like so: AccessibilityRole roleValue() const final { return AccessibilityRole::Label; } This means that m_role (not actually used) may differ from roleValue(), causing updateRoleAfterChildrenCreation to post a spurious AXRoleChanged notification every time the object's children are cleared and re-added, in turn causing lots of wasted work, as AXRoleChanged causes a full node update in the isolated tree. With this patch, we move most subclasses towards using `m_role` rather than overriding roleValue(), preventing spurious AXRoleChanged notifications (because now we will properly detect that the role has not changed). This saves 10k node changes of 132k total node changes on an internal web page, as this webpage has thousands of SVG elements that cleared and re-added their children a few times. * Source/WebCore/accessibility/AXImage.cpp: (WebCore::AXImage::determineAccessibilityRole): (WebCore::AXImage::roleValue const): Deleted. * Source/WebCore/accessibility/AXImage.h: * Source/WebCore/accessibility/AccessibilityAttachment.h: * Source/WebCore/accessibility/AccessibilityImageMapLink.cpp: (WebCore::AccessibilityImageMapLink::setHTMLAreaElement): (WebCore::AccessibilityImageMapLink::determineAccessibilityRole): (WebCore::AccessibilityImageMapLink::detachFromParent): (WebCore::AccessibilityImageMapLink::roleValue const): Deleted. * Source/WebCore/accessibility/AccessibilityImageMapLink.h: * Source/WebCore/accessibility/AccessibilityLabel.h: * Source/WebCore/accessibility/AccessibilityList.cpp: (WebCore::AccessibilityList::determineAccessibilityRole): (WebCore::AccessibilityList::roleValue const): Deleted. * Source/WebCore/accessibility/AccessibilityList.h: * Source/WebCore/accessibility/AccessibilityListBox.h: * Source/WebCore/accessibility/AccessibilityListBoxOption.h: * Source/WebCore/accessibility/AccessibilityMenuList.h: * Source/WebCore/accessibility/AccessibilityMenuListOption.h: * Source/WebCore/accessibility/AccessibilityMenuListPopup.h: * Source/WebCore/accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::init): (WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored const): (WebCore::AccessibilityNodeObject::updateRole): Deleted. * Source/WebCore/accessibility/AccessibilityNodeObject.h: * Source/WebCore/accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::init): (WebCore::AccessibilityObject::updateRole): * Source/WebCore/accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::init): Deleted. (WebCore::AccessibilityObject::updateRole): Deleted. * Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp: (WebCore::AccessibilityProgressIndicator::determineAccessibilityRole): (WebCore::AccessibilityProgressIndicator::roleValue const): Deleted. * Source/WebCore/accessibility/AccessibilityProgressIndicator.h: * Source/WebCore/accessibility/AccessibilityRenderObject.h: * Source/WebCore/accessibility/AccessibilitySVGElement.h: * Source/WebCore/accessibility/AccessibilitySVGRoot.cpp: (WebCore::AccessibilitySVGRoot::determineAccessibilityRole): (WebCore::AccessibilitySVGRoot::roleValue const): Deleted. * Source/WebCore/accessibility/AccessibilitySVGRoot.h: * Source/WebCore/accessibility/AccessibilityScrollView.h: * Source/WebCore/accessibility/AccessibilityScrollbar.h: * Source/WebCore/accessibility/AccessibilitySlider.h: * Source/WebCore/accessibility/AccessibilitySpinButton.h: * Source/WebCore/accessibility/AccessibilityTable.h: * Source/WebCore/accessibility/AccessibilityTableColumn.h: * Source/WebCore/accessibility/AccessibilityTableHeaderContainer.h: Canonical link: https://commits.webkit.org/268789@main
- Loading branch information
Showing
30 changed files
with
81 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.