mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 570267 - [OOPP] Firefox 3.6.4 bug: When a flash file has a focus, window.onblur event does not happen as expected.
r=jimm
This commit is contained in:
parent
da406e2cb1
commit
ccf46b30df
@ -176,7 +176,7 @@ parent:
|
||||
returns (NPError result);
|
||||
|
||||
parent:
|
||||
rpc PluginGotFocus();
|
||||
rpc PluginFocusChange(bool gotFocus);
|
||||
|
||||
child:
|
||||
rpc SetPluginFocus();
|
||||
|
@ -1070,7 +1070,7 @@ PluginInstanceChild::PluginWindowProc(HWND hWnd,
|
||||
|
||||
// The plugin received keyboard focus, let the parent know so the dom is up to date.
|
||||
if (message == WM_MOUSEACTIVATE)
|
||||
self->CallPluginGotFocus();
|
||||
self->CallPluginFocusChange(PR_TRUE);
|
||||
|
||||
// Prevent lockups due to plugins making rpc calls when the parent
|
||||
// is making a synchronous SendMessage call to the child window. Add
|
||||
@ -1087,6 +1087,9 @@ PluginInstanceChild::PluginWindowProc(HWND hWnd,
|
||||
}
|
||||
}
|
||||
|
||||
if (message == WM_KILLFOCUS)
|
||||
self->CallPluginFocusChange(PR_FALSE);
|
||||
|
||||
if (message == WM_USER+1 &&
|
||||
(self->mQuirks & PluginInstanceChild::QUIRK_FLASH_THROTTLE_WMUSER_EVENTS)) {
|
||||
self->FlashThrottleMessage(hWnd, message, wParam, lParam, true);
|
||||
|
@ -1296,7 +1296,7 @@ PluginInstanceParent::SharedSurfaceAfterPaint(NPEvent* npevent)
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
bool
|
||||
PluginInstanceParent::AnswerPluginGotFocus()
|
||||
PluginInstanceParent::AnswerPluginFocusChange(const bool& gotFocus)
|
||||
{
|
||||
PLUGIN_LOG_DEBUG(("%s", FULLFUNCTION));
|
||||
|
||||
@ -1305,10 +1305,10 @@ PluginInstanceParent::AnswerPluginGotFocus()
|
||||
// focus. We forward the event down to widget so the dom/focus manager can
|
||||
// be updated.
|
||||
#if defined(OS_WIN)
|
||||
::SendMessage(mPluginHWND, gOOPPPluginFocusEvent, 0, 0);
|
||||
::SendMessage(mPluginHWND, gOOPPPluginFocusEvent, gotFocus ? 1 : 0, 0);
|
||||
return true;
|
||||
#else
|
||||
NS_NOTREACHED("PluginInstanceParent::AnswerPluginGotFocus not implemented!");
|
||||
NS_NOTREACHED("PluginInstanceParent::AnswerPluginFocusChange not implemented!");
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ public:
|
||||
}
|
||||
|
||||
virtual bool
|
||||
AnswerPluginGotFocus();
|
||||
AnswerPluginFocusChange(const bool& gotFocus);
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
void Invalidate();
|
||||
|
@ -4906,11 +4906,18 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
|
||||
#endif
|
||||
#ifdef MOZ_IPC
|
||||
if (msg == sOOPPPluginFocusEvent) {
|
||||
// With OOPP, the plugin window exists in another process and is a child of
|
||||
// this window. This window is a placeholder plugin window for the dom. We
|
||||
// receive this event when the child window receives focus. (sent from
|
||||
// PluginInstanceParent.cpp)
|
||||
::SendMessage(mWnd, WM_MOUSEACTIVATE, 0, 0); // See nsPluginNativeWindowWin.cpp
|
||||
if (wParam == 1) {
|
||||
// With OOPP, the plugin window exists in another process and is a child of
|
||||
// this window. This window is a placeholder plugin window for the dom. We
|
||||
// receive this event when the child window receives focus. (sent from
|
||||
// PluginInstanceParent.cpp)
|
||||
::SendMessage(mWnd, WM_MOUSEACTIVATE, 0, 0); // See nsPluginNativeWindowWin.cpp
|
||||
} else {
|
||||
// WM_KILLFOCUS was received by the child process.
|
||||
if (sJustGotDeactivate) {
|
||||
DispatchFocusToTopLevelWindow(NS_DEACTIVATE);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user