[Webkit-unassigned] [Bug 90425] editing/pasteboard/dataTransfer-setData-getData.html hit ASSERT in KURL::KURL in Windows.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jul 7 01:17:29 PDT 2012


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





--- Comment #1 from huangxueqing <huangxueqing at baidu.com>  2012-07-07 01:17:28 PST ---
editing/pasteboard/dataTransfer-setData-getData.html failed not only hit ASSERT in KURL::KURL, but also other reason in implentation of dataTransfer.setData.

The reason of hit ASSERT in KURL::KURL was: A url did not inlude path, and scheme was file or http or https always be appended a slash in the end of url. In ClipboardWin::setData, we construct a url via KURL(ParsedURLString, data), if data was http://example.com, KURL parse this will hit ASSERT(url == m_string) since KURL append slash in the end of m_string, I suggest use KURL(KURL(), data) rather than KURL(ParsedURLString, data) in ClipboardWin::setData since we can not garantee web develop will call dataTransfer.setData with a canonicalized url such as "http://www.example.com/";
In Addtion, this case seems did not expect append slash to canonicalize url, but [1] did not specify this;
[1] also did not specify how to parse '\r\n' in data, in Windows, we ues extractURL() to truncate the string after '\n', which seems was inconsistent with author's expectation.

So, I prefer to use KURL(KURL(), data) instead of KURL(ParsedURLString, data) in ClipboardWin::setData() and modify the failure's reason in Skipped file to fix this bug.
Please feel free to comment it. Thanks.


1. http://www.w3.org/TR/2011/WD-html5-20110113/dnd.html#datatransfer

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