webengine/osswebengine/WebKit/s60/plugins/NpnImplementation.cpp
changeset 5 10e98eab6f85
parent 1 7c90e6132015
child 10 a359256acfc6
--- a/webengine/osswebengine/WebKit/s60/plugins/NpnImplementation.cpp	Fri May 08 08:25:06 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/plugins/NpnImplementation.cpp	Fri Jul 03 15:54:40 2009 +0100
@@ -301,6 +301,7 @@
 //
 NPError NpnGetValue(NPP aInstance, NPNVariable aVariable, void *aRetValue)
 {
+    TInt err = NPERR_NO_ERROR;
     
     switch (aVariable) {
         
@@ -354,9 +355,11 @@
             if (windowObject) {
                 void **v = (void **)aRetValue;
                 *v = windowObject;
-                return NPERR_NO_ERROR;
             }
-            return NPERR_GENERIC_ERROR;
+            else {
+                err = NPERR_GENERIC_ERROR;
+            }
+            break;
         }
         case NPNVDOMWindow:
         case NPNVxDisplay:          // Unix only: Returns the current Display
@@ -377,11 +380,14 @@
             
             
         default:
+            {
             *((TBool*) aRetValue) = EFalse;
+            err = NPERR_INVALID_PARAM;
+            }
             break;
     }   // end of switch
     
-    return NPERR_NO_ERROR;
+    return err;
 
 }
 
@@ -462,7 +468,7 @@
             {
             NPBool* isFullScreen = (NPBool*)aSetValue;
             PluginWin* pluginWin = (PluginWin*)aInstance->ndata;
-            pluginWin->TogleScreenMode(*isFullScreen);
+            pluginWin->ToggleScreenMode(*isFullScreen);
             break;
             }
         case NPPVPluginZoom: