Dub Stojerossoff ([info]fyysik) wrote in [info]bezilla,
@ 2007-12-29 23:22:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Two patches submitted.
First is for Bug 152156, it allows proper Mozilla windows update/redraw when FilePicker is open.

Second, for Bug 217723, adds native file/mime type recognition.

How to test second one?
1)Try to open with current Mozilla some text or image file without extension (rename some file temporarily if it has extension). Mozilla fails at that attempt.
2)Try same with patch applied.


There is also third patch on hold - it adds filters to FilePicker, but I will wait checkin for Bug 152156


(Post a new comment)


[info]tigerdog
2008-01-01 01:46 am UTC (link)
Happy New Year, everyone! Just now getting a chance to try these. Both patches apply cleanly but there appears to be a problem in the native file/mime type recognition patch. I haven't had a chance to look at the details but here's the console bustage:

c++ -o nsExternalHelperAppService.o -c -DMOZILLA_INTERNAL_API -DOSTYPE=\"BeOS6.2\" -DOSARCH=\"BeOS\" -DBUILD_ID=0000000000 -I/boot/home/develop/FirefoxTwoOh/mozilla/uriloader/exthandler -I../../dist/include/xpcom -I../../dist/include/string -I../../dist/include/unicharutil -I../../dist/include/mimetype -I../../dist/include/uriloader -I../../dist/include/necko -I../../dist/include/rdf -I../../dist/include/webshell -I../../dist/include/plugin -I../../dist/include/pref -I../../dist/include/intl -I../../dist/include/uconv -I../../dist/include/docshell -I../../dist/include/windowwatcher -I../../dist/include/embed_base -I../../dist/include/dom -I../../dist/include/toolkitcomps -I../../dist/include/exthandler -I../../dist/include -I../../dist/include/nspr -I../../dist/sdk/include -frtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-multichar -Wno-long-long -pedantic -pipe -DNDEBUG -DTRIMMED -O3 -march=i686 -mcpu=i686 -DMOZILLA_CLIENT -include ../../mozilla-config.h -Wp,-MD,.deps/nsExternalHelperAppService.pp /boot/home/develop/FirefoxTwoOh/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp
/boot/home/develop/FirefoxTwoOh/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp: In method `nsresult nsExternalHelperAppService::GetTypeFromFile(nsIFile *, nsACString_internal &)':
/boot/home/develop/FirefoxTwoOh/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp:2951: `BEntry' undeclared (first use this function)
/boot/home/develop/FirefoxTwoOh/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp:2951: (Each undeclared identifier is reported only once
/boot/home/develop/FirefoxTwoOh/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp:2951: for each function it appears in.)
/boot/home/develop/FirefoxTwoOh/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp:2951: parse error before `('
/boot/home/develop/FirefoxTwoOh/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp:2952: `BPath' undeclared (first use this function)
/boot/home/develop/FirefoxTwoOh/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp:2953: `bpath' undeclared (first use this function)
/boot/home/develop/FirefoxTwoOh/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp:2959: `update_mime_info' undeclared (first use this function)
/boot/home/develop/FirefoxTwoOh/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp:2961: `BNode' undeclared (first use this function)
/boot/home/develop/FirefoxTwoOh/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp:2961: parse error before `('
/boot/home/develop/FirefoxTwoOh/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp:2962: `node' undeclared (first use thisfunction)
/boot/home/develop/FirefoxTwoOh/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp:2965: parse error before `('
/boot/home/develop/FirefoxTwoOh/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp:2966: no matching function for call to `nsCOMPtr::GetType (char[241])'
make[4]: *** [nsExternalHelperAppService.o] Error 1
make[4]: Leaving directory `/boot/home/develop/FirefoxTwoOh/mozilla/opt-FF2-Zeta/uriloader/exthandler'
make[3]: *** [libs] Error 2
make[3]: Leaving directory `/boot/home/develop/FirefoxTwoOh/mozilla/opt-FF2-Zeta/uriloader'
make[2]: *** [tier_9] Error 2
make[2]: Leaving directory `/boot/home/develop/FirefoxTwoOh/mozilla/opt-FF2-Zeta'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/boot/home/develop/FirefoxTwoOh/mozilla/opt-FF2-Zeta'
make: *** [build] Error 2
$


I probably screwed up something in applying the patch but didn't want you to think I was ignoring you.

(Reply to this)(Thread)


[info]fyysik
2008-01-01 11:23 am UTC (link)
will look at that when back at home

(Reply to this)(Parent)

mea culpa
[info]fyysik
2008-01-01 05:47 pm UTC (link)
forgot to add include files for native BeOS defines, try new patch now

(Reply to this)(Parent)(Thread)

Re: mea culpa
[info]tigerdog
2008-01-01 07:36 pm UTC (link)
This worked. After building, I was able to open a jpeg file with no extension in the file name. Oddly, though, I was also able to open the same file using the older version. Maybe I'm not testing correctly?

(Reply to this)(Parent)(Thread)

Re: mea culpa
[info]fyysik
2008-01-01 07:40 pm UTC (link)
that's strange. with older version I was unable to open even text files from disk even those with .TXT extension:)

maybe you tried to open it from internet, not local disk?

(Reply to this)(Parent)(Thread)

Re: mea culpa
[info]tigerdog
2008-01-01 08:40 pm UTC (link)
very strange - I saw the problem you describe under R5, but not under Zeta. I'll create an R5 build to make sure this patch solves the problem.

(Reply to this)(Parent)(Thread)

Re: mea culpa
[info]fyysik
2008-01-01 08:46 pm UTC (link)
ahh, that may create that difference!
1)At some place we use function in Mozilla to get mime type GuessMimeType() which can work differently here and there
2)Zeta can have more complete type database, where file types are powered by extensions list more carefully

(Reply to this)(Parent)(Thread)

It works!
[info]tigerdog
2008-01-01 11:22 pm UTC (link)
I built a Netserver Firefox and tested under R5.0.3. Before the patch, Firefox was unable to recognize the file and brought up a dialog box asking which application to open the file with. After the patch, the text file I was testing appeared right in Firefox. Good work, Sergei!

(Reply to this)(Parent)


[info]monikafadeh
2008-07-16 03:31 am UTC (link)
If it were not for open source, you wouldn't be able to open or edit old word documents with office xp.

(Reply to this)(Parent)


[info]tigerdog
2008-01-01 06:00 pm UTC (link)
I'll try the new patch. Also, looks like trouble with the other patch, too:

/boot/home/develop/FirefoxTwoOh/mozilla/opt-FF2-Zeta/dist/include/xpcom/nsISupportsUtils.h: In function `static const struct nsIID & nsCOMTypeInfo::GetIID()':
../../../dist/include/xpcom/nsCOMPtr.h:694: instantiated from `nsCOMPtr::nsCOMPtr(const nsCOMPtr_helper &)'
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp:142: instantiated from here
/boot/home/develop/FirefoxTwoOh/mozilla/opt-FF2-Zeta/dist/include/xpcom/nsISupportsUtils.h:202: no method `nsIAppShell::GetIID'
/boot/home/develop/FirefoxTwoOh/mozilla/opt-FF2-Zeta/dist/include/xpcom/nsISupportsUtils.h:202: warning: control reaches end of non-void function `nsCOMTypeInfo::GetIID()'
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp: At top level:
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp: In instantiation of `nsDerivedSafe':
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp:144: instantiated from here
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp:144: base class `nsIAppShell' has incomplete type
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp: In method `nsresult nsFilePicker::Show(PRInt16 *)':
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp:144: no matching function for call to `nsDerivedSafe::Create (int, int)'
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp:145: no matching function for call to `nsDerivedSafe::Spinup ()'
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp:191: no matching function for call to `nsFilePanelBeOS::SelectionDone ()'
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp:201: no matching function for call to `nsDerivedSafe::GetNativeEvent (PRBool &, void *&)'
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp:206: no matching function for call to `nsDerivedSafe::DispatchNativeEvent (PRBool &, void *&)'
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp:312: no matching function for call to `nsDerivedSafe::Spindown ()'
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp: In method `nsFilePanelBeOS::~nsFilePanelBeOS()':
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp:483: warning: `void *' is not a pointer-to-object type
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp: At top level:
/boot/home/develop/FirefoxTwoOh/mozilla/widget/src/beos/nsFilePicker.cpp:545: no `bool nsFilePanelBeOS::SelectionDone()' member function declared in class `nsFilePanelBeOS'
make[5]: *** [nsFilePicker.o] Error 1
make[5]: Leaving directory `/boot/home/develop/FirefoxTwoOh/mozilla/opt-FF2-Zeta/widget/src/beos'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/boot/home/develop/FirefoxTwoOh/mozilla/opt-FF2-Zeta/widget/src'
make[3]: *** [libs] Error 2
make[3]: Leaving directory `/boot/home/develop/FirefoxTwoOh/mozilla/opt-FF2-Zeta/widget'
make[2]: *** [tier_9] Error 2
make[2]: Leaving directory `/boot/home/develop/FirefoxTwoOh/mozilla/opt-FF2-Zeta'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/boot/home/develop/FirefoxTwoOh/mozilla/opt-FF2-Zeta'
make: *** [build] Error 2
$

(Reply to this)(Thread)


[info]fyysik
2008-01-01 06:22 pm UTC (link)
Will look ASAP at that too. Looks like something is wrong with nsFilePicker.h file.

(Reply to this)(Parent)


Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…