[webkit-reviews] review denied: [Bug 22893] get_accParent should try to retrieve parent AccessibilityObject, before calling upon window : [Attachment 26081] Fixes the issue described in this bug.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 17 14:27:41 PST 2008


Jon Honeycutt <jhoneycutt at apple.com> has denied Jonas Klink
<klinktech at gmail.com>'s request for review:
Bug 22893: get_accParent should try to retrieve parent AccessibilityObject,
before calling upon window
https://bugs.webkit.org/show_bug.cgi?id=22893

Attachment 26081: Fixes the issue described in this bug.
https://bugs.webkit.org/attachment.cgi?id=26081&action=review

------- Additional Comments from Jon Honeycutt <jhoneycutt at apple.com>

>  
> +    AccessibilityObject* parentObj = m_object->parentObjectUnignored();
> +
> +    if (parentObj) {
> +	   *parent = static_cast<IDispatch*>(wrapper(parentObj));
> +	   (*parent)->AddRef();
> +	   return S_OK;
> +    }
> +
>      return
WebView::AccessibleObjectFromWindow(m_object->topDocumentFrameView()->hostWindo
w()->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()->hostWindo
w()->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!


More information about the webkit-reviews mailing list