[Webkit-unassigned] [Bug 21572] New: NPAPI implementation bugs in WebKit top-of-tree

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 13 11:18:54 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=21572

           Summary: NPAPI implementation bugs in WebKit top-of-tree
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Major
          Priority: P2
         Component: Plug-ins
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: kenneth.russell at sun.com


There are a couple of bugs in the NPAPI implementation on the WebKit top of
tree preventing plug-ins from working as expected:

1. The "size" field of the NPPluginFuncs is not initialized before being passed
to NP_GetEntryPoints. Patch ((tested, verified):

Index: WebNetscapePluginPackage.m
===================================================================
--- WebNetscapePluginPackage.m    (revision 37534)
+++ WebNetscapePluginPackage.m    (working copy)
@@ -569,6 +569,7 @@
 #endif
         LOG(Plugins, "%f NP_Initialize took %f seconds", currentTime,
duration);

+        pluginFuncs.size = sizeof(NPPluginFuncs);
         npErr = NP_GetEntryPoints(&pluginFuncs);
         if (npErr != NPERR_NO_ERROR)
             goto abort; 

2. NPN_SetValue(npp, NPPVpluginDrawingModel,
(void*)NPDrawingModelCoreGraphics); fails. Patch (tested, verified):

Index: WebBaseNetscapePluginView.mm
===================================================================
--- WebBaseNetscapePluginView.mm    (revision 37534)
+++ WebBaseNetscapePluginView.mm    (working copy)
@@ -2561,9 +2561,13 @@
             NPDrawingModel newDrawingModel = (NPDrawingModel)(uintptr_t)value;
             switch (newDrawingModel) {
                 // Supported drawing models:
+                case NPDrawingModelCoreGraphics:
 #ifndef NP_NO_QUICKDRAW
                 case NPDrawingModelQuickDraw:
 #endif
+                    drawingModel = newDrawingModel;
+                    return NPERR_NO_ERROR;
+
                 // Unsupported (or unknown) drawing models:
                 default:
                     LOG(Plugins, "Plugin %@ uses unsupported drawing model:
%d", pluginPackage, drawingModel);


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list