Bug 80490 - The SWT browser widget doesn't work with input field types of file.
Summary: The SWT browser widget doesn't work with input field types of file.
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Grant Gayed CLA Friend
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-08 12:27 EST by Ryan Atkinson CLA Friend
Modified: 2005-09-14 09:26 EDT (History)
7 users (show)

See Also:


Attachments
patch for gtk, based on 3.0.2 (29.12 KB, patch)
2005-08-26 15:07 EDT, Grant Gayed CLA Friend
no flags Details | Diff
updated swt-mozilla library (gtk) (122.41 KB, application/octet-stream)
2005-08-26 15:08 EDT, Grant Gayed CLA Friend
no flags Details
3.0.2 patch for swt-motif (14.10 KB, patch)
2005-08-26 15:57 EDT, Grant Gayed CLA Friend
no flags Details | Diff
updated swt-mozilla library (motif) (122.41 KB, application/octet-stream)
2005-08-26 15:58 EDT, Grant Gayed CLA Friend
no flags Details
(gtk) new swt-mozilla library for swt, recompiled to not depend on libstdc++.so.6 (122.63 KB, application/octet-stream)
2005-08-26 17:38 EDT, Grant Gayed CLA Friend
no flags Details
(motif) new swt-mozilla library for swt, recompiled to not depend on libstdc++.so.6 (122.63 KB, application/octet-stream)
2005-08-26 17:39 EDT, Grant Gayed CLA Friend
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Atkinson CLA Friend 2004-12-08 12:27:29 EST
I am using the swt browser widget on Suse linux 9.1 with Mozilla 1.7.  I try to
access html pages with forms that have <input type="file"...> and get the
following exception thrown:

unable to open file picker
[Exception... "Component returned failure code: 0x80004001
(NS_ERROR_NOT_IMPLEMENTED) [nsIBaseWindow.blurSuppression]"  nsresult:
"0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"  location: "JS frame ::
file:///home/ratkinson/Projects/iMan25/iManager/run/bin/linux/mozilla/components/nsFilePicker.js
:: anonymous :: line 213"  data: no]

The file chooser window never comes up.

Some example html code:
<form enctype="multipart/form-data" method="post">
<p>
Please specify a file, or a set of files:<br>
<input type="file" name="myfiles" size="40">
</p>
</form>
Comment 1 Ryan Atkinson CLA Friend 2005-07-21 12:38:56 EDT
Please update the satus of this bug.  It was entered 7 months ago and is still 
listed as NEW.  If nobody is going to fix this then I will look at writing 
code to fix the problem.  Thanks.
Comment 2 Billy Biggs CLA Friend 2005-07-21 12:53:02 EDT
NS_ERROR_NOT_IMPLEMENTED looks like it might be a problem
in Mozilla itself.

Note that if a bug is marked NEW that just means it's still open
(at least the way we use bugzilla).  Please feel free to help
investigate any of our open bugs.  I guess it's unfortunate that
you can't tell from bugzilla whether someone is actively working
on a problem, but I'm not sure how useful that would be anyway.
Comment 3 Ryan Atkinson CLA Friend 2005-07-22 13:01:20 EDT
I believe the fix for this will be very similar to the fix for bug 60975.
Comment 4 Grant Gayed CLA Friend 2005-07-25 09:16:27 EDT
Bugs to investigate will be prioritized this week.  This should be one of them.
Comment 5 Grant Gayed CLA Friend 2005-08-24 18:07:52 EDT
ok, it's a missing nsIFilePicker implementation.  This will be fixed soon.
Comment 6 B. Chen CLA Friend 2005-08-25 16:37:14 EDT
Hi Grant,

We are at the end of our development for one of our products, this bug fix is 
critical to our product. Is there anyway you could give us an estimate as to 
when you will have a fix for this problem? 
Comment 7 Grant Gayed CLA Friend 2005-08-25 17:56:26 EDT
I released a fix to HEAD earlier this afternoon for gtk, and will have the 
analagous change released on motif tomorrow morning.  The only thing I haven't 
tested yet is gtk on 64-bit.

So how do you want to get these changes?  Are you planning to have a release 
later based on eclipse 3.1.1?  Or do you want a patch attached here so that you 
can do something with it?  It's a pretty large change, but is quite isolated in 
nature.
Comment 8 B. Chen CLA Friend 2005-08-25 19:23:00 EDT
Could you please attach the patch here?
Comment 9 Grant Gayed CLA Friend 2005-08-26 15:05:02 EDT
Backporting this to 3.0.2 has been more involved than I expected, but I've got 
it working on gtk.  Attached next is the patch that's needed for swt-gtk, 
followed by the updated swt-mozilla library.

The equivalent backport to motif is crashing for me, though it's working fine 
in HEAD.  I'll keep looking into this, but if you don't care about motif (ie.- 
it's not a target platform for you) then please follow up here, as there's no 
other reason to try to make this work in 3.0.2.
Comment 10 Grant Gayed CLA Friend 2005-08-26 15:07:27 EDT
Created attachment 26547 [details]
patch for gtk, based on 3.0.2
Comment 11 Grant Gayed CLA Friend 2005-08-26 15:08:07 EDT
Created attachment 26548 [details]
updated swt-mozilla library (gtk)
Comment 12 Grant Gayed CLA Friend 2005-08-26 15:56:57 EDT
ok, I figured out what was happening on motif.  The 3.0.2 patch and library for 
it are attached next.

Important: note that the motif patch requires that the gtk patch be applied 
first, because the gtk patch contains some shared code that the motif patch 
does not contain but does need to use.
Comment 13 Grant Gayed CLA Friend 2005-08-26 15:57:49 EDT
Created attachment 26559 [details]
3.0.2 patch for swt-motif
Comment 14 Grant Gayed CLA Friend 2005-08-26 15:58:26 EDT
Created attachment 26560 [details]
updated swt-mozilla library (motif)
Comment 15 Grant Gayed CLA Friend 2005-08-26 16:16:35 EDT
mozilla interface nsIFilePicker is unfrozen, so added comment to mozilla bug 
https://bugzilla.mozilla.org/show_bug.cgi?id=248683#c19 .

Marking report as fixed > 0826.  Beth if you still have questions regarding 
3.0.2 then feel free to append them here.
Comment 16 Daniel M. Schumacher CLA Friend 2005-08-26 16:53:07 EDT
Hi Grant,

I've applied your patch and rebuilt the SWT jars, and they seem to get farther 
with the old .so file (i.e. the Browse dialog appears - but then other errors 
occur, as expected), however, when I use your new .so file, I'm getting an 
UnsatisfiedLinkError -- complaining that it cannot find libstdc++.so.6.  Is 
libstdc++.so.6 a requirement for this new .so?  Didn't seem to be for the old 
one...  Is there any way this can be recompiled against libstdc++.so.5?
Comment 17 B. Chen CLA Friend 2005-08-26 17:10:00 EDT
Hi Grant,

Thanks for porting the fix to 3.0.2, looks like we are very close except the 
libaray mismatch that Daniel had found. Is it possible that this can be 
recompiled against libstdc++.so.5?
Comment 18 Grant Gayed CLA Friend 2005-08-26 17:38:12 EDT
Created attachment 26566 [details]
(gtk) new swt-mozilla library for swt, recompiled to not depend on libstdc++.so.6

ok, these should be better...
Comment 19 Grant Gayed CLA Friend 2005-08-26 17:39:06 EDT
Created attachment 26567 [details]
(motif) new swt-mozilla library for swt, recompiled to not depend on libstdc++.so.6
Comment 20 Grant Gayed CLA Friend 2005-09-08 11:18:30 EDT
This has been backported to the 3.1.1 stream as well.