mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 18:50:08 +00:00
Bug 535687: Fix regression in forwarding NPN_InvalidateRect() for OOPP on linux. r=bent
This commit is contained in:
parent
6d6c54fb83
commit
ad47f303ae
@ -1056,8 +1056,8 @@ PluginInstanceChild::NPN_NewStream(NPMIMEType aMIMEType, const char* aWindow,
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
|
||||
bool
|
||||
PluginInstanceChild::InternalInvalidateRect(NPRect* aInvalidRect)
|
||||
void
|
||||
PluginInstanceChild::InvalidateRect(NPRect* aInvalidRect)
|
||||
{
|
||||
NS_ASSERTION(aInvalidRect, "Null pointer!");
|
||||
|
||||
@ -1068,13 +1068,9 @@ PluginInstanceChild::InternalInvalidateRect(NPRect* aInvalidRect)
|
||||
RECT rect = { aInvalidRect->left, aInvalidRect->top,
|
||||
aInvalidRect->right, aInvalidRect->bottom };
|
||||
InvalidateRect(mPluginWindowHWND, &rect, FALSE);
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
// Windowless need the invalidation to propegate to parent
|
||||
// triggering wm_paint handle event calls.
|
||||
return true;
|
||||
#endif
|
||||
|
||||
// Windowless plugins must return true!
|
||||
return false;
|
||||
SendNPN_InvalidateRect(*aInvalidRect);
|
||||
}
|
||||
|
@ -156,10 +156,7 @@ public:
|
||||
NPN_NewStream(NPMIMEType aMIMEType, const char* aWindow,
|
||||
NPStream** aStream);
|
||||
|
||||
// Return true if you want to send the notification to the parent process
|
||||
// also.
|
||||
bool
|
||||
InternalInvalidateRect(NPRect* aInvalidRect);
|
||||
void InvalidateRect(NPRect* aInvalidRect);
|
||||
|
||||
bool NotifyStream(StreamNotifyChild* notifyData, NPReason reason);
|
||||
|
||||
|
@ -799,13 +799,7 @@ _invalidaterect(NPP aNPP,
|
||||
{
|
||||
_MOZ_LOG(__FUNCTION__);
|
||||
AssertPluginThread();
|
||||
|
||||
PluginInstanceChild* actor = InstCast(aNPP);
|
||||
bool sendToParent = actor->InternalInvalidateRect(aInvalidRect);
|
||||
|
||||
if (sendToParent) {
|
||||
actor->SendNPN_InvalidateRect(*aInvalidRect);
|
||||
}
|
||||
InstCast(aNPP)->InvalidateRect(aInvalidRect);
|
||||
}
|
||||
|
||||
void NP_CALLBACK
|
||||
|
@ -88,16 +88,7 @@ function invalidate() {
|
||||
}
|
||||
|
||||
function done() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
|
||||
var prefs = Components.classes['@mozilla.org/preferences-service;1']
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
if (prefs.getBoolPref('dom.ipc.plugins.enabled') &&
|
||||
navigator.platform.indexOf("Linux") >= 0) {
|
||||
// bug 535687
|
||||
todo_is(clipped.getPaintCount(), 2, "painted after invalidate");
|
||||
} else {
|
||||
is(clipped.getPaintCount(), 2, "painted after invalidate");
|
||||
}
|
||||
is(clipped.getPaintCount(), 2, "painted after invalidate");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user