Closed
Bug 386537
Opened 17 years ago
Closed 17 years ago
Plugins are incorrectly told that windowless support is available when it is not on X11
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: karlt, Assigned: karlt)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
jst
:
review+
jst
:
superreview+
sicking
:
approval1.9+
|
Details | Diff | Splinter Review |
The documented method for finding out whether windowless support is available
is to use NPN_Version and NPVERS_HAS_WINDOWLESS:
http://developer.mozilla.org/en/docs/Gecko_Plugin_API_Reference:Version%2C_UI%2C_and_Status_Information#Finding_Out_if_a_Feature_Exists
However, since 1998-03-27, NPVERS_HAS_WINDOWLESS and NP_VERSION_MINOR have
indicated that the browser has windowless support for all platforms.
Furthermore, when the plugin sets NPPVpluginWindowBool to FALSE, NPN_SetValue
returns NPERR_NO_ERROR. The plugin has no chance to know that anything is
wrong until is receives a NPP_Destroy call without having received any
NPP_SetWindow.
Assignee | ||
Comment 1•17 years ago
|
||
This is ugly but it would work.
NP_VERSION_MINOR became 18 in March:
http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/modules/plugin/base/public/npapi.h&rev=3.44
Alpha releases since 1.9a4 will still report incorrectly but this would be
resolved in beta1 by addition of windowless support.
I would be concerned about changing an API that has been defined for almost a
decade and is used by other browsers but I doubt any other browsers offer
windowless support on X11.
If we don't do this, then plugins will probably end up checking
NP_VERSION_MINOR against 18 anyway unless they feel like parsing the
Gecko version from NPN_UserAgent.
Johnny, what do you think?
Attachment #270531 -
Flags: superreview?(jst)
Attachment #270531 -
Flags: review?(jst)
Assignee | ||
Updated•17 years ago
|
Comment 2•17 years ago
|
||
(In reply to comment #1)
> Created an attachment (id=270531) [details]
> Set NPVERS_HAS_WINDOWLESS appropriately according to platform
>
> This is ugly but it would work.
I do not think this is the right fix. The macro should be defined to tell if window-less mode is supported in that version of the API, not if it is properly implemented in that version of the browser.
Assignee | ||
Updated•17 years ago
|
Attachment #270531 -
Attachment is obsolete: true
Attachment #270531 -
Flags: superreview?(jst)
Attachment #270531 -
Flags: review?(jst)
Assignee | ||
Comment 3•17 years ago
|
||
(In reply to comment #2)
> The macro should be defined to tell if window-less mode is supported
> in that version of the API, not if it is properly
> implemented in that version of the browser.
You are right.
And another browser may wish to implement windowless support before
XPCONNECT_SCRIPTING, for example.
The bug is in the browser not the API, and it is pretty hard to fix bugs in
versions of the browser that have already been released.
The only thing that the plugin can do AFAIK is to use NPN_UserAgent to detect
the bugs in browsers that claim to have support but don't.
Marking WONTFIX because I don't think this can be fixed.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Assignee | ||
Comment 4•17 years ago
|
||
We could do a NPN_GetValue variable like NPNVSupportsXEmbedBool.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Comment 5•17 years ago
|
||
We had a discussion about how to best solve this issue and my requirement as a plugin writer is pretty simple: Give me a method to detect reliably if aplugin implementation supports windowless on X11. This has to work for all released plugin host implementations (all Mozilla browsers and Konqueror, Opera and whatever else) as well as for all future releases.
Since Mozilla tainted the NPVERS_HAS_WINDOWLESS method, another method is required. User agent sniffing is probably very suboptimal, or can someone give me a C code snippet that correctly blacklists all previous browsers?
So I'm all for adding a new NPN_GetValue variable as it makes it much less pain for plugin and plugin host writers.
Assignee | ||
Comment 6•17 years ago
|
||
I checked out nsplugins from kdebase-3.5.7, and opera 9.23. Although their NPN_Version functions return >= NPVERS_HAS_WINDOWLESS (0.11 and 0.16 respectively), at least neither of them returns NPERR_NO_ERROR from NPN_SetValue with NPPVpluginWindowBool. That bug seems to only be in Gecko. So user agent sniffing would only need to blacklist Gecko browsers.
However a big problem with user agent sniffing is that the user agent string can be changed by the user. (When plugins use this they can end up with problems like bug
As no other browser has yet provided windowless plugin support on X11, we still have the opportunity to require the API to provide a NPNV_SupportsWindowless variable even though that functionality seems redundant to the API.
Assignee | ||
Comment 8•17 years ago
|
||
Attachment #279400 -
Flags: review?(jst)
Updated•17 years ago
|
Attachment #279400 -
Flags: superreview+
Attachment #279400 -
Flags: review?(jst)
Attachment #279400 -
Flags: review+
Assignee | ||
Updated•17 years ago
|
Attachment #279400 -
Flags: approval1.9?
Attachment #279400 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Updated•17 years ago
|
Keywords: checkin-needed
checked in
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•17 years ago
|
Keywords: checkin-needed
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•