Failure to download when using a download attribute with no value on an anchor.
<rdar://problem/30773140>
Created attachment 303127 [details] Patch
Comment on attachment 303127 [details] Patch What about a download attribute with a value that consists entirely of whitespace? Many properties like this one strip leading and trailing HTML spaces; does this one do that?
Comment on attachment 303127 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=303127&action=review > Source/WebKit2/ChangeLog:11 > + up passing an empty string as suggested filename to Safari which is ot handled properly. ot -> not
Comment on attachment 303127 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=303127&action=review > Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp:204 > + String suggestedFilename = MIMETypeRegistry::appendFileExtensionIfNecessary(m_suggestedFilename.isEmpty() ? filename : m_suggestedFilename, mimeType); Might also want to change the code so it never sets m_suggestedFilename to an empty string.
(In reply to comment #3) > Comment on attachment 303127 [details] > Patch > > What about a download attribute with a value that consists entirely of > whitespace? Many properties like this one strip leading and trailing HTML > spaces; does this one do that? We do not strip spaces: - Safari: creates a file with only whitespaces in the name - Firefox: creates a file with only whitespaces in the name - Chrome: creates a file with name "- -.jpeg" (i.e. sanitizes so first and last character cannot be whitespace)
Created attachment 303133 [details] Patch
(In reply to comment #5) > Comment on attachment 303127 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=303127&action=review > > > Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp:204 > > + String suggestedFilename = MIMETypeRegistry::appendFileExtensionIfNecessary(m_suggestedFilename.isEmpty() ? filename : m_suggestedFilename, mimeType); > > Might also want to change the code so it never sets m_suggestedFilename to > an empty string. Done in the latest iteration. Requesting review again because of this extra change.
Created attachment 303139 [details] Patch
Comment on attachment 303139 [details] Patch Clearing flags on attachment: 303139 Committed r213253: <http://trac.webkit.org/changeset/213253>
All reviewed patches have been landed. Closing bug.