зеркало из https://github.com/mozilla/gecko-dev.git
Bug 648935 - When paint events are deferred in WindowsMessageLoop, temporarily validate the plugin until painting can occur. r=bent.
This commit is contained in:
Родитель
7d59d4601d
Коммит
f81f1189fb
|
@ -996,19 +996,30 @@ DeferredRedrawMessage::Run()
|
|||
NS_ASSERTION(ret, "RedrawWindow failed!");
|
||||
}
|
||||
|
||||
DeferredUpdateMessage::DeferredUpdateMessage(HWND aHWnd)
|
||||
{
|
||||
mWnd = aHWnd;
|
||||
if (!GetUpdateRect(mWnd, &mUpdateRect, FALSE)) {
|
||||
memset(&mUpdateRect, 0, sizeof(RECT));
|
||||
return;
|
||||
}
|
||||
ValidateRect(mWnd, &mUpdateRect);
|
||||
}
|
||||
|
||||
void
|
||||
DeferredUpdateMessage::Run()
|
||||
{
|
||||
AssertWindowIsNotNeutered(hWnd);
|
||||
if (!IsWindow(hWnd)) {
|
||||
AssertWindowIsNotNeutered(mWnd);
|
||||
if (!IsWindow(mWnd)) {
|
||||
NS_ERROR("Invalid window!");
|
||||
return;
|
||||
}
|
||||
|
||||
InvalidateRect(mWnd, &mUpdateRect, FALSE);
|
||||
#ifdef DEBUG
|
||||
BOOL ret =
|
||||
#endif
|
||||
UpdateWindow(hWnd);
|
||||
UpdateWindow(mWnd);
|
||||
NS_ASSERTION(ret, "UpdateWindow failed!");
|
||||
}
|
||||
|
||||
|
|
|
@ -113,14 +113,13 @@ private:
|
|||
class DeferredUpdateMessage : public DeferredMessage
|
||||
{
|
||||
public:
|
||||
DeferredUpdateMessage(HWND aHWnd)
|
||||
: hWnd(aHWnd)
|
||||
{ }
|
||||
DeferredUpdateMessage(HWND aHWnd);
|
||||
|
||||
virtual void Run();
|
||||
|
||||
private:
|
||||
HWND hWnd;
|
||||
HWND mWnd;
|
||||
RECT mUpdateRect;
|
||||
};
|
||||
|
||||
// This class duplicates a string that may exist in the lParam member of the
|
||||
|
|
Загрузка…
Ссылка в новой задаче