Bug 1342141 part B - The test plugin will use name="plugin" as an indicator of fullpage, rather than NP_FULL, to make test_fullpage.html green, r?jimm
draft
Bug 1342141 part B - The test plugin will use name="plugin" as an indicator of fullpage, rather than NP_FULL, to make test_fullpage.html green, r?jimm
MozReview-Commit-ID: D7HVr9f37se
--- a/dom/plugins/test/testplugin/nptest.cpp
+++ b/dom/plugins/test/testplugin/nptest.cpp
@@ -871,22 +871,16 @@ NPP_New(NPMIMEType pluginType, NPP insta
}
scriptableObject->npp = instance;
scriptableObject->drawMode = DM_DEFAULT;
scriptableObject->drawColor = 0;
instanceData->scriptableObject = scriptableObject;
instanceData->instanceCountWatchGeneration = sCurrentInstanceCountWatchGeneration;
- if (NP_FULL == mode) {
- instanceData->streamMode = NP_SEEK;
- instanceData->frame = "testframe";
- addRange(instanceData, "100,100");
- }
-
AsyncDrawing requestAsyncDrawing = AD_NONE;
bool requestWindow = false;
bool alreadyHasSalign = false;
// handle extra params
for (int i = 0; i < argc; i++) {
if (strcmp(argn[i], "drawmode") == 0) {
if (strcmp(argv[i], "solid") == 0)
@@ -1010,17 +1004,26 @@ NPP_New(NPMIMEType pluginType, NPP insta
if (alreadyHasSalign) {
// If salign came before this parameter, error out now.
return NPERR_GENERIC_ERROR;
}
}
if (strcmp(argn[i], "salign") == 0) {
alreadyHasSalign = true;
}
-}
+
+ // We don't support NP_FULL any more, but name="plugin" is an indication
+ // that we're a full-page plugin. We use default seek parameters for
+ // test_fullpage.html
+ if (strcmp(argn[i], "name") == 0 && strcmp(argv[i], "plugin") == 0) {
+ instanceData->streamMode = NP_SEEK;
+ instanceData->frame = "testframe";
+ addRange(instanceData, "100,100");
+ }
+ }
if (!browserSupportsWindowless || !pluginSupportsWindowlessMode()) {
requestWindow = true;
} else if (!pluginSupportsWindowMode()) {
requestWindow = false;
}
if (requestWindow) {
instanceData->hasWidget = true;