Changeset 294739 in webkit
- Timestamp:
- May 23, 2022, 11:14:12 PM (4 years ago)
- Location:
- branches/safari-7614.1.14.1-branch
- 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
-
branches/safari-7614.1.14.1-branch/LayoutTests/ChangeLog
r294129 r294739 1 2022-05-23 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r294186. rdar://problem/93805727 4 5 Infinite recursion caused by call to accessibilityIsIgnored in the midst of AccessibilityObject::ignoredFromModalPresence 6 https://bugs.webkit.org/show_bug.cgi?id=240365 7 8 Reviewed by Chris Fleizach. 9 10 Source/WebCore: 11 12 We can get infinite recursion when accessibilityIsIgnored is called as 13 part of computing AccessibilityObject::ignoredFromModalPresence. One 14 example of such a cycle: 15 16 AXObjectCache::currentModalNode() -> 17 AccessibilityRenderObject::computeAccessibilityIsIgnored() -> 18 AccessibilityRenderObject::parentObjectUnignored() -> 19 AccessibilityObject::accessibilityIsIgnored() -> 20 AccessibilityObject::ignoredFromModalPresence() -> 21 AXObjectCache::currentModalNode() -> 22 ...repeat... 23 24 This patch fixes this by tracking when we start computing the current 25 modal node in the AXObjectCache. Then, in AccessibilityObject::accessibilityIsIgnored(), 26 we don't call AccessibilityObject::ignoredFromModalPresence() if this new state is true, 27 since in this context we only need to know if the object is inherently 28 ignored (i.e. ignored disregarding modal presence). 29 30 Test: accessibility/aria-modal-with-text-crash.html 31 32 * accessibility/AXObjectCache.cpp: 33 (WebCore::AXObjectCache::currentModalNode): 34 * accessibility/AXObjectCache.h: 35 Add m_isRetrievingCurrentModalNode. 36 (WebCore::AXObjectCache::isRetrievingCurrentModalNode): Added. 37 * accessibility/AccessibilityObject.cpp: 38 (WebCore::AccessibilityObject::accessibilityIsIgnored const): 39 Don't call ignoredFromModalPresence if we're in the midst of computing the current modal. 40 41 LayoutTests: 42 43 * accessibility/aria-modal-with-text-crash-expected.txt: Added. 44 * accessibility/aria-modal-with-text-crash.html: Added. 45 * platform/glib/TestExpectations: Skip new test. 46 * platform/ios/TestExpectations: Enable new test. 47 * platform/win/TestExpectations: Skip new test. 48 49 50 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294186 268f45cc-cd09-0410-ab3c-d52691b4dbfc 51 52 2022-05-13 Tyler Wilcock <tyler_w@apple.com> 53 54 Infinite recursion caused by call to accessibilityIsIgnored in the midst of AccessibilityObject::ignoredFromModalPresence 55 https://bugs.webkit.org/show_bug.cgi?id=240365 56 57 Reviewed by Chris Fleizach. 58 59 * accessibility/aria-modal-with-text-crash-expected.txt: Added. 60 * accessibility/aria-modal-with-text-crash.html: Added. 61 * platform/glib/TestExpectations: Skip new test. 62 * platform/ios/TestExpectations: Enable new test. 63 * platform/win/TestExpectations: Skip new test. 64 1 65 2022-05-12 Russell Epstein <repstein@apple.com> 2 66 -
branches/safari-7614.1.14.1-branch/LayoutTests/platform/glib/TestExpectations
r293771 r294739 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 ] -
branches/safari-7614.1.14.1-branch/LayoutTests/platform/ios/TestExpectations
r293927 r294739 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 ] -
branches/safari-7614.1.14.1-branch/LayoutTests/platform/win/TestExpectations
r293345 r294739 484 484 485 485 # Missing AccessibilityUIElement::uiElementForSearchPredicate implementation. 486 accessibility/aria-modal-with-text-crash.html [ Skip ] 486 487 accessibility/display-contents-search-traversal.html [ Skip ] 487 488 accessibility/search-traversal-after-role-change.html [ Skip ] -
branches/safari-7614.1.14.1-branch/Source/WebCore/ChangeLog
r294308 r294739 1 2022-05-23 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r294186. rdar://problem/93805727 4 5 Infinite recursion caused by call to accessibilityIsIgnored in the midst of AccessibilityObject::ignoredFromModalPresence 6 https://bugs.webkit.org/show_bug.cgi?id=240365 7 8 Reviewed by Chris Fleizach. 9 10 Source/WebCore: 11 12 We can get infinite recursion when accessibilityIsIgnored is called as 13 part of computing AccessibilityObject::ignoredFromModalPresence. One 14 example of such a cycle: 15 16 AXObjectCache::currentModalNode() -> 17 AccessibilityRenderObject::computeAccessibilityIsIgnored() -> 18 AccessibilityRenderObject::parentObjectUnignored() -> 19 AccessibilityObject::accessibilityIsIgnored() -> 20 AccessibilityObject::ignoredFromModalPresence() -> 21 AXObjectCache::currentModalNode() -> 22 ...repeat... 23 24 This patch fixes this by tracking when we start computing the current 25 modal node in the AXObjectCache. Then, in AccessibilityObject::accessibilityIsIgnored(), 26 we don't call AccessibilityObject::ignoredFromModalPresence() if this new state is true, 27 since in this context we only need to know if the object is inherently 28 ignored (i.e. ignored disregarding modal presence). 29 30 Test: accessibility/aria-modal-with-text-crash.html 31 32 * accessibility/AXObjectCache.cpp: 33 (WebCore::AXObjectCache::currentModalNode): 34 * accessibility/AXObjectCache.h: 35 Add m_isRetrievingCurrentModalNode. 36 (WebCore::AXObjectCache::isRetrievingCurrentModalNode): Added. 37 * accessibility/AccessibilityObject.cpp: 38 (WebCore::AccessibilityObject::accessibilityIsIgnored const): 39 Don't call ignoredFromModalPresence if we're in the midst of computing the current modal. 40 41 LayoutTests: 42 43 * accessibility/aria-modal-with-text-crash-expected.txt: Added. 44 * accessibility/aria-modal-with-text-crash.html: Added. 45 * platform/glib/TestExpectations: Skip new test. 46 * platform/ios/TestExpectations: Enable new test. 47 * platform/win/TestExpectations: Skip new test. 48 49 50 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294186 268f45cc-cd09-0410-ab3c-d52691b4dbfc 51 52 2022-05-13 Tyler Wilcock <tyler_w@apple.com> 53 54 Infinite recursion caused by call to accessibilityIsIgnored in the midst of AccessibilityObject::ignoredFromModalPresence 55 https://bugs.webkit.org/show_bug.cgi?id=240365 56 57 Reviewed by Chris Fleizach. 58 59 We can get infinite recursion when accessibilityIsIgnored is called as 60 part of computing AccessibilityObject::ignoredFromModalPresence. One 61 example of such a cycle: 62 63 AXObjectCache::currentModalNode() -> 64 AccessibilityRenderObject::computeAccessibilityIsIgnored() -> 65 AccessibilityRenderObject::parentObjectUnignored() -> 66 AccessibilityObject::accessibilityIsIgnored() -> 67 AccessibilityObject::ignoredFromModalPresence() -> 68 AXObjectCache::currentModalNode() -> 69 ...repeat... 70 71 This patch fixes this by tracking when we start computing the current 72 modal node in the AXObjectCache. Then, in AccessibilityObject::accessibilityIsIgnored(), 73 we don't call AccessibilityObject::ignoredFromModalPresence() if this new state is true, 74 since in this context we only need to know if the object is inherently 75 ignored (i.e. ignored disregarding modal presence). 76 77 Test: accessibility/aria-modal-with-text-crash.html 78 79 * accessibility/AXObjectCache.cpp: 80 (WebCore::AXObjectCache::currentModalNode): 81 * accessibility/AXObjectCache.h: 82 Add m_isRetrievingCurrentModalNode. 83 (WebCore::AXObjectCache::isRetrievingCurrentModalNode): Added. 84 * accessibility/AccessibilityObject.cpp: 85 (WebCore::AccessibilityObject::accessibilityIsIgnored const): 86 Don't call ignoredFromModalPresence if we're in the midst of computing the current modal. 87 1 88 2022-05-16 Russell Epstein <repstein@apple.com> 2 89 -
branches/safari-7614.1.14.1-branch/Source/WebCore/accessibility/AXObjectCache.cpp
r293566 r294739 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. -
branches/safari-7614.1.14.1-branch/Source/WebCore/accessibility/AXObjectCache.h
r293566 r294739 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 … … 517 518 ListHashSet<Element*> m_modalElementsSet; 518 519 bool m_modalNodesInitialized { false }; 520 bool m_isRetrievingCurrentModalNode { false }; 519 521 520 522 Timer m_performCacheUpdateTimer; -
branches/safari-7614.1.14.1-branch/Source/WebCore/accessibility/AccessibilityObject.cpp
r293650 r294739 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.