mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 741701 - CAccessibleHyperlink::get_anchor shouldn't use nsIWinAccessNode, r=tbsaunde, f=surkov
This commit is contained in:
parent
f1f4649a94
commit
e641d58724
@ -44,7 +44,7 @@
|
||||
#include "AccessibleHyperlink.h"
|
||||
#include "AccessibleHyperlink_i.c"
|
||||
|
||||
#include "nsAccessible.h"
|
||||
#include "nsAccessibleWrap.h"
|
||||
#include "nsIWinAccessNode.h"
|
||||
|
||||
// IUnknown
|
||||
@ -82,20 +82,17 @@ __try {
|
||||
if (aIndex < 0 || aIndex >= static_cast<long>(thisObj->AnchorCount()))
|
||||
return E_INVALIDARG;
|
||||
|
||||
nsAccessible* anchor = thisObj->AnchorAt(aIndex);
|
||||
nsAccessibleWrap* anchor =
|
||||
static_cast<nsAccessibleWrap*>(thisObj->AnchorAt(aIndex));
|
||||
if (!anchor)
|
||||
return S_FALSE;
|
||||
|
||||
nsCOMPtr<nsIWinAccessNode> winAccessNode(do_QueryObject(anchor));
|
||||
if (!winAccessNode)
|
||||
return E_FAIL;
|
||||
void* instancePtr = NULL;
|
||||
HRESULT result = anchor->QueryInterface(IID_IUnknown, &instancePtr);
|
||||
if (FAILED(result))
|
||||
return result;
|
||||
|
||||
void *instancePtr = NULL;
|
||||
nsresult rv = winAccessNode->QueryNativeInterface(IID_IUnknown, &instancePtr);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
|
||||
IUnknown *unknownPtr = static_cast<IUnknown*>(instancePtr);
|
||||
IUnknown* unknownPtr = static_cast<IUnknown*>(instancePtr);
|
||||
aAnchor->ppunkVal = &unknownPtr;
|
||||
aAnchor->vt = VT_UNKNOWN;
|
||||
return S_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user