========================================================================
http://mondrian.corp.google.com/file/10892071///depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_cr.cc?a=11
File 
//depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_cr.cc 
(snapshot 11)
------------------------------------
Line 26: #ifdef OFFICIAL_BUILD
On 3:28 pm, nigeltao wrote:
> Remove the #ifdef OFFICIAL_BUILD guard.

done.
========================================================================
http://mondrian.corp.google.com/file/10892071///depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_cr.cc?a=5
File 
//depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_cr.cc 
(snapshot 5)
------------------------------------
Line 241: // "Say" there's 1 drag file until we know more; extract the files.
On 4:15 pm, nigeltao wrote:
> On 2:58 pm, noel wrote:
> > So why suggest that 0 more appropriate?  In that case, we'd set g_drag_files
> to
> > 0, and return NULL to user javascript.
>  
> Technical nit, but javascript doesn't have NULL -- it has null, and it has
> undefined.

meant context->SetReturnValue(JSPARAM_NULL, NULL), the js null.


> But, what to return when dragging a directory -- whether to return 0, null, or
> undefined -- is something I'll leave to when we do our cross-OS cross-browser
> consistency pass.
>
> And consistency is why I want the Chrome code here to re-use
> the same FileDragAndDropMetaData class that Firefox, IE and Safari > all use.

That class as you've already mentioned is inconsistent and re-use is not my main
concern.

The code here runs in the context of the chromium browser, potentially within
the chromium renderer, so I want to use solid apis.  The code here checks all
return values and errors.  But there's one place I don't do that because of
another api I have concerns about.


> > What does
> > event.dataTransfer.getData("Text"|"URL") return if we return NULL when files
are being dragged?
  
> On IE, getData returns null when there isn't any data of that flavor.

exactly, and HTML5 is based on that model, and the GetDragData() api our
designed to simulate

  event.dataTransfer.getData("Files");

so we'd return null if we do as you suggest, set g_drag_files = 0.  And requests
for .getData("Text"|"URL") would return null too, right?  So what cursor does
the page javascript show to the user in that case?  Answ: never the right one.
========================================================================
http://mondrian.corp.google.com/file/10892071///depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_cr.cc?a=11
File 
//depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_cr.cc 
(snapshot 11)
------------------------------------
Line 375: g_identity = 0;
On 4:22 pm, nigeltao wrote:
> Any reason why we reset g_identity to zero? Does that mean that, if JS calls
> getDragData twice in succession, we will hit the disk twice?

yeah, was there reset g_identity in the improbable case of wrap, don't care
about that no more.  removed.
========================================================================

-- 
To respond, reply to this email or visit 
http://mondrian.corp.google.com/10892071

Reply via email to