Changeset 266787 in webkit
- Timestamp:
- Sep 9, 2020, 10:42:00 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
accessibility/AccessibilityMenuList.cpp (modified) (2 diffs)
-
accessibility/AccessibilityMenuListPopup.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r266783 r266787 1 2020-09-09 Andres Gonzalez <andresg_22@apple.com> 2 3 AccessibilityMenuList and MenuListPopup notifications need to be posted asynchronously. 4 https://bugs.webkit.org/show_bug.cgi?id=216309 5 <rdar://problem/68108824> 6 7 Reviewed by Chris Fleizach. 8 9 MenuList notifications were posted synchronously which triggers a DOM 10 layout and style update in the middle of an ongoing DOM mutation update. 11 This is unnecessary and, furthermore, causes crashes since the DOM 12 layout update cannot be re-entrant. This change makes these 13 notifications asynchronous. 14 15 * accessibility/AccessibilityMenuList.cpp: 16 (WebCore::AccessibilityMenuList::didUpdateActiveOption): 17 * accessibility/AccessibilityMenuListPopup.cpp: 18 (WebCore::AccessibilityMenuListPopup::didUpdateActiveOption): 19 1 20 2020-09-09 Zalan Bujtas <zalan@apple.com> 2 21 -
trunk/Source/WebCore/accessibility/AccessibilityMenuList.cpp
r265514 r266787 118 118 { 119 119 Ref<Document> document(m_renderer->document()); 120 AXObjectCache* cache = document->axObjectCache();121 120 122 121 const auto& childObjects = children(); … … 137 136 } 138 137 139 cache->postNotification(this, document.ptr(), AXObjectCache::AXMenuListValueChanged, TargetElement, PostSynchronously); 138 if (auto* cache = document->axObjectCache()) 139 cache->postNotification(this, document.ptr(), AXObjectCache::AXMenuListValueChanged, TargetElement, PostAsynchronously); 140 140 } 141 141 -
trunk/Source/WebCore/accessibility/AccessibilityMenuListPopup.cpp
r265514 r266787 125 125 ASSERT_ARG(optionIndex, optionIndex < static_cast<int>(m_children.size())); 126 126 127 AXObjectCache* cache = axObjectCache();128 127 RefPtr<AXCoreObject> child = m_children[optionIndex].get(); 129 128 130 cache->postNotification(child.get(), document(), AXObjectCache::AXFocusedUIElementChanged, TargetElement, PostSynchronously); 131 cache->postNotification(child.get(), document(), AXObjectCache::AXMenuListItemSelected, TargetElement, PostSynchronously); 129 if (auto* cache = axObjectCache()) { 130 cache->postNotification(child.get(), document(), AXObjectCache::AXFocusedUIElementChanged, TargetElement, PostAsynchronously); 131 cache->postNotification(child.get(), document(), AXObjectCache::AXMenuListItemSelected, TargetElement, PostAsynchronously); 132 } 132 133 } 133 134
Note:
See TracChangeset
for help on using the changeset viewer.