Permalink
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 -[WebAccessibilityObjectWrapper _accessibilityMinValue] …
…+ 24 https://bugs.webkit.org/show_bug.cgi?id=178697 Reviewed by Chris Fleizach. Source/WebCore: When we are calling _accessibilityMinValue and _accessibilityMaxValue on iOS, it might cause crash if the AX object has already been detached. Fixed this by adding the necessary checks. Test: accessibility/ios-simulator/slider-min-value-crash.html * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper _accessibilityMinValue]): (-[WebAccessibilityObjectWrapper _accessibilityMaxValue]): LayoutTests: * accessibility/ios-simulator/slider-min-value-crash-expected.txt: Added. * accessibility/ios-simulator/slider-min-value-crash.html: Added. Canonical link: https://commits.webkit.org/194877@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
78 additions
and 0 deletions.
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
@@ -0,0 +1,11 @@ | ||
This tests that accessing the min/max value of a detached ax object won't cause crash. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS sliderObj.minValue is 25 | ||
PASS sliderObj.minValue is 0 | ||
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
@@ -0,0 +1,34 @@ | ||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | ||
<html> | ||
<head> | ||
<script src="../../resources/js-test-pre.js"></script> | ||
</head> | ||
<body id="body"> | ||
|
||
<input type="range" id="slider" value="50" min="25" max="75"> | ||
|
||
<p id="description"></p> | ||
<div id="console"></div> | ||
|
||
<script> | ||
|
||
description("This tests that accessing the min/max value of a detached ax object won't cause crash."); | ||
|
||
if (window.accessibilityController) { | ||
|
||
var sliderObj = accessibilityController.accessibleElementById("slider"); | ||
shouldBe("sliderObj.minValue", "25"); | ||
|
||
// Remove the element | ||
var slider = document.getElementById("slider"); | ||
slider.parentNode.removeChild(slider); | ||
|
||
// Make sure it won't crash | ||
shouldBe("sliderObj.minValue", "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