Bug 547276 - [OOPP] Windowed focus hang in CallHasProperty. r=bent.

This commit is contained in:
Jim Mathies 2010-02-22 17:09:27 -08:00
Родитель caafc5d065
Коммит b95fd6ca3d
3 изменённых файлов: 18 добавлений и 12 удалений

Просмотреть файл

@ -903,11 +903,8 @@ PluginInstanceParent::PluginWindowHookProc(HWND hWnd,
switch (message) {
case WM_SETFOCUS:
// Widget may be calling us back from AnswerPluginGotFocus(), make
// sure we don't end up sending this back over. If we're not in
// SendMessage, this is coming from the dom / focus manager.
if ((::InSendMessageEx(NULL) & (ISMEX_SEND|ISMEX_REPLIED)) != ISMEX_SEND)
self->CallSetPluginFocus();
// Let the child plugin window know it should take focus.
self->CallSetPluginFocus();
break;
case WM_CLOSE:

Просмотреть файл

@ -3655,12 +3655,20 @@ nsWindow::IsAsyncResponseEvent(UINT aMsg, LRESULT& aResult)
return false;
}
// static
void
nsWindow::IPCWindowProcHandler(HWND& hWnd, UINT& msg, WPARAM& wParam, LPARAM& lParam)
nsWindow::IPCWindowProcHandler(UINT& msg, WPARAM& wParam, LPARAM& lParam)
{
NS_ASSERTION(!mozilla::ipc::SyncChannel::IsPumpingMessages(),
"Failed to prevent a nonqueued message from running!");
// Windowed plugins receiving focus triggering WM_ACTIVATE app messages.
if (mWindowType == eWindowType_plugin && msg == WM_SETFOCUS &&
::GetPropW(mWnd, L"PluginInstanceParentProperty")) {
::ReplyMessage(0);
return;
}
// Modal UI being displayed in windowless plugins.
if (mozilla::ipc::RPCChannel::IsSpinLoopActive() &&
(::InSendMessageEx(NULL)&(ISMEX_REPLIED|ISMEX_SEND)) == ISMEX_SEND) {
LRESULT res;
@ -3695,8 +3703,12 @@ nsWindow::IPCWindowProcHandler(HWND& hWnd, UINT& msg, WPARAM& wParam, LPARAM& lP
// The WndProc procedure for all nsWindows in this toolkit
LRESULT CALLBACK nsWindow::WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
// Get the window which caused the event and ask it to process the message
nsWindow *someWindow = GetNSWindowPtr(hWnd);
#ifdef MOZ_IPC
IPCWindowProcHandler(hWnd, msg, wParam, lParam);
if (someWindow)
someWindow->IPCWindowProcHandler(msg, wParam, lParam);
#endif
// create this here so that we store the last rolled up popup until after
@ -3707,9 +3719,6 @@ LRESULT CALLBACK nsWindow::WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM
if ( DealWithPopups(hWnd, msg, wParam, lParam, &popupHandlingResult) )
return popupHandlingResult;
// Get the window which caused the event and ask it to process the message
nsWindow *someWindow = GetNSWindowPtr(hWnd);
// XXX This fixes 50208 and we are leaving 51174 open to further investigate
// why we are hitting this assert
if (nsnull == someWindow) {

Просмотреть файл

@ -387,7 +387,7 @@ protected:
#ifdef MOZ_IPC
static bool IsAsyncResponseEvent(UINT aMsg, LRESULT& aResult);
static void IPCWindowProcHandler(HWND& hWnd, UINT& msg, WPARAM& wParam, LPARAM& lParam);
void IPCWindowProcHandler(UINT& msg, WPARAM& wParam, LPARAM& lParam);
#endif // MOZ_IPC
/**