#3003 HIGH Trial-3: Some jpg images drag onto clipboard correctly and some do not

Zarro Boogs per Child bugtracker at laptop.org
Sat Sep 15 12:47:34 EDT 2007


#3003: Some jpg images drag onto clipboard correctly and some do not
-----------------------+----------------------------------------------------
  Reporter:  kimquirk  |       Owner:  marco  
      Type:  defect    |      Status:  new    
  Priority:  high      |   Milestone:  Trial-3
 Component:  sugar     |     Version:         
Resolution:            |    Keywords:         
  Verified:  0         |  
-----------------------+----------------------------------------------------

Comment(by marco):

 It happens only with web pages using frames. We are attaching
 DragDropHooks only to the root docshell. Thoughts:

  * Unfortunately I don't think there is way to observe docshell creation
 so we can't hook to the children.
  * Mozilla could propagate dnd handling up until the root when there are
 not handlers setup for the children probably. Though the fact that you
 need to hook this up for every DOM window is explicitly stated in the API
 documentation so I'm not sure that's a solution either.
  * I'm not convinced the way we currently handle image drag and drop is
 very good anyway. It's sync and it seem prone to leaking files in tmp.
  * It's essential that the image saving is handled by the browser. On OS X
 firefox use a pretty smart system protocol to handle drop on the
 filemanager, leaving the browser in charge of saving the file. The best
 fix would probably to come up with something similar for gtk, implement it
 in mozilla and reuse it for our clipboard. Nautilus has the same problem.
 Not trivial, obviously.
  * It would be probably possible to come up with a Sugar specific protocol
 to let the browser download the file in this case (have the shell call
 back the DBus service of the activity instance for example). This is
 likely not going to play well with the security system, though.
  * Lacking any other solution we might just handle the download outside
 the browser. That means it will break every time cookies, authentication
 etc are involved with the download though (and that we would be
 redownloading the image rather than just getting it from the cache).

-- 
Ticket URL: <https://dev.laptop.org/ticket/3003#comment:4>
One Laptop Per Child <https://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list