Bug 543788 - Infinite loop in CallUpdateWindow/WM_PAINT messages when switching tabs with a windowed plugin (Acrobat and sometimes Flash), r=jimm
--- a/ipc/glue/WindowsMessageLoop.cpp
+++ b/ipc/glue/WindowsMessageLoop.cpp
@@ -252,16 +252,18 @@ ProcessOrDeferMessage(HWND hwnd,
}
// Messages that are safe to pass to DefWindowProc go here.
case WM_GETICON:
case WM_GETMINMAXINFO:
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);
}
// Unknown messages only.
default: {
#ifdef DEBUG
--- a/widget/src/windows/nsWindowGfx.cpp
+++ b/widget/src/windows/nsWindowGfx.cpp
@@ -325,28 +325,20 @@ EnsureSharedSurfaceSize(gfxIntSize size)
sSharedSurfaceData = (PRUint8 *)malloc(WORDSSIZE(sSharedSurfaceSize) * 4);
}
return (sSharedSurfaceData != nsnull);
}
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);
#ifdef CAIRO_HAS_DDRAW_SURFACE
if (IsRenderMode(gfxWindowsPlatform::RENDER_IMAGE_DDRAW16)) {
return OnPaintImageDDraw16();
}