Closed
Bug 852540
Opened 11 years ago
Closed 11 years ago
[Linux] Layout broken for open file dialog - default handler no longer presented
Categories
(Core Graveyard :: File Handling, defect)
Tracking
(firefox21 unaffected, firefox22+ verified)
VERIFIED
FIXED
mozilla22
Tracking | Status | |
---|---|---|
firefox21 | --- | unaffected |
firefox22 | + | verified |
People
(Reporter: virgil.dicu, Assigned: chrisccoulson)
References
Details
(Keywords: regression)
Attachments
(3 files)
Mozilla/5.0 (X11; Linux i686; rv:22.0) Gecko/20130319 Firefox/22.0 STR: 1. Visit http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/ 2. Select any tar file Actual result: Display broken for the open with entry - see screenshot in ubuntu Recent regression: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=e7632ab657e5&tochange=b0e08db3bc2a Last good nightly: 2013-02-27 First bad nightly: 2013-02-28 Used tinderbox builds to narrow down. This leads to bug 444440. f118eb2326f7 - broken c87c6b23794e - good
Comment 1•11 years ago
|
||
This seems like a lower level problem that would occur anywhere, not just in the file handling dialog. IIRC, the widget theming code should provide a minimum size - maybe it's wrong somehow? or XUL layout isn't using it correctly? Let's start in widget:gtk for further triage...
Component: File Handling → Widget: Gtk
Comment 2•11 years ago
|
||
Well, so... It seems like there might be a problem where we used to have something in the dropdown but now have nothing? Virgil, what did it use to say in there?
Reporter | ||
Comment 3•11 years ago
|
||
That would be the Archive Manager. FTR, this doesn't occur with simple docs (Libre Office is displayed as default)
Updated•11 years ago
|
tracking-firefox22:
--- → ?
Keywords: regression
Summary: [Linux] Layout broken for open file dialog → [Linux] Layout broken for open file dialog - default handler no longer presented
Assignee | ||
Comment 4•11 years ago
|
||
In the example given in comment 0, the mimetype is "application/x-bzip2", and so the handler lookup by mimetype in nsOSHelperAppService::GetMIMEInfoFromOS() fails because nothing on the system handles this. It falls back to looking up by extension (bz2), which finds a valid handler. However, the file extension is never stored in the returned nsMimeInfoUnix. What this means is that nsMIMEInfoUnix::GetHasDefaultHandler() now just falls all the way through to the end without finding a default handler (because the mimetype lookup fails), whereas it used to fall through to nsMIMEInfoImpl::GetHasDefaultHandler() which would say there is a default handler because the description is set (to "Archive Manager").
Assignee | ||
Comment 5•11 years ago
|
||
This unbreaks nsMIMEInfoUnix::GetHasDefaultHandler() by making sure that it can fall back to looking up by file extension
Attachment #727023 -
Flags: review?(karlt)
Comment 6•11 years ago
|
||
Comment on attachment 727023 [details] [diff] [review] Store the file extension on the nsMIMEInfoUnix returned from nsGNOMERegistry::GetFromExtension >@@ -125,17 +125,22 @@ nsGNOMERegistry::GetFromExtension(const > if (NS_FAILED(gnomevfs->GetMimeTypeFromExtension(aFileExt, mimeType)) || > mimeType.EqualsLiteral("application/octet-stream")) > return nullptr; > } > >- return GetFromType(mimeType); >+ nsRefPtr<nsMIMEInfoBase> mi = GetFromType(mimeType); >+ if (mi) { >+ mi->AppendExtension(aFileExt); >+ } >+ >+ return mi.forget(); I'm not following why this is necessary. If GetFromType() returns non null, then it has set mSchemeOrType on the result to mimeType. So when nsMIMEInfoUnix::GetHasDefaultHandler() calls nsGNOMERegistry::GetFromType() again with mSchemeOrType, why is it not still returning non-NULL? (In reply to Chris Coulson from comment #4) > In the example given in comment 0, the mimetype is "application/x-bzip2", > and so the handler lookup by mimetype in > nsOSHelperAppService::GetMIMEInfoFromOS() fails because nothing on the > system handles this. It falls back to looking up by extension (bz2), which > finds a valid handler. However, the file extension is never stored in the > returned nsMimeInfoUnix. When it finds a valid handler for the extension, isn't it doing that by finding a mime type for the extension, and then a handler for that mime type?
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to Karl Tomlinson (:karlt) from comment #6) > > If GetFromType() returns non null, then it has set mSchemeOrType on the > result to mimeType. > So when nsMIMEInfoUnix::GetHasDefaultHandler() calls > nsGNOMERegistry::GetFromType() again with mSchemeOrType, why is it not still > returning non-NULL? > > When it finds a valid handler for the extension, isn't it doing that by > finding a mime type for the extension, and then a handler for that mime type? You're right. There is something else going on here as well. It looks like mSchemeOrType gets set back to the original type just here: http://hg.mozilla.org/mozilla-central/file/1d6fe70c79c5/uriloader/exthandler/unix/nsOSHelperAppService.cpp#l1515
Comment 8•11 years ago
|
||
Comment on attachment 727023 [details] [diff] [review] Store the file extension on the nsMIMEInfoUnix returned from nsGNOMERegistry::GetFromExtension (In reply to Chris Coulson from comment #7) > It looks like mSchemeOrType gets set back to the original type just here: Ah, OK, thanks. Setting the extension seems reasonable to me, then, and this seems consistent with what nsOSHelperAppService::GetFromExtension() does with an nsMIMEInfoUnix from a mailcap entry. I suspect this is a fix for only some of the problems, as CopyBasicDataTo() from GetMIMEInfoFromOS() will overwrite this extension in some cases (bug 327323 comment 36), but should be a step in the right direction.
Attachment #727023 -
Flags: review?(karlt) → review+
Updated•11 years ago
|
Component: Widget: Gtk → File Handling
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Updated•11 years ago
|
Assignee: nobody → chrisccoulson
Comment 9•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/626c4a0f2047
Keywords: checkin-needed
Comment 10•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/626c4a0f2047
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Reporter | ||
Comment 11•11 years ago
|
||
Mozilla/5.0 (X11; Linux i686; rv:22.0) Gecko/20130322 Firefox/22.0 Looks good.
Status: RESOLVED → VERIFIED
Updated•11 years ago
|
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•