mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1196460 - create different proxy wrappers depending on the type of the proxy r=surkov
This commit is contained in:
parent
83ddc41d31
commit
d4f0cffc3f
@ -35,9 +35,17 @@ a11y::PlatformShutdown()
|
||||
}
|
||||
|
||||
void
|
||||
a11y::ProxyCreated(ProxyAccessible* aProxy, uint32_t)
|
||||
a11y::ProxyCreated(ProxyAccessible* aProxy, uint32_t aInterfaces)
|
||||
{
|
||||
ProxyAccessibleWrap* wrapper = new ProxyAccessibleWrap(aProxy);
|
||||
AccessibleWrap* wrapper = nullptr;
|
||||
if (aInterfaces & Interfaces::DOCUMENT) {
|
||||
wrapper = new DocProxyAccessibleWrap(aProxy);
|
||||
} else if (aInterfaces & Interfaces::HYPERTEXT) {
|
||||
wrapper = new HyperTextProxyAccessibleWrap(aProxy);
|
||||
} else {
|
||||
wrapper = new ProxyAccessibleWrap(aProxy);
|
||||
}
|
||||
|
||||
wrapper->AddRef();
|
||||
aProxy->SetWrapper(reinterpret_cast<uintptr_t>(wrapper));
|
||||
}
|
||||
@ -45,8 +53,8 @@ a11y::ProxyCreated(ProxyAccessible* aProxy, uint32_t)
|
||||
void
|
||||
a11y::ProxyDestroyed(ProxyAccessible* aProxy)
|
||||
{
|
||||
ProxyAccessibleWrap* wrapper =
|
||||
reinterpret_cast<ProxyAccessibleWrap*>(aProxy->GetWrapper());
|
||||
AccessibleWrap* wrapper =
|
||||
reinterpret_cast<AccessibleWrap*>(aProxy->GetWrapper());
|
||||
MOZ_ASSERT(wrapper);
|
||||
if (!wrapper)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user