This commit is contained in:
Ben Turner 2009-11-13 13:19:33 -08:00
Родитель 8e9c6fea1d
Коммит 5d92ec3ff2
3 изменённых файлов: 11 добавлений и 6 удалений

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

@ -839,10 +839,9 @@ PluginInstanceChild::NPN_NewStream(NPMIMEType aMIMEType, const char* aWindow,
return NPERR_NO_ERROR;
}
void
bool
PluginInstanceChild::InternalInvalidateRect(NPRect* aInvalidRect)
{
// Should only be called on windowed plugins!
NS_ASSERTION(aInvalidRect, "Null pointer!");
#ifdef OS_WIN
@ -851,4 +850,7 @@ PluginInstanceChild::InternalInvalidateRect(NPRect* aInvalidRect)
aInvalidRect->right, aInvalidRect->bottom };
InvalidateRect(mPluginWindowHWND, &rect, FALSE);
#endif
// Windowless plugins must return true!
return false;
}

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

@ -165,7 +165,9 @@ public:
NPN_NewStream(NPMIMEType aMIMEType, const char* aWindow,
NPStream** aStream);
void
// Return true if you want to send the notification to the parent process
// also.
bool
InternalInvalidateRect(NPRect* aInvalidRect);
private:

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

@ -736,10 +736,11 @@ _invalidaterect(NPP aNPP,
AssertPluginThread();
PluginInstanceChild* actor = InstCast(aNPP);
actor->SendNPN_InvalidateRect(*aInvalidRect);
bool sendToParent = actor->InternalInvalidateRect(aInvalidRect);
// Some platforms need additional help to redraw in this process.
actor->InternalInvalidateRect(aInvalidRect);
if (sendToParent) {
actor->SendNPN_InvalidateRect(*aInvalidRect);
}
}
void NP_CALLBACK