[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
cfleizach at apple.com
cfleizach at apple.com
Wed Dec 22 13:17:54 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit fbca8294e7810d403329c0bb629ed43bae08c3b4
Author: cfleizach at apple.com <cfleizach at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Sep 10 16:38:34 2010 +0000
Mail crashes with searching for next misspelled word with VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=45501
Reviewed by David Kilzer.
WebCore:
Test: platform/mac/accessibility/crash-in-element-for-text-marker.html
* accessibility/mac/AccessibilityObjectWrapper.mm:
(-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
Check that the AX object is not nil before asking for the wrapper().
LayoutTests:
* platform/mac/accessibility/crash-in-element-for-text-marker-expected.txt: Added.
* platform/mac/accessibility/crash-in-element-for-text-marker.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ca22ed1..5f41e89 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-10 Chris Fleizach <cfleizach at apple.com>
+
+ Reviewed by David Kilzer.
+
+ Mail crashes with searching for next misspelled word with VoiceOver
+ https://bugs.webkit.org/show_bug.cgi?id=45501
+
+ * platform/mac/accessibility/crash-in-element-for-text-marker-expected.txt: Added.
+ * platform/mac/accessibility/crash-in-element-for-text-marker.html: Added.
+
2010-09-10 Tor Arne Vestbø <tor.arne.vestbo at nokia.com>
Reviewed by Eric Carlson.
diff --git a/LayoutTests/platform/mac/accessibility/crash-in-element-for-text-marker-expected.txt b/LayoutTests/platform/mac/accessibility/crash-in-element-for-text-marker-expected.txt
new file mode 100644
index 0000000..3cc92ee
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/crash-in-element-for-text-marker-expected.txt
@@ -0,0 +1,10 @@
+asdf asdf
+This protects against a crash when AXUIElementForTextMarker is queried with an empty text marker.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/mac/accessibility/crash-in-element-for-text-marker.html b/LayoutTests/platform/mac/accessibility/crash-in-element-for-text-marker.html
new file mode 100644
index 0000000..5bbef11
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/crash-in-element-for-text-marker.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
+<script>
+var successfullyParsed = false;
+</script>
+<script src="../../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body id="body">
+
+asdf
+
+<div id="content" tabindex="0">test</div>
+
+asdf
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This protects against a crash when AXUIElementForTextMarker is queried with an empty text marker.");
+
+ if (window.accessibilityController) {
+
+ document.getElementById("content").focus();
+ var content = accessibilityController.focusedElement;
+
+ // get a marker that is invalid (the next one after the end of the body).
+ var textMarkerRange = content.textMarkerRangeForElement(content);
+ var endMarker = content.endTextMarkerForTextMarkerRange(textMarkerRange);
+
+ // Remove "content" so that the text marker becomes invalid.
+ document.getElementById("body").removeChild(document.getElementById("content"));
+
+ document.getElementById("body").focus();
+ var body = accessibilityController.focusedElement;
+
+ // Ask for the ui element for that marker (should not crash).
+ body.accessibilityElementForTextMarker(endMarker);
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8128fbd..91728f2 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-09-10 Chris Fleizach <cfleizach at apple.com>
+
+ Reviewed by David Kilzer.
+
+ Mail crashes with searching for next misspelled word with VoiceOver
+ https://bugs.webkit.org/show_bug.cgi?id=45501
+
+ Test: platform/mac/accessibility/crash-in-element-for-text-marker.html
+
+ * accessibility/mac/AccessibilityObjectWrapper.mm:
+ (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
+ Check that the AX object is not nil before asking for the wrapper().
+
2010-09-10 Michael Nordman <michaeln at google.com>
Reviewed by Dumitru Daniliuc.
diff --git a/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm b/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
index 859a799..96a0ebc 100644
--- a/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
+++ b/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
@@ -2354,7 +2354,10 @@ static RenderObject* rendererForView(NSView* view)
// dispatch
if ([attribute isEqualToString:@"AXUIElementForTextMarker"]) {
VisiblePosition visiblePos = visiblePositionForTextMarker(textMarker);
- return m_object->accessibilityObjectForPosition(visiblePos)->wrapper();
+ AccessibilityObject* axObject = m_object->accessibilityObjectForPosition(visiblePos);
+ if (!axObject)
+ return nil;
+ return axObject->wrapper();
}
if ([attribute isEqualToString:@"AXTextMarkerRangeForUIElement"]) {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list