Closed Bug 186490 Opened 22 years ago Closed 12 years ago

Create about:plugins from C++ code

Categories

(Core Graveyard :: Plug-ins, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

VERIFIED WONTFIX

People

(Reporter: Biesinger, Unassigned)

References

Details

Attachments

(2 files, 1 obsolete file)

Maybe it would be a good idea to create that page from C++ code, instead of
having it load an HTML page with embedded javascript code.

That way, the page would have no problems with stringbundle access for
localization, and it wouldn't require JavaScript to be enabled to load the page
either.

Any objections?
so this should fix bug 98298, bug 91779 and bug 170851 ?
It makes the first and last of the bugs you mention INVALID, and would fix the
about:plugins part of the second but you mention.
status update: ok, I have a non-localizable version of this done.

now I'll work on making this localizable.
OS: Windows 98 → All
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → mozilla1.3beta
Attached patch patch (obsolete) — Splinter Review
this should do it
Attached patch new patchSplinter Review
Now unbitrotted to work with current trunk
Attachment #111864 - Attachment is obsolete: true
Attached patch additional patchSplinter Review
this is needed too, else two components register for the same contractid
Attachment #111912 - Flags: review?(peterl)
Attachment #111913 - Flags: review?(peterl)
Status: NEW → ASSIGNED
I'm using those patches in my current builds, and it looks it's working perfectly.

You should also cvs remove xpfe/communicator/resources/content/plugins.html
after your patch is checked in, btw...
+  nsIDOMPlugin** plugins = new nsIDOMPlugin*[pluginCount];

where do you free plugins[]? |GetPlugins| also makes lots of copies of strings
and I wonder if it would be any better to go off the navigator object off the
global window?
I was going to file a bug, but this seems to be a better place for it.

Most internal mozilla pages appear to be XHTML at this point (for example the
about page).

Seems appropriate that about:plugins also be XHTML 1.0, rather than HTML 4.01
Strict as it is now (1.5b).
Comment on attachment 111912 [details] [diff] [review]
new patch

clearing review request per previous comments
Attachment #111912 - Flags: review?(peterl-bugs)
If there are problems (91779 and 98298) then we need to fix the problems. 
Mstoltz has already said this is possible, and I agree with him.  I'd rather
avoid the extra compiled code if we can.  IMO, this bug should be marked WONTFIX
and the real problems addressed.
Fine by me either way, _if_ they get addressed...
Status: ASSIGNED → NEW
Priority: P1 → P4
Target Milestone: mozilla1.3beta → mozilla1.9alpha
Attachment #111913 - Flags: review?(peterl-bugs)
doesn't look like I'll get to this anytime soon. if the owner disagrees with
this bug, feel free to wontfix.
Assignee: cbiesinger → nobody
Priority: P4 → --
QA Contact: shrir → core.plugins
Target Milestone: mozilla1.9alpha → ---
Another advantage of generating about:plugins from C++ (or chrome JS) is that you could save the output with "Save As" and upload it to Bugzilla.
I would assume that saving as "web page, complete" will work even now.
Oh, that does work, thanks to the script in the page trying to elevate privileges and failing ;)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
It was asked "why" on IRC, so my 2 cents:

Many other about: pages are implemented in JS/HTML/XUL, and as a front-end feature that's the preferred way to implement things. Not to mention that there's a general preference for JS over C++ unless it's needed for specific reasons -- JS is a safe language (ie, no buffer overruns), and exposes the code to a wider audience of developers.

See also bug 619652.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: