зеркало из https://github.com/mozilla/gecko-dev.git
Bug 287979. Infinite loop when exposing plugins. r=timeless, sr=jst
This commit is contained in:
Родитель
4b1913ff77
Коммит
21b5bec8ea
|
@ -914,7 +914,7 @@ IDispatch *nsAccessibleWrap::NativeAccessible(nsIAccessible *aXPAccessible)
|
||||||
if (hwnd) {
|
if (hwnd) {
|
||||||
IDispatch *retval = nsnull;
|
IDispatch *retval = nsnull;
|
||||||
AccessibleObjectFromWindow(NS_REINTERPRET_CAST(HWND, hwnd),
|
AccessibleObjectFromWindow(NS_REINTERPRET_CAST(HWND, hwnd),
|
||||||
OBJID_CLIENT, IID_IAccessible, (void **) &retval);
|
OBJID_WINDOW, IID_IAccessible, (void **) &retval);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,33 +42,14 @@
|
||||||
nsHTMLWin32ObjectAccessible::nsHTMLWin32ObjectAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell, void* aHwnd):
|
nsHTMLWin32ObjectAccessible::nsHTMLWin32ObjectAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell, void* aHwnd):
|
||||||
nsAccessibleWrap(aNode, aShell)
|
nsAccessibleWrap(aNode, aShell)
|
||||||
{
|
{
|
||||||
if (aHwnd) {
|
mHwnd = aHwnd ? ::GetWindow((HWND)aHwnd, GW_CHILD) : 0;
|
||||||
// XXX - when we get accessible plugins we may have to check here
|
|
||||||
// for the proper window handle using Win32 APIs so we check
|
|
||||||
// the proper IAccessible for the information we need.
|
|
||||||
mHwnd = aHwnd;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLWin32ObjectAccessible, nsAccessible, nsIAccessibleWin32Object)
|
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLWin32ObjectAccessible, nsAccessible, nsIAccessibleWin32Object)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP nsHTMLWin32ObjectAccessible::GetHwnd(void **aHwnd)
|
||||||
nsHTMLWin32ObjectAccessible::GetHwnd(void **aHwnd)
|
|
||||||
{
|
{
|
||||||
*aHwnd = mHwnd;
|
*aHwnd = mHwnd;
|
||||||
if (mHwnd) {
|
|
||||||
// Check for NullPluginClass to avoid infinite loop bug 245878
|
|
||||||
// XXX We're going to be doing more work with NullPluginClass at some point to make it
|
|
||||||
// keyboard accessible (bug 245349, bug 83754 as well as other work going on in
|
|
||||||
// plugins to make them accessible like bug 93149).
|
|
||||||
// The eventual goal will be to get rid of this check here so we
|
|
||||||
// can walk into the null plugin.
|
|
||||||
const LPCSTR kClassNameNullPlugin = "NullPluginClass";
|
|
||||||
HWND nullPluginChild = ::FindWindowEx((HWND)mHwnd, NULL, kClassNameNullPlugin, NULL);
|
|
||||||
if (nullPluginChild) {
|
|
||||||
*aHwnd = 0; // Avoid infinite loop by not walking into null plugin
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче