nsDocumentOpenInfo or relatives aren't friendly enough




Document Navigation
12 years ago
11 years ago


(Reporter: timeless, Unassigned)



Firefox Tracking Flags

(Not tracked)




12 years ago
1. load file:///tmp/ or an equivalent, file:///c:/ ...
expected results: an html directory index.
if you get a xul index, then you'll need to see 11.
2. open jsconsole
3. Components.classes["@mozilla.org/categorymanager;1"].getService(Components.interfaces.nsICategoryManager).getCategoryEntry("Gecko-Content-Viewers","application/http-index-format")
expected results:
something like @mozilla.org/xpfe/http-index-format-factory-constructor
you can use this value to undo the damage from 4
4. Components.classes["@mozilla.org/categorymanager;1"].getService(Components.interfaces.nsICategoryManager).deleteCategoryEntry("Gecko-Content-Viewers","application/http-index-format",false)
5. repeat step 1
expected results:
depends on your definition of expected results.
ideal results:
same as from step 1.
actual results:
(minefield.mcsmurf, your error dialog may vary if you pick some other gecko)

Opening Application Data [*a1* This should read "tmp" if you're following 1 religiously]
You have chosen to open

 [) Application Data [*a1*]

which is a: application/http-index-format [*b1* for some reason the "which is a:" and "application/http-index-format " don't seem to be in pixel perfect alignment]
from c:\FILES [*a2* This should read "/" if you're following 1 religiously]

/- What should Minefield do with this file? -----------------------------\
|                                                                        |
|    ( ) Open with [ Browser ... ]                                       |
|    (*) Save to Disk                                                    |
|    [ ] Do this automatically for files like this from now on.          |
|                                                                        |
                                           [      OK      ] [   Cancel   ]

11. about:config
12. network.dir.format
13. change 3 to 2
14. go back to step 1.

Comment 1

12 years ago
oh, heh. problem happens on linux(arm) and linux(x86) and windows(x86), so i guess that's all/all. :)
OS: Windows XP → All
Hardware: PC → All
So what exactly is the problem?  That you can break rendering of file:// stuff?  You can break rendering of HTML too, by nuking Gecko-Content-Viewers....  So?
the bug is that the stream converter should be invoked here
Ah, ok.  So the issue is that we only try conversions to */*?

We could do some work on the converter service to make this happier, I suppose...

Comment 5

12 years ago
yes, we only try converting to */* unless for some strange reason there's an *unrelated* quirk floating around. I gave up tracing the code past that point.

this could probably be done by taking all endpoints that the converters have and asking the target browser if it likes them. any such yes's add another graph bit from the endpoint to */* (somehow you have to score being able to use the original window or other windows).

note that if you build minimo, you seem to get this problem w/o any effort because there is no category entry to remove.
oh... this stream converter converts to text/html, not */*? does this mean that firefox actually builds xpfe/components/directory?

Comment 7

12 years ago
firefox builds it. but only firefox that isn't xulrunner manages to link this. the result is that new firefoxes are just as unhappy as the app that originally caused me to file this bug.
You need to log in before you can comment on or make changes to this bug.