зеркало из https://github.com/mozilla/gecko-dev.git
Bug 677883 - Bypass deferred message processing for accessible tab windows. Fixes occasional wm_getobject query failures, which must be responded to. r=davidb
This commit is contained in:
Родитель
df6776cf76
Коммит
5a9bfe4768
|
@ -743,6 +743,10 @@ nsRefPtrHashtable<nsVoidPtrHashKey, nsDocAccessible> nsAccessNodeWrap::sHWNDCach
|
|||
LRESULT CALLBACK
|
||||
nsAccessNodeWrap::WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
// Note, this window's message handling should not invoke any call that
|
||||
// may result in a cross-process ipc call. Doing so may violate RPC
|
||||
// message semantics.
|
||||
|
||||
switch (msg) {
|
||||
case WM_GETOBJECT:
|
||||
{
|
||||
|
|
|
@ -46,6 +46,10 @@
|
|||
#include "nsArrayUtils.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
|
||||
// Window property used by ipc related code in identifying accessible
|
||||
// tab windows.
|
||||
const PRUnichar* kPropNameTabContent = L"AccessibleTabWindow";
|
||||
|
||||
HRESULT
|
||||
nsWinUtils::ConvertToIA2Array(nsIArray *aGeckoArray, IUnknown ***aIA2Array,
|
||||
long *aIA2ArrayLen)
|
||||
|
@ -149,14 +153,19 @@ nsWinUtils::CreateNativeWindow(LPCWSTR aWindowClass, HWND aParentWnd,
|
|||
int aX, int aY, int aWidth, int aHeight,
|
||||
bool aIsActive)
|
||||
{
|
||||
return ::CreateWindowExW(WS_EX_TRANSPARENT, aWindowClass,
|
||||
L"NetscapeDispatchWnd",
|
||||
WS_CHILD | (aIsActive ? WS_VISIBLE : 0),
|
||||
aX, aY, aWidth, aHeight,
|
||||
aParentWnd,
|
||||
NULL,
|
||||
GetModuleHandle(NULL),
|
||||
NULL);
|
||||
HWND hwnd = ::CreateWindowExW(WS_EX_TRANSPARENT, aWindowClass,
|
||||
L"NetscapeDispatchWnd",
|
||||
WS_CHILD | (aIsActive ? WS_VISIBLE : 0),
|
||||
aX, aY, aWidth, aHeight,
|
||||
aParentWnd,
|
||||
NULL,
|
||||
GetModuleHandle(NULL),
|
||||
NULL);
|
||||
if (hwnd) {
|
||||
// Mark this window so that ipc related code can identify it.
|
||||
::SetPropW(hwnd, kPropNameTabContent, (HANDLE)1);
|
||||
}
|
||||
return hwnd;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -101,6 +101,8 @@ using namespace mozilla::ipc::windows;
|
|||
|
||||
// pulled from widget's nsAppShell
|
||||
extern const PRUnichar* kAppShellEventId;
|
||||
// pulled from accessibility's win utils
|
||||
extern const PRUnichar* kPropNameTabContent;
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -379,6 +381,12 @@ WindowIsDeferredWindow(HWND hWnd)
|
|||
return false;
|
||||
}
|
||||
|
||||
// Tab content creates a window that responds to accessible WM_GETOBJECT
|
||||
// calls. This window can safely be ignored.
|
||||
if (::GetPropW(hWnd, kPropNameTabContent)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Common mozilla windows we must defer messages to.
|
||||
nsDependentString className(buffer, length);
|
||||
if (StringBeginsWith(className, NS_LITERAL_STRING("Mozilla")) ||
|
||||
|
|
Загрузка…
Ссылка в новой задаче