mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
bug 648267 - remove nsIWinAccessNode r=surkov
This commit is contained in:
parent
997cfb88cc
commit
8a1ade07de
@ -9,16 +9,11 @@ VPATH = @srcdir@
|
||||
|
||||
LIBRARY_NAME = AccessibleMarshal
|
||||
MODULE = accessibility
|
||||
XPIDL_MODULE = accessibility-msaa
|
||||
GRE_MODULE = 1
|
||||
DEFFILE = $(win_srcdir)/AccessibleMarshal.def
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
XPIDLSRCS = \
|
||||
nsIWinAccessNode.idl \
|
||||
$(NULL)
|
||||
|
||||
DEFINES += -DREGISTER_PROXY_DLL
|
||||
|
||||
GARBAGE += $(MIDL_GENERATED_FILES) done_gen dlldata.c
|
||||
|
@ -1,20 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
%{C++
|
||||
#include "guiddef.h"
|
||||
%}
|
||||
|
||||
[ref] native MSCOMIIDRef(IID);
|
||||
|
||||
[uuid(63efe9c5-2610-4d2f-861b-e4ddfe1b70d9)]
|
||||
interface nsIWinAccessNode : nsISupports
|
||||
{
|
||||
voidPtr queryNativeInterface([const] in MSCOMIIDRef aIID);
|
||||
};
|
||||
|
@ -45,18 +45,7 @@ nsAccessNodeWrap::~nsAccessNodeWrap()
|
||||
// nsISupports methods
|
||||
//-----------------------------------------------------
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsAccessNodeWrap, nsAccessNode, nsIWinAccessNode)
|
||||
|
||||
//-----------------------------------------------------
|
||||
// nsIWinAccessNode methods
|
||||
//-----------------------------------------------------
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessNodeWrap::QueryNativeInterface(REFIID aIID, void** aInstancePtr)
|
||||
{
|
||||
// XXX Wrong for E_NOINTERFACE
|
||||
return static_cast<nsresult>(QueryInterface(aIID, aInstancePtr));
|
||||
}
|
||||
NS_IMPL_ISUPPORTS_INHERITED0(nsAccessNodeWrap, nsAccessNode)
|
||||
|
||||
STDMETHODIMP nsAccessNodeWrap::QueryInterface(REFIID iid, void** ppv)
|
||||
{
|
||||
@ -122,12 +111,12 @@ nsAccessNodeWrap::QueryService(REFGUID guidService, REFIID iid, void** ppv)
|
||||
// Can get to IAccessibleApplication from any node via QS
|
||||
if (guidService == IID_IAccessibleApplication ||
|
||||
(Compatibility::IsJAWS() && iid == IID_IAccessibleApplication)) {
|
||||
ApplicationAccessible* applicationAcc = ApplicationAcc();
|
||||
ApplicationAccessibleWrap* applicationAcc =
|
||||
static_cast<ApplicationAccessibleWrap*>(ApplicationAcc());
|
||||
if (!applicationAcc)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
nsresult rv = applicationAcc->QueryNativeInterface(iid, ppv);
|
||||
return NS_SUCCEEDED(rv) ? S_OK : E_NOINTERFACE;
|
||||
return applicationAcc->QueryInterface(iid, ppv);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIAccessible.h"
|
||||
#include "nsIAccessibleEvent.h"
|
||||
#include "nsIWinAccessNode.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsAccessNode.h"
|
||||
@ -55,12 +54,10 @@ namespace a11y {
|
||||
#endif
|
||||
|
||||
class nsAccessNodeWrap : public nsAccessNode,
|
||||
public nsIWinAccessNode,
|
||||
public IServiceProvider
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIWINACCESSNODE
|
||||
|
||||
public: // construction, destruction
|
||||
nsAccessNodeWrap(nsIContent* aContent, DocAccessible* aDoc);
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "AccessibleHyperlink_i.c"
|
||||
|
||||
#include "AccessibleWrap.h"
|
||||
#include "nsIWinAccessNode.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
|
@ -45,17 +45,12 @@ ia2AccessibleHypertext::get_hyperlink(long aLinkIndex,
|
||||
return CO_E_OBJNOTCONNECTED;
|
||||
|
||||
Accessible* hyperLink = hyperText->GetLinkAt(aLinkIndex);
|
||||
nsCOMPtr<nsIWinAccessNode> winAccessNode(do_QueryObject(hyperLink));
|
||||
if (!winAccessNode)
|
||||
if (!hyperText)
|
||||
return E_FAIL;
|
||||
|
||||
void *instancePtr = NULL;
|
||||
nsresult rv = winAccessNode->QueryNativeInterface(IID_IAccessibleHyperlink,
|
||||
&instancePtr);
|
||||
if (NS_FAILED(rv))
|
||||
return E_FAIL;
|
||||
|
||||
*aHyperlink = static_cast<IAccessibleHyperlink*>(instancePtr);
|
||||
*aHyperlink =
|
||||
static_cast<IAccessibleHyperlink*>(static_cast<AccessibleWrap*>(hyperLink));
|
||||
(*aHyperlink)->AddRef();
|
||||
return S_OK;
|
||||
|
||||
A11Y_TRYBLOCK_END
|
||||
|
@ -163,7 +163,11 @@ ia2AccessibleRelation::get_target(long aTargetIndex, IUnknown **aTarget)
|
||||
if (aTargetIndex < 0 || (uint32_t)aTargetIndex >= mTargets.Length() || !aTarget)
|
||||
return E_INVALIDARG;
|
||||
|
||||
mTargets[aTargetIndex]->QueryNativeInterface(IID_IUnknown, (void**) aTarget);
|
||||
AccessibleWrap* target =
|
||||
static_cast<AccessibleWrap*>(mTargets[aTargetIndex].get());
|
||||
*aTarget = static_cast<IAccessible*>(target);
|
||||
(*aTarget)->AddRef();
|
||||
|
||||
return S_OK;
|
||||
|
||||
A11Y_TRYBLOCK_END
|
||||
|
@ -129,7 +129,6 @@
|
||||
#ifdef ACCESSIBILITY
|
||||
#ifdef XP_WIN32
|
||||
@BINPATH@/AccessibleMarshal.dll
|
||||
@BINPATH@/components/accessibility-msaa.xpt
|
||||
#endif
|
||||
@BINPATH@/components/accessibility.xpt
|
||||
#endif
|
||||
|
@ -139,7 +139,6 @@
|
||||
#ifdef ACCESSIBILITY
|
||||
#ifdef XP_WIN32
|
||||
@BINPATH@/AccessibleMarshal.dll
|
||||
@BINPATH@/components/accessibility-msaa.xpt
|
||||
#endif
|
||||
@BINPATH@/components/accessibility.xpt
|
||||
#endif
|
||||
|
@ -128,7 +128,6 @@
|
||||
#ifdef ACCESSIBILITY
|
||||
#ifdef XP_WIN32
|
||||
@BINPATH@/AccessibleMarshal.dll
|
||||
@BINPATH@/components/accessibility-msaa.xpt
|
||||
#endif
|
||||
@BINPATH@/components/accessibility.xpt
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user