Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
AX: Crash at WebCore::Document::updateLayout
https://bugs.webkit.org/show_bug.cgi?id=225677 Reviewed by Alan Bujtas. Source/WebCore: Handling notifications while during layout is risky because we can call back into an update method. We have handled many other cases like this by deferring the notification, as we do here. Special note: this test can't be made to crash because actual crash requires the accessibility runtime to be initialized and posting real notifications to the system. But, we can verify that the notification is still sent correctly under conditions that could lead to a crash. Test: accessibility/mac/menu-selection-notification-crash.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::deferMenuListValueChange): (WebCore::AXObjectCache::performDeferredCacheUpdate): * accessibility/AXObjectCache.h: * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::didUpdateActiveOption): LayoutTests: * accessibility/mac/menu-selection-notification-crash-expected.txt: Added. * accessibility/mac/menu-selection-notification-crash.html: Added. Canonical link: https://commits.webkit.org/237682@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277434 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
7 changed files
with
107 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
This tests that inserting a node into a select menu won't cause a crash. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS addedNotification is true | ||
menu role: AXRole: AXPopUpButton | ||
Notification received successfully. | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | ||
<html> | ||
<head> | ||
<script src="../../resources/js-test-pre.js"></script> | ||
<script src="../../resources/accessibility-helper.js"></script> | ||
</head> | ||
<body id="body"> | ||
|
||
<div id="content"> | ||
<select id="menu"> | ||
</select> | ||
</div> | ||
|
||
<p id="description"></p> | ||
<div id="console"></div> | ||
|
||
<script> | ||
|
||
description("This tests that inserting a node into a select menu won't cause a crash."); | ||
|
||
var axNotificationElement = null; | ||
function notificationCallback(element, notification, state) { | ||
if (notification == "AXMenuItemSelected") { | ||
debug("Notification received successfully."); | ||
finishJSTest(); | ||
} | ||
} | ||
|
||
if (window.accessibilityController) { | ||
jsTestIsAsync = true; | ||
var addedNotification = accessibilityController.addNotificationListener(notificationCallback); | ||
shouldBeTrue("addedNotification"); | ||
|
||
var menu = accessibilityController.accessibleElementById("menu"); | ||
debug("menu role: " + menu.role); | ||
|
||
setTimeout(function() { | ||
var opt = document.createElement('option'); | ||
opt.value = "c"; | ||
opt.innerHTML = "c"; | ||
document.getElementById("menu").appendChild(opt); | ||
}, 0); | ||
} | ||
|
||
</script> | ||
<script src="../../resources/js-test-post.js"></script> | ||
</body> | ||
</html> |
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