Changeset 277434 in webkit
- Timestamp:
- May 13, 2021, 7:30:23 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/accessibility/mac/menu-selection-notification-crash-expected.txt (added)
-
LayoutTests/accessibility/mac/menu-selection-notification-crash.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/accessibility/AXObjectCache.cpp (modified) (2 diffs)
-
Source/WebCore/accessibility/AXObjectCache.h (modified) (2 diffs)
-
Source/WebCore/accessibility/AccessibilityMenuList.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r277432 r277434 1 2021-05-13 Chris Fleizach <cfleizach@apple.com> 2 3 AX: Crash at WebCore::Document::updateLayout 4 https://bugs.webkit.org/show_bug.cgi?id=225677 5 6 Reviewed by Alan Bujtas. 7 8 * accessibility/mac/menu-selection-notification-crash-expected.txt: Added. 9 * accessibility/mac/menu-selection-notification-crash.html: Added. 10 1 11 2021-05-13 Enrique Ocaña González <eocanha@igalia.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r277432 r277434 1 2021-05-13 Chris Fleizach <cfleizach@apple.com> 2 3 AX: Crash at WebCore::Document::updateLayout 4 https://bugs.webkit.org/show_bug.cgi?id=225677 5 6 Reviewed by Alan Bujtas. 7 8 Handling notifications while during layout is risky because we can call back into an update method. 9 We have handled many other cases like this by deferring the notification, as we do here. 10 Special note: this test can't be made to crash because actual crash requires the accessibility 11 runtime to be initialized and posting real notifications to the system. But, we can verify that the 12 notification is still sent correctly under conditions that could lead to a crash. 13 14 Test: accessibility/mac/menu-selection-notification-crash.html 15 16 * accessibility/AXObjectCache.cpp: 17 (WebCore::AXObjectCache::deferMenuListValueChange): 18 (WebCore::AXObjectCache::performDeferredCacheUpdate): 19 * accessibility/AXObjectCache.h: 20 * accessibility/AccessibilityMenuList.cpp: 21 (WebCore::AccessibilityMenuList::didUpdateActiveOption): 22 1 23 2021-05-13 Enrique Ocaña González <eocanha@igalia.com> 2 24 -
trunk/Source/WebCore/accessibility/AXObjectCache.cpp
r277382 r277434 1229 1229 } else 1230 1230 handleFocusedUIElementChanged(oldNode, newNode); 1231 } 1232 1233 void AXObjectCache::deferMenuListValueChange(Element* element) 1234 { 1235 m_deferredMenuListChange.add(element); 1236 if (!m_performCacheUpdateTimer.isActive()) 1237 m_performCacheUpdateTimer.startOneShot(0_s); 1231 1238 } 1232 1239 … … 3197 3204 m_deferredModalChangedList.clear(); 3198 3205 3206 for (auto& deferredMenuListChangeElement : m_deferredMenuListChange) 3207 postNotification(&deferredMenuListChangeElement, AXObjectCache::AXMenuListValueChanged); 3208 m_deferredMenuListChange.clear(); 3209 3199 3210 platformPerformDeferredCacheUpdate(); 3200 3211 } -
trunk/Source/WebCore/accessibility/AXObjectCache.h
r273869 r277434 188 188 void deferFocusedUIElementChangeIfNeeded(Node* oldFocusedNode, Node* newFocusedNode); 189 189 void deferModalChange(Element*); 190 void deferMenuListValueChange(Element*); 190 191 void handleScrolledToAnchor(const Node* anchorNode); 191 192 void handleScrollbarUpdate(ScrollView*); … … 514 515 ListHashSet<Node*> m_deferredChildrenChangedNodeList; 515 516 WeakHashSet<Element> m_deferredModalChangedList; 517 WeakHashSet<Element> m_deferredMenuListChange; 516 518 HashMap<Element*, String> m_deferredTextFormControlValue; 517 519 HashMap<Element*, QualifiedName> m_deferredAttributeChange; -
trunk/Source/WebCore/accessibility/AccessibilityMenuList.cpp
r266805 r277434 137 137 138 138 if (auto* cache = document->axObjectCache()) 139 cache-> postNotification(this, document.ptr(), AXObjectCache::AXMenuListValueChanged);139 cache->deferMenuListValueChange(element()); 140 140 } 141 141
Note:
See TracChangeset
for help on using the changeset viewer.