зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1543298 part 1: Add a stub AccessibleWrap used in a Windows content process for an embedded document residing in another content process. r=eeejay
For an out-of-process iframe, we need to be able to return a remote embedder accessible as a child of an OuterDocAccessible. For parent process OuterDocAccessibles, we use the ProxyAccessible for the embedded document. In the case of out-of-process iframes, there is no ProxyAccessible for the embedded document, since the iframe is in a content process and ProxyAccessibles only exist in the parent process. Like ProxyAccessibleWrap, the only real method that gets called is GetNativeInterface, which returns a COM proxy for the document. Differential Revision: https://phabricator.services.mozilla.com/D32278 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ea6f3617dc
Коммит
ca09924827
|
@ -8,7 +8,7 @@
|
|||
#ifndef MOZILLA_A11Y_ProxyWrappers_h
|
||||
#define MOZILLA_A11Y_ProxyWrappers_h
|
||||
|
||||
#include "HyperTextAccessible.h"
|
||||
#include "HyperTextAccessibleWrap.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
@ -79,6 +79,36 @@ inline ProxyAccessible* HyperTextProxyFor(T* aWrapper) {
|
|||
return wrapper->IsProxy() ? wrapper->Proxy() : nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stub AccessibleWrap used in a content process for an embedded document
|
||||
* residing in another content process.
|
||||
* There is no ProxyAccessible here, since those only exist in the parent
|
||||
* process. However, like ProxyAccessibleWrap, the only real method that
|
||||
* gets called is GetNativeInterface, which returns a COM proxy for the
|
||||
* document.
|
||||
*/
|
||||
class RemoteIframeDocProxyAccessibleWrap : public HyperTextAccessibleWrap {
|
||||
public:
|
||||
explicit RemoteIframeDocProxyAccessibleWrap(IDispatch* aCOMProxy)
|
||||
: HyperTextAccessibleWrap(nullptr, nullptr), mCOMProxy(aCOMProxy) {
|
||||
mType = eProxyType;
|
||||
mBits.proxy = nullptr;
|
||||
}
|
||||
|
||||
virtual void Shutdown() override {
|
||||
mStateFlags |= eIsDefunct;
|
||||
mCOMProxy = nullptr;
|
||||
}
|
||||
|
||||
virtual void GetNativeInterface(void** aOutAccessible) override {
|
||||
RefPtr<IDispatch> addRefed = mCOMProxy;
|
||||
addRefed.forget(aOutAccessible);
|
||||
}
|
||||
|
||||
private:
|
||||
RefPtr<IDispatch> mCOMProxy;
|
||||
};
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
|
|
|
@ -6,3 +6,6 @@
|
|||
|
||||
DIRS += ['msaa', 'ia2', 'sdn', 'uia']
|
||||
|
||||
EXPORTS.mozilla.a11y += [
|
||||
'ProxyWrappers.h',
|
||||
]
|
||||
|
|
Загрузка…
Ссылка в новой задаче