зеркало из https://github.com/mozilla/pjs.git
Bug 106435 -- handling booleans passed in NPN_SetVariable in backward compatible way, r=peterl, sr=waterson
This commit is contained in:
Родитель
d0f8c99f93
Коммит
4c8964fbda
|
@ -1281,13 +1281,19 @@ _setvalue(NPP npp, NPPVariable variable, void *result)
|
|||
return NPERR_INVALID_INSTANCE_ERROR;
|
||||
|
||||
switch (variable) {
|
||||
|
||||
// we should keep backward compatibility with 4x where the
|
||||
// actual pointer value is checked rather than its content
|
||||
// wnen passing booleans
|
||||
case NPPVpluginWindowBool: {
|
||||
NPBool bWindowless = !(*((NPBool *)result));
|
||||
NPBool bWindowless = (result == nsnull);
|
||||
return inst->SetWindowless(bWindowless);
|
||||
}
|
||||
|
||||
case NPPVpluginTransparentBool:
|
||||
return inst->SetTransparent(*((NPBool *)result));
|
||||
case NPPVpluginTransparentBool: {
|
||||
NPBool bTransparent = (result != nsnull);
|
||||
return inst->SetTransparent(bTransparent);
|
||||
}
|
||||
|
||||
default:
|
||||
return NPERR_NO_ERROR;
|
||||
|
|
Загрузка…
Ссылка в новой задаче