[Webkit-unassigned] [Bug 46943] [chromium] getData('text/uri-list') should return the same thing that was passed to setData('text/uri-list')

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 5 11:07:55 PDT 2010


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





--- Comment #5 from Daniel Cheng <dcheng at chromium.org>  2010-10-05 11:07:55 PST ---
(In reply to comment #4)
> (From update of attachment 69763 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=69763&action=review
> 
> > LayoutTests/editing/pasteboard/script-tests/dataTransfer-setData-getData.js:119
> > +    test("text/uri-list", "# comment\r\n# comment 2\r\n# comment 3", 
> > +         "URL", null);
> 
> The spec says this should return an empty string, not null:
> http://dev.w3.org/html5/spec/dnd.html
> "If there is no data with that format, or if there is but it has no URLs, then the method must return the empty string."
> 
> > WebCore/platform/chromium/ChromiumDataObject.cpp:145
> >          success = !m_url.isEmpty();
> >          return m_url.string();
> 
> Maybe the fix is as simple as
>   success = !m_url.isEmpty() || !m_uriList.isEmpty();
> ?

It probably makes sense to address this in another patch (since getData("text") has the same problem as well then). Maybe we should just delete the empty cases from this patch before landing it and fix the undefined behavior in a separate patch and add test cases there?

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