Commit aa8721f0 authored by pyeh's avatar pyeh

<rdar://problem/4918397> Exception raise inspecting note contents in the background

        * bridge/mac/WebCoreAXObject.mm:
        (-[WebCoreAXObject subrole]):
        (-[WebCoreAXObject title]):
	Check that attachment supports the attribute before requesting it.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3b45d4ce
2007-03-29 Patti Hoa <patti@apple.com>
Reviewed by harrison.
<rdar://problem/4918397> Exception raise inspecting note contents in the background
* WebCore.xcodeproj/project.pbxproj:
* bridge/mac/WebCoreAXObject.mm:
(-[WebCoreAXObject subrole]):
(-[WebCoreAXObject title]):
Check that attachment supports the attribute before requesting it.
2007-03-29 Justin Garcia <justin.garcia@apple.com>
Reviewed by john
......@@ -442,9 +442,13 @@ static int headingLevel(RenderObject* renderer)
{
if ([self isPasswordField])
return NSAccessibilitySecureTextFieldSubrole;
if ([self isAttachment])
return [[self attachmentView] accessibilityAttributeValue:NSAccessibilitySubroleAttribute];
if ([self isAttachment]) {
NSView* attachmentView = [self attachmentView];
if ([[attachmentView accessibilityAttributeNames] containsObject:NSAccessibilitySubroleAttribute]) {
return [attachmentView accessibilityAttributeValue:NSAccessibilitySubroleAttribute];
}
}
return nil;
}
......@@ -643,8 +647,12 @@ static HTMLLabelElement* labelForElement(Element* element)
if (m_renderer->element()->isLink())
return [self textUnderElement];
if ([self isAttachment])
return [[self attachmentView] accessibilityAttributeValue:NSAccessibilityTitleAttribute];
if ([self isAttachment]) {
NSView* attachmentView = [self attachmentView];
if ([[attachmentView accessibilityAttributeNames] containsObject:NSAccessibilityTitleAttribute]) {
return [attachmentView accessibilityAttributeValue:NSAccessibilityTitleAttribute];
}
}
return nil;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment