Bug 37278 - No way for plugin to not handle NP_FULL when it handles the mime-type
Summary: No way for plugin to not handle NP_FULL when it handles the mime-type
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-08 09:16 PDT by Bastien Nocera
Modified: 2018-03-30 06:43 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bastien Nocera 2010-04-08 09:16:30 PDT
Similarly to the Mozilla/Firefox bug opened a number of years ago at:
https://bugzilla.mozilla.org/show_bug.cgi?id=306867

A plugin has no way to not handle a particular plugin mode (from ->newp).

In the new instance function, it should be possible to return a
NPERR_MODE_UNSUPPORTED if the mode doesn't match a supported one (for example,
a video plugin that doesn't want to handle NP_FULL).

1. Make sure your plugin can handle a particular mime-type
2. Host a file of that mime-type on a web server
3. Load the hosted file in a WebKit browser (Safari, Chromium, etc.)
4. The plugin should be instantiated using NP_FULL

5. Now make your plugin return an error when NP_FULL is passed as the mode.

6. Load the URL from 3. again

Expected result:
- Browser offers to download the file, or open it using one of the applications on the system that can handle that mimetype

Actual result:
- Broken plugin logo in the middle of the browser
Comment 1 Bastien Nocera 2018-03-30 06:43:51 PDT
Totem's web browser plugin doesn't exist any more.