Closed
Bug 415273
Opened 18 years ago
Closed 17 years ago
moz-icon failing to display correct icon with contentType parameter specified
Categories
(Core :: Graphics: ImageLib, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla1.9
People
(Reporter: jimm, Assigned: jimm)
References
()
Details
Attachments
(3 files, 1 obsolete file)
32.22 KB,
image/pjpeg
|
Details | |
25.35 KB,
image/pjpeg
|
Details | |
2.54 KB,
patch
|
pavlov
:
review+
beltzner
:
approval1.9b5-
beltzner
:
approval1.9+
|
Details | Diff | Splinter Review |
Recently moz-icon urls that specify contentType as a parameter fail to display the correct icon for certain application file types. The icon displayed is the generic "white paper" icon instead.
To reproduce, type -
"moz-icon://somefile.zip?size=32&contentType=application/zip"
in the address bar.
Result: you should see the generic icon.
Display is correct if you remove the contentType parameter -
"moz-icon://somefile.zip?size=32"
A found at least one other app that failed as well -
moz-icon://somefile.ipa?size=32&contentType=application/x-itunes-ipa
vs.
moz-icon://somefile.ipa?size=32
which worked.
This shows up most notably in the content handler dialog and in the app picker dialog when users click on a link to a zip file.
A little debugging - the icon file is opened successfully in both cases within nsIconCahnnel -
http://lxr.mozilla.org/mozilla/source/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp#273
![]() |
Assignee | |
Comment 1•18 years ago
|
||
![]() |
Assignee | |
Comment 2•18 years ago
|
||
Updated•18 years ago
|
Component: OS Integration → ImageLib
Product: Firefox → Core
QA Contact: os.integration → imagelib
![]() |
Assignee | |
Updated•18 years ago
|
Flags: blocking1.9?
This should be a pretty easy fix.
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
Updated•17 years ago
|
Flags: wanted-next+
Flags: tracking1.9+
Flags: blocking1.9-
Comment 4•17 years ago
|
||
Jim: If you can put a patch together for this request approval
![]() |
Assignee | |
Comment 5•17 years ago
|
||
working it now...
![]() |
Assignee | |
Comment 6•17 years ago
|
||
Assignee: nobody → jmathies
Status: NEW → ASSIGNED
![]() |
Assignee | |
Updated•17 years ago
|
Attachment #310534 -
Flags: review?(pavlov)
Comment 7•17 years ago
|
||
Comment on attachment 310534 [details] [diff] [review]
nsIconChannel patch v.1
Nice. As a bonus, this will make it easier to convert the code to Unicode APIs.
>+ mimeService->GetPrimaryExtension(contentType, fileExt, defFileExt);
I wonder whether we're allowed to reuse the in string as the out string?
Updated•17 years ago
|
Attachment #310534 -
Flags: review?(pavlov) → review+
![]() |
Assignee | |
Updated•17 years ago
|
Attachment #310534 -
Flags: approval1.9?
![]() |
Assignee | |
Comment 8•17 years ago
|
||
> I wonder whether we're allowed to reuse the in string as the out string?
Didn't seem to cause any problems when I was testing it.
Updated•17 years ago
|
Attachment #310534 -
Flags: approval1.9b5?
Comment 9•17 years ago
|
||
Comment on attachment 310534 [details] [diff] [review]
nsIconChannel patch v.1
Tests?
Attachment #310534 -
Flags: approval1.9b5? → approval1.9b5-
Comment 10•17 years ago
|
||
(In reply to comment #7)
> >+ mimeService->GetPrimaryExtension(contentType, fileExt, defFileExt);
> I wonder whether we're allowed to reuse the in string as the out string?
it's an implementation detail that it works - in this case, it will. relying on that is probably a bad idea, though, unless you're calling from within the implementation itself.
Comment 11•17 years ago
|
||
Jim - thoughts on comment 10?
![]() |
Assignee | |
Comment 12•17 years ago
|
||
I'll go ahead and roll together a new patch to address this.
I've also been looking for ways to add tests as well but haven't come up with anything. The bug is related to application associations which obviously change from machine to machine. I was looking for a way to create an icon compare test but haven't found anything i'd consider reliable.
![]() |
Assignee | |
Updated•17 years ago
|
Attachment #310534 -
Flags: approval1.9?
![]() |
Assignee | |
Comment 13•17 years ago
|
||
updated to force a string copy in GetPrimaryExtension.
Attachment #310534 -
Attachment is obsolete: true
![]() |
Assignee | |
Updated•17 years ago
|
Attachment #312771 -
Flags: review?(dwitte)
Comment 14•17 years ago
|
||
(In reply to comment #13)
> updated to force a string copy in GetPrimaryExtension.
Why?
![]() |
Assignee | |
Comment 15•17 years ago
|
||
Did I somehow misinterpret the concern that was raised? I thought the issue was with the in/out behavior of the extension string.
Comment 16•17 years ago
|
||
nsMIMEInfoBase::GetPrimaryExtension has no inout parameter... do you mean nsExternalHelperAppService::GetPrimaryExtension?
(but I think that should be fixed in the caller)
![]() |
Assignee | |
Updated•17 years ago
|
Attachment #312771 -
Flags: review?(dwitte)
Comment 17•17 years ago
|
||
(In reply to comment #15)
> Did I somehow misinterpret the concern that was raised? I thought the issue was
> with the in/out behavior of the extension string.
I'm sorry if I confused you; I was wondering why you had used two different strings, and dwitte replied confirming that your patch v.1 was correct.
![]() |
Assignee | |
Comment 18•17 years ago
|
||
Ok, I guess I should have had a little more faith. The extension string passes into GetPrimaryExtension as fileExt, and then back out as defFileExt. It's shared so it's just the same string. I didn't see any problems with that but strings in mozilla are still a little hazy for me so I assumed I had screwed up due somehow.
If everybody is cool with the first patch, I'll mark it as checkin-needed.
![]() |
Assignee | |
Updated•17 years ago
|
Attachment #312771 -
Attachment is obsolete: true
![]() |
Assignee | |
Comment 19•17 years ago
|
||
Comment on attachment 310534 [details] [diff] [review]
nsIconChannel patch v.1
actually... one more to go.
Attachment #310534 -
Attachment is obsolete: false
Attachment #310534 -
Flags: approval1.9?
Comment 20•17 years ago
|
||
Comment on attachment 310534 [details] [diff] [review]
nsIconChannel patch v.1
a1.9=beltzner
Attachment #310534 -
Flags: approval1.9? → approval1.9+
![]() |
Assignee | |
Updated•17 years ago
|
Keywords: qawanted → checkin-needed
Comment 21•17 years ago
|
||
Checking in modules/libpr0n/decoders/icon/win/nsIconChannel.cpp;
/cvsroot/mozilla/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp,v <-- nsIconChannel.cpp
new revision: 1.46; previous revision: 1.45
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9
Comment 22•17 years ago
|
||
cause bug 427978 ?
You need to log in
before you can comment on or make changes to this bug.
Description
•