WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
90425
editing/pasteboard/dataTransfer-setData-getData.html hit ASSERT in KURL::KURL in Windows.
https://bugs.webkit.org/show_bug.cgi?id=90425
Summary
editing/pasteboard/dataTransfer-setData-getData.html hit ASSERT in KURL::KURL...
huangxueqing
Reported
2012-07-02 19:24:26 PDT
editing/pasteboard/dataTransfer-setData-getData.html hit ASSERT(url == m_string) in KURL::KURL(). It seems that KURL always append a slash in the end of url if url did not include neither fragment nor query, but ClipboardWin::setData() construct KURL with a url which did not include a slash in the end of it.
Attachments
Add attachment
proposed patch, testcase, etc.
huangxueqing
Comment 1
2012-07-07 01:17:28 PDT
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
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug