Closed
Bug 302569
Opened 20 years ago
Closed 20 years ago
moz-icon urls broken on Mac OS X
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.8beta4
People
(Reporter: mscott, Assigned: mscott)
References
Details
(Keywords: fixed1.8)
Attachments
(1 file)
|
10.28 KB,
patch
|
Biesinger
:
review+
pavlov
:
superreview+
cbeard
:
approval1.8b4+
|
Details | Diff | Splinter Review |
today's trunk build. 7/27
mozicons don't seem to be working in Mac OS X.
read a message with attachments. Notice that we don't draw a 16x16 icon to the
left of the attachment name anymore.
Weird, I can hack the CSS to make the attachment field use a background image
for the moz-icon and that draws just fine. So the problem may not be with
moz-icon but with how we are trying to display the icon inside that widget.
| Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → Thunderbird1.1
| Assignee | ||
Comment 1•20 years ago
|
||
For the Mac
nsIconChannel::AsyncOpen calls imgRequest::OnStartRequest. OnStartRequest
cancels the image load if there are no image listeners associated with the load.
http://lxr.mozilla.org/mozilla/source/modules/libpr0n/src/imgRequest.cpp#709
Our image frame code calls AsyncOpen on the icon channel and then it adds an
image listener after that routine returns. Hence the listener is added too late
and the image is canceled.
This effects Firefox as well.
Summary: Attachment icons not rendered on Mac OS X → moz-icon urls broken on Mac OS X
| Assignee | ||
Comment 2•20 years ago
|
||
The fix is to rework the mac implementation of the moz-icon output stream to
look more like windows. Using an input stream pump. This means the call to
OnStartRequest now happens after the AyncOpen call has returned to the caller,
so we no longer generate an error, which canceled the image load.
I'm not sure what changed on the trunk that broke this but this implementation
is much better than what we used to do and it fixes the problem.
Attachment #192563 -
Flags: review?(pavlov)
| Assignee | ||
Comment 3•20 years ago
|
||
Comment on attachment 192563 [details] [diff] [review]
the fix
I'd like to get biesi to review this change as well since he made the original
change for the windows implementation to use an in put stream pump.
Attachment #192563 -
Flags: superreview?(pavlov)
Attachment #192563 -
Flags: review?(pavlov)
Attachment #192563 -
Flags: review?(cbiesinger)
Comment 4•20 years ago
|
||
Comment on attachment 192563 [details] [diff] [review]
the fix
very nice
+ // Store our real listener
+ mListener = aListener;
+ // Add ourself to the load group, if available
The mListener assignment seems wrongly indented.
+nsresult nsIconChannel::MakeInputStream(nsIInputStream** _retval, PRBool
nonBlocking)
{
as is this bracket
+ nsCAutoString filePath;
+ nsresult rv = ExtractIconInfoFromUrl(getter_AddRefs(fileloc),
&desiredImageSize, contentType, filePath);
why filePath? It looks like it really is the extension? (hm... similar in the
windows code... but it overwrites filePath with the path from the nsILocalFile
if it has one? I don't know why it does that...) It looks like this code would
be better just naming this fileExt, though.
+ PRUint32 written;
+ rv = outStream->Write(iconBuffer.get(), iconSize, &written);
indentation is wrong here...
Looks like you can also remove mLoadAttributes from the header file.
looks good otherwise, r=biesi
Attachment #192563 -
Flags: review?(cbiesinger) → review+
Updated•20 years ago
|
Attachment #192563 -
Flags: superreview?(pavlov) → superreview+
| Assignee | ||
Comment 5•20 years ago
|
||
Comment on attachment 192563 [details] [diff] [review]
the fix
We need this to fix a regression from 1.0 on Mac OS X. This regression is in
Firefox and Thunderbird. The mime type icons for mail attachments and in the
browser prefs / downloads UI are no longer getting drawn because of this bug.
Attachment #192563 -
Flags: approval1.8b4?
| Assignee | ||
Comment 6•20 years ago
|
||
fixed on the trunk
Updated•20 years ago
|
Attachment #192563 -
Flags: approval1.8b4? → approval1.8b4+
| Assignee | ||
Comment 7•20 years ago
|
||
fixed on the branch
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Component: Mail Window Front End → ImageLib
Flags: review+
Keywords: fixed1.8
Product: Thunderbird → Core
Target Milestone: Thunderbird1.1 → ---
Updated•20 years ago
|
Target Milestone: --- → mozilla1.8beta4
Updated•20 years ago
|
Attachment #192563 -
Flags: review+
You need to log in
before you can comment on or make changes to this bug.
Description
•