Hard coded plugin content type strings in nsLayoutDLF break external helper apps

VERIFIED FIXED

Status

()

Core
Plug-ins
P3
major
VERIFIED FIXED
18 years ago
18 years ago

People

(Reporter: Scott MacGregor, Assigned: av (gone))

Tracking

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta2+])

(Reporter)

Description

18 years ago
I'm implementing Bug #38374  for launching external helper applications for
content types we can't handle.


I've run into a problem which blocks that bug from working correctly for a
certain set of content types.

In nsLayoutDLF.cpp there is a had coded list of content types for plugins:

// XXX temporary
static char* gPluginTypes[] = {
  "video/quicktime",
  "video/msvideo",
  "video/x-msvideo",
  "application/vnd.netfpx",
  "image/vnd.fpx",
  "model/vrml",
  "x-world/x-vrml",
  "audio/midi",
  "audio/x-midi",
  "audio/wav",
  "audio/x-wav",
  "audio/aiff",
  "audio/x-aiff",
  "audio/basic",
  "application/x-shockwave-flash",
  "application/npapi-test",
  0
};

 layout registers a progid for each of these content types so it now thinks it
can create a content viewer for any of these regardless of whether we actually
HAVE a plugin for that type.

Now, when you click on a url that has one of these content types, layout says it
can handle it and trys to. However, if you don't have a plugin installed for
that type, we get an empty screen (because layotu can't create a nsPresContext
for the document) and on occasion I crash.

Why is this problem: because layout incorrectly says it can handle these content
types, we never reach the point where we would invoke a helper application. So
this bug prevents the launching of acrobat if you click on  .pdf file or quick
time if you click on a quick time url.
(Reporter)

Comment 1

18 years ago
nominating for nsbeta2. This partially blocks the functionality of the feature
exception bug: 38374.

I believe we need to only add entries in the registry for plugin content types
we actually have plugins for on the user's machine and not a hard coded list.
Severity: normal → major
Keywords: nsbeta2

Comment 2

18 years ago
nsbeta2+
Whiteboard: [nsbeta2+]
(Assignee)

Comment 3

18 years ago
Reassigning as per agreement.
Assignee: av → amusil
(Reporter)

Comment 4

18 years ago
Hey Alex, what do you think the ramifications are if we just deleted this table?
Or could I at least delete the pdf entry in this table? PDF is a common test
case for showing off helper application support. I was wondering if I could
delete that entry so people trying out helper apps could see it work.
(Assignee)

Comment 5

18 years ago
Back to me.
Assignee: amusil → av
(Assignee)

Comment 6

18 years ago
Fix checked in. Now plugin types are given by the plugin host object.
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 7

18 years ago
verified with acrobat that this is working (2000071108)
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.