RESOLVED FIXED22893
get_accParent should try to retrieve parent AccessibilityObject, before calling upon window
https://bugs.webkit.org/show_bug.cgi?id=22893
Summary get_accParent should try to retrieve parent AccessibilityObject, before calli...
Jonas Klink
Reported 2008-12-16 16:14:58 PST
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.
Attachments
Fixes the issue described in this bug. (1.26 KB, patch)
2008-12-16 18:21 PST, Jonas Klink
jhoneycutt: review-
patch (6.42 KB, patch)
2010-01-15 21:43 PST, Jon Honeycutt
darin: review+
jhoneycutt: commit-queue-
Jonas Klink
Comment 1 2008-12-16 17:19:46 PST
*** Bug 22895 has been marked as a duplicate of this bug. ***
Jonas Klink
Comment 2 2008-12-16 18:21:41 PST
Created attachment 26081 [details] Fixes the issue described in this bug.
Jon Honeycutt
Comment 3 2008-12-17 14:27:41 PST
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!
Jon Honeycutt
Comment 4 2010-01-15 21:43:35 PST
Jon Honeycutt
Comment 5 2010-01-16 20:14:45 PST
Committed in r53368.
Jon Honeycutt
Comment 6 2010-01-16 20:16:17 PST
Note You need to log in before you can comment on or make changes to this bug.