Bug 543788 - Infinite loop in CallUpdateWindow/WM_PAINT messages when switching tabs with a windowed plugin (Acrobat and sometimes Flash), r=jimm

This commit is contained in:
Benjamin Smedberg 2010-02-09 11:57:03 -05:00
Родитель a3abf70391
Коммит 845a8ba08b
2 изменённых файлов: 4 добавлений и 10 удалений

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

@ -257,6 +257,8 @@ ProcessOrDeferMessage(HWND hwnd,
case WM_GETTEXT:
case WM_NCHITTEST:
case WM_SETICON:
case WM_STYLECHANGING:
case WM_STYLECHANGED:
case WM_SYNCPAINT: // Intentional fall-through.
case WM_WINDOWPOSCHANGING: {
return DefWindowProc(hwnd, uMsg, wParam, lParam);

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

@ -330,18 +330,10 @@ EnsureSharedSurfaceSize(gfxIntSize size)
PRBool nsWindow::OnPaint(HDC aDC)
{
#ifdef MOZ_IPC
if (mWindowType == eWindowType_plugin) {
PluginInstanceParent* instance = reinterpret_cast<PluginInstanceParent*>(
::GetPropW(mWnd, L"PluginInstanceParentProperty"));
if (instance) {
if (!instance->CallUpdateWindow())
NS_ERROR("Failed to send message!");
ValidateRect(mWnd, NULL);
return PR_TRUE;
}
ValidateRect(mWnd, NULL);
return PR_TRUE;
}
#endif
nsPaintEvent willPaintEvent(PR_TRUE, NS_WILL_PAINT, this);
DispatchWindowEvent(&willPaintEvent);