In AccessibleBase::get_accParent, the parent AccessibilityObject should first be attempted to be retrieved. Only if this fails should we query the WebView::AccessibleObjectFromWindow for an IAccessible implementation.
*** Bug 22895 has been marked as a duplicate of this bug. ***
Created attachment 26081 [details] Fixes the issue described in this bug.
Comment on attachment 26081 [details] Fixes the issue described in this bug. > > + AccessibilityObject* parentObj = m_object->parentObjectUnignored(); > + > + if (parentObj) { > + *parent = static_cast<IDispatch*>(wrapper(parentObj)); > + (*parent)->AddRef(); > + return S_OK; > + } > + > return WebView::AccessibleObjectFromWindow(m_object->topDocumentFrameView()->hostWindow()->platformWindow(), > OBJID_WINDOW, __uuidof(IAccessible), reinterpret_cast<void**>(parent)); > } Our coding style prefers early returns, so this would be better written as: if (!parentObject) { return WebView::AccessibleObjectFromWindow(m_object->topDocumentFrameView()->hostWindow()->platformWindow(), OBJID_WINDOW, __uuidof(IAccessible), reinterpret_cast<void**>(parent)); } *parent = static_cast<IDispatch*>(wrapper(parentObj)); (*parent)->AddRef(); return S_OK; The change looks correct, but it will need a layout test for the new behavior. r- for this reason. Thanks for the patch, Jonas!
Created attachment 46734 [details] patch
Committed in r53368.
<rdar://problem/7549921>