Closed Bug 347563 Opened 18 years ago Closed 18 years ago

implement xforms:upload for xul context

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: surkov, Assigned: surkov)

References

Details

(Keywords: fixed1.8.0.12, fixed1.8.1.4)

Attachments

(2 files, 1 obsolete file)

We need support upload for xul.
What sort of support do you have in mind? I wrote the serverpost widget for actually submitting from XUL to a server (xulwidgets.mozdev.org), but in terms of file uploads, that means a file picker.
Also, is this properly a XForms bug? It might best belong in Toolkit for XUL widgets (where neil & jag, our UI gurus, can eyeball it).
(In reply to comment #2) > Also, is this properly a XForms bug? It might best belong in Toolkit for XUL > widgets (where neil & jag, our UI gurus, can eyeball it). > Alex, sorry for ambiguous. The bug is upload should be implemented for xforms that are hosted in xul document (http://www.w3.org/TR/xforms/slice8.html#ui-upload). I'm not sure really whether should be xul:upload control or not.
changing summary to better reflect bug is about.
Summary: upload for xul → implement xforms:upload for xul context
Blocks: 367826
Attached patch patch (obsolete) — Splinter Review
Attachment #256342 - Flags: review?(Olli.Pettay)
Attachment #256342 - Flags: review?(aaronr)
Status: NEW → ASSIGNED
(Just a note to myself; because upload is quite security sensitive, must be careful with the review.)
Comment on attachment 256342 [details] [diff] [review] patch >Index: extensions/xforms/resources/content/xforms-xul.xml >=================================================================== >+ <!-- UPLOAD: DISABLED --> >+ <binding id="xformswidget-upload-disabled" >+ extends="chrome://xforms/content/xforms.xml#xformswidget-upload-base"> >+ <content> >+ <children includes="label"/> >+ <xul:textbox anonid="text_control" >+ class="xf-value" >+ readonly="readonly" >+ tabindex="-1"/> >+ <xul:button anonid="browse_button" >+ xbl:inherits="tabindex" >+ label="&xforms.upload.browsetext;"/> >+ <xul:button anonid="clear_button" >+ xbl:inherits="tabindex" >+ label="&xforms.upload.cleartext;"/> don't you need to disable the buttons? >+ <children/> >+ </content> >+ >+ <implementation> >+ <method name="getControlElement"> >+ <body> >+ return { >+ get value(){ return ""; }, >+ set value(val){}, >+ set readonly(val){}, >+ focus: function(){} >+ }; >+ </body> >+ </method> >+ </implementation> >+ </binding> >+ I would vote that you have the xul upload extend the xhtml one or vice versa, then you only have to define getControlElement once. Just the anonymous content needs to be different. with those, r=me
Attachment #256342 - Flags: review?(aaronr) → review+
Comment on attachment 256342 [details] [diff] [review] patch firstly I guess I should fix Aaron's notions
Attachment #256342 - Flags: review?(Olli.Pettay)
Attached patch patch2Splinter Review
with fixed Aaron's comments
Attachment #256342 - Attachment is obsolete: true
Attachment #257379 - Flags: review?(Olli.Pettay)
I'd like to see a testcase for this too ;) (And I'm still trying figure out whether it is possible to use scripts to change the file to be uploaded. I hope not.)
Attached file testcase
(In reply to comment #10) > I'd like to see a testcase for this too ;) > (And I'm still trying figure out whether it is possible to use > scripts to change the file to be uploaded. I hope not.) > Why not, just use nsIXFormsAccessors::setValue() ;). But in any way I believe security related issue shouldn't deal with this bug.
Attachment #257379 - Flags: review?(Olli.Pettay) → review+
checked in on trunk
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
checked into 1.8 branch on 2007-04-12 checked into 1.8.0 branch on 2007-04-16
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: