Reviewed by Vicki.
[WebKit-https.git] / WebCore / kwq / KWQAccObject.mm
index b2b50c4f6874f11d3b7c1708e9e747c0fa845d1d..bfa44f9a89617376cd776a03f3d2b8c8072b62f1 100644 (file)
@@ -1792,16 +1792,18 @@ static void AXAttributedStringAppendReplaced (NSMutableAttributedString *attrStr
 - (id)accessibilityHitTest:(NSPoint)point
 {
     if (!m_renderer)
-        return self;
+        return NSAccessibilityUnignoredAncestor(self);
     
     RenderObject::NodeInfo nodeInfo(true, true);
     m_renderer->layer()->hitTest(nodeInfo, (int)point.x, (int)point.y);
     if (!nodeInfo.innerNode())
-        return self;
+        return NSAccessibilityUnignoredAncestor(self);
     RenderObject* obj = nodeInfo.innerNode()->renderer();
     if (!obj)
-        return self;
-    return obj->document()->getAccObjectCache()->accObject(obj);
+        return NSAccessibilityUnignoredAncestor(self);
+    
+    KWQAccObject * accObject = obj->document()->getAccObjectCache()->accObject(obj);
+    return NSAccessibilityUnignoredAncestor(accObject);
 }
 
 // _accessibilityParentForSubview is called by AppKit when moving up the tree