Bug 1342141 part A - The test plugin will use name="plugin" as an indicator of fullpage, rather than NP_FULL, to make test_fullpage.html green, r=jimm
authorBenjamin Smedberg <benjamin@smedbergs.us>
Thu, 23 Feb 2017 13:07:34 -0500
changeset 344785 e5de5b9543175ae47b263f3a710b11385cd9f1be
parent 344784 973ab774ff18859d5a451a7fe3dc09debed49605
child 344786 f065c4ec4ac679d4c80c891592bcbaafa576e6af
push id31417
push userkwierso@gmail.com
push dateSat, 25 Feb 2017 00:46:36 +0000
treeherdermozilla-central@f36062d04d16 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1342141
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1342141 part A - 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
dom/plugins/test/testplugin/nptest.cpp
--- 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;