Changeset 294186 in webkit
- Timestamp:
- May 13, 2022, 9:37:21 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/accessibility/aria-modal-with-text-crash-expected.txt (added)
-
LayoutTests/accessibility/aria-modal-with-text-crash.html (added)
-
LayoutTests/platform/glib/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/ios/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/win/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/accessibility/AXObjectCache.cpp (modified) (1 diff)
-
Source/WebCore/accessibility/AXObjectCache.h (modified) (2 diffs)
-
Source/WebCore/accessibility/AccessibilityObject.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r294170 r294186 1 2022-05-13 Tyler Wilcock <tyler_w@apple.com> 2 3 Infinite recursion caused by call to accessibilityIsIgnored in the midst of AccessibilityObject::ignoredFromModalPresence 4 https://bugs.webkit.org/show_bug.cgi?id=240365 5 6 Reviewed by Chris Fleizach. 7 8 * accessibility/aria-modal-with-text-crash-expected.txt: Added. 9 * accessibility/aria-modal-with-text-crash.html: Added. 10 * platform/glib/TestExpectations: Skip new test. 11 * platform/ios/TestExpectations: Enable new test. 12 * platform/win/TestExpectations: Skip new test. 13 1 14 2022-05-13 Tim Nguyen <ntim@apple.com> 2 15 -
trunk/LayoutTests/platform/glib/TestExpectations
r294146 r294186 352 352 353 353 # Missing AccessibilityUIElement::uiElementForSearchPredicate implementation. 354 accessibility/aria-modal-with-text-crash.html [ Skip ] 354 355 accessibility/display-contents-search-traversal.html [ Skip ] 355 356 accessibility/search-traversal-after-role-change.html [ Skip ] -
trunk/LayoutTests/platform/ios/TestExpectations
r294110 r294186 2136 2136 webkit.org/b/150366 accessibility/aria-table-attributes.html [ Pass ] 2137 2137 2138 accessibility/aria-modal-with-text-crash.html [ Pass ] 2138 2139 accessibility/display-contents-search-traversal.html [ Pass ] 2139 2140 accessibility/search-traversal-after-role-change.html [ Pass ] -
trunk/LayoutTests/platform/win/TestExpectations
r294067 r294186 482 482 483 483 # Missing AccessibilityUIElement::uiElementForSearchPredicate implementation. 484 accessibility/aria-modal-with-text-crash.html [ Skip ] 484 485 accessibility/display-contents-search-traversal.html [ Skip ] 485 486 accessibility/search-traversal-after-role-change.html [ Skip ] -
trunk/Source/WebCore/ChangeLog
r294182 r294186 1 2022-05-13 Tyler Wilcock <tyler_w@apple.com> 2 3 Infinite recursion caused by call to accessibilityIsIgnored in the midst of AccessibilityObject::ignoredFromModalPresence 4 https://bugs.webkit.org/show_bug.cgi?id=240365 5 6 Reviewed by Chris Fleizach. 7 8 We can get infinite recursion when accessibilityIsIgnored is called as 9 part of computing AccessibilityObject::ignoredFromModalPresence. One 10 example of such a cycle: 11 12 AXObjectCache::currentModalNode() -> 13 AccessibilityRenderObject::computeAccessibilityIsIgnored() -> 14 AccessibilityRenderObject::parentObjectUnignored() -> 15 AccessibilityObject::accessibilityIsIgnored() -> 16 AccessibilityObject::ignoredFromModalPresence() -> 17 AXObjectCache::currentModalNode() -> 18 ...repeat... 19 20 This patch fixes this by tracking when we start computing the current 21 modal node in the AXObjectCache. Then, in AccessibilityObject::accessibilityIsIgnored(), 22 we don't call AccessibilityObject::ignoredFromModalPresence() if this new state is true, 23 since in this context we only need to know if the object is inherently 24 ignored (i.e. ignored disregarding modal presence). 25 26 Test: accessibility/aria-modal-with-text-crash.html 27 28 * accessibility/AXObjectCache.cpp: 29 (WebCore::AXObjectCache::currentModalNode): 30 * accessibility/AXObjectCache.h: 31 Add m_isRetrievingCurrentModalNode. 32 (WebCore::AXObjectCache::isRetrievingCurrentModalNode): Added. 33 * accessibility/AccessibilityObject.cpp: 34 (WebCore::AccessibilityObject::accessibilityIsIgnored const): 35 Don't call ignoredFromModalPresence if we're in the midst of computing the current modal. 36 1 37 2022-05-13 Brent Fulgham <bfulgham@apple.com> 2 38 -
trunk/Source/WebCore/accessibility/AXObjectCache.cpp
r294167 r294186 307 307 } 308 308 309 SetForScope retrievingCurrentModalNode(m_isRetrievingCurrentModalNode, true); 309 310 // If any of the modal nodes contains the keyboard focus, we want to pick that one. 310 311 // If not, we want to pick the last visible dialog in the DOM. -
trunk/Source/WebCore/accessibility/AXObjectCache.h
r294167 r294186 200 200 void handleScrolledToAnchor(const Node* anchorNode); 201 201 void handleScrollbarUpdate(ScrollView*); 202 202 203 bool isRetrievingCurrentModalNode() { return m_isRetrievingCurrentModalNode; } 203 204 Node* modalNode(); 204 205 … … 519 520 ListHashSet<Element*> m_modalElementsSet; 520 521 bool m_modalNodesInitialized { false }; 522 bool m_isRetrievingCurrentModalNode { false }; 521 523 522 524 Timer m_performCacheUpdateTimer; -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r293650 r294186 3747 3747 } 3748 3748 3749 bool ignored = ignoredFromModalPresence(); 3749 // If we are in the midst of retrieving the current modal node, we only need to consider whether the object 3750 // is inherently ignored via computeAccessibilityIsIgnored. Also, calling ignoredFromModalPresence 3751 // in this state would cause infinite recursion. 3752 bool ignored = cache && cache->isRetrievingCurrentModalNode() ? false : ignoredFromModalPresence(); 3750 3753 if (!ignored) 3751 3754 ignored = computeAccessibilityIsIgnored();
Note:
See TracChangeset
for help on using the changeset viewer.