[Webkit-unassigned] [Bug 36482] Regression(r55766): [Chromium] chromiumDataObject.hasData() reports true for an empty clipboard

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 23 23:57:16 PDT 2010


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





--- Comment #6 from Roland Steiner <rolandsteiner at chromium.org>  2010-03-23 23:57:15 PST ---
(In reply to comment #5)
> I guess I'm a bit confused.  There are layout tests that test dragging URLs in
> a page (e.g., fast/events/drag-in-frames.html).  Do they go through this code
> path?

AFAICT the only place where it is called is in the copying code within
webdropdata.cc I mentioned. I.e., WebDropTarget::OnDragEnter creates a
WebDropData from the Windows clipboard and forwards it via IPC. On the other
side, in RenderView::OnDragTargetDragEnter(), it is immediately converted to a
WebDragData object, and during that conversion setURL(url) is called.

This call is made whether or not there is an original URL, which triggered the
bug. The change I made is just to clear the url and uriList members if the
input is empty.

As this is used in IPC code, I'm not sure what would be the best way to write a
test for it in the test shell.

Aside: Note that using this method one cannot distinguish between "set nothing"
and "set an empty url", but I guess this is inherent, and the latter is not
really needed for this.

> I agree that we should sanitize the data.  Isn't that what the if statement
> after the assert does?  It seems like we shouldn't crash in debug because the
> user dragged the recycling bin onto chrome.

When dragging the recycle bin, newURL.isEmpty() is true, so the ASSERT doesn't
trigger. (It's for this case that I made the change after all. ;) )

-- 
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