[Webkit-unassigned] [Bug 39843] [GTK] WebKitWebView should support drops

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jul 11 09:48:03 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=39843





--- Comment #7 from Martin Robinson <mrobinson at webkit.org>  2010-07-11 09:48:04 PST ---
Thanks for the review!

> I don't think the extra lines are according to the style guide.

Okay, I've removed them. :)


> >+Vector<GdkAtom> PasteboardHelper::dropAtomsForContext(GtkWidget* widget, GdkDragContext* context)
> >+{
> >+    // Always search for these common atoms.
> >+    Vector<GdkAtom> dropAtoms;
> >+    dropAtoms.append(textPlainAtom);
> >+    dropAtoms.append(markupAtom);
> >+    dropAtoms.append(uriListAtom);
> >+    dropAtoms.append(netscapeURLAtom); 
> This could possibly be saved and be reused.

Since the last element is dynamic I cannot think of a way to cache
this value without actually copying the vector for the return value.
It could possibly be two methods, but I'm not sure the speedup is worth
the confusing code. I'm willing to revisit this later, if you like.

> idle or timeout this seems like a bit of hack... :/

I agree it's a bit dirty. Mozilla and Chromium pull the same trick:

http://mxr.mozilla.org/mozilla-central/source/widget/src/gtk2/nsWindow.cpp#3792
http://www.google.com/codesearch/p?hl=en#h0RrPvyPu-c/chrome/browser/tab_contents/web_drag_dest_gtk.cc&q=package:%22src.chromium.org/svn/trunk%22%20drag-leave&sa=N&cd=5&ct=rc&l=205

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list