Closed
Bug 131230
Opened 23 years ago
Closed 23 years ago
handle known image decoder mime types internally
Categories
(Core Graveyard :: Plug-ins, defect, P3)
Core Graveyard
Plug-ins
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.0
People
(Reporter: peterlubczynski-bugs, Assigned: peterlubczynski-bugs)
References
()
Details
(Whiteboard: [ADT2])
Attachments
(1 file, 1 obsolete file)
4.50 KB,
patch
|
Biesinger
:
review+
beard
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
We need to handle PNG's internally and not let plugins take over.
Need to take a look why nsObjectFrame::IsSupportedImage isn't working for PNGs
like it does GIFs and JPGs.
Assignee | ||
Updated•23 years ago
|
Assignee | ||
Comment 2•23 years ago
|
||
Here's a patch that prevents plugins from taking over full-page mode for mime
types that we have image decoders.
This patch comes at a high cost to me as I accidentally nuked my registry and
lost my profiles :(
Grepping my new registry, these look like the type that will be overriden:
image/x-icon
image/bmp
image/gif
image/icon
image/jpeg
video/x-mng
image/x-jng
image/png
image/x-png
image/x-portable-pixmap
image/inspector-bitmap
Does anyone have testcases for any of the above types?
Assignee | ||
Updated•23 years ago
|
Comment on attachment 74468 [details] [diff] [review]
possible fix?
No wonder IsSupportedImage does not work -- this is full-page mode :) Although
the patch seems to help, we should probably make this mechanism more flexible
when we come to implementing plugin/mimetype manager.
r=av.
Attachment #74468 -
Flags: review+
Comment 4•23 years ago
|
||
*** Bug 131844 has been marked as a duplicate of this bug. ***
Comment 5•23 years ago
|
||
You would probably do less work with something of this form
nsCAutoString decoderId = NS_LITERAL_CSTRING("...")
+ nsDependentString(pluginTag->mMimeTypeArray[i]);
in case the total length goes over the size limit of an auto string. If it is
impossible to excede this length, then your code is fine.
Comment 6•23 years ago
|
||
Please wait with this patch until the patch for bug 104906 is in. It adds
functions to imgILoader for checking if an image type is supported, e.g.:
PRBool isReg;
nsCOMPtr<imgILoader> loader(do_GetService("@mozilla.org/image/loader;1"));
loader->SupportImageWithMimeType(pluginTag->mMimeTypeArray[i], &isReg);
Depends on: 104906
Nominating nsbeta1+ per weekly plugin meeting.
Comment 9•23 years ago
|
||
patch for bug 104906 is in, removing dependency
No longer depends on: 104906
Assignee | ||
Comment 10•23 years ago
|
||
Here's a better patch to use the new |SupportImageWithMimeType|. Just in case
someone ever wants to write a super-duper PNG plugin, this behavior is now
controled by a pref, "plugin.override_internal_types". When set to TRUE, the
old behavior of allowing plugins to override image decoder mime types will be
present. You must restart the browser for the pref to take effect.
Please review/comment.
Attachment #74468 -
Attachment is obsolete: true
Comment 11•23 years ago
|
||
Maybe it would make sense to check this pref not only on start up but also when
we refresh plugins? Plugin may access this pref during installation process and
ask user if he wants to reconfigure the browser. As an additional benefit there
will be no need for |mOverrideInternalTypes|. I understand that accessing prefs
is kind of expensive but this will not happened often, and besides, I feel that
any prefs related to plugins in general case should be updated with any
potential plugin change, i.e. plugins.refresh.
Comment 12•23 years ago
|
||
Comment on attachment 75968 [details] [diff] [review]
patch using |SupportImageWithMimeType| and adding pref
r=biesi
Attachment #75968 -
Flags: review+
Assignee | ||
Comment 13•23 years ago
|
||
There are bugs preventing this pref from being set dynamically! It doesn't
appear that the document loader factories are ever unregistered for either
plugins or image loaders. It doesn't work to set the pref at run-time when the
code is arranged to do it dynamically. We continue to use the plugin or imglib
until a restart.
Keywords: review
Priority: -- → P3
Comment 14•23 years ago
|
||
Comment on attachment 75968 [details] [diff] [review]
patch using |SupportImageWithMimeType| and adding pref
OK, that explains special treatment for this case, r=av
Comment 15•23 years ago
|
||
Comment on attachment 75968 [details] [diff] [review]
patch using |SupportImageWithMimeType| and adding pref
sr=beard
Attachment #75968 -
Flags: superreview+
Comment 16•23 years ago
|
||
Comment on attachment 75968 [details] [diff] [review]
patch using |SupportImageWithMimeType| and adding pref
a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #75968 -
Flags: approval+
Assignee | ||
Comment 17•23 years ago
|
||
patch in trunk, marking FIXED
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 19•23 years ago
|
||
Confirmed, PNG files do appear to be handled internally by Mozilla rather than
by the QT plug-in (with QT set to not handle them) using FizzillaCFM/2002032915.
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
•