Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Issue 10821032: Merge 123495 - Files from drag and file <input> should use getMIMETypeForExtension to determine con… (Closed)

Created:
8 years, 5 months ago by karen
Modified:
8 years, 5 months ago
Reviewers:
dcheng
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Visibility:
Public.

Description

Merge 123495 - Files from drag and file <input> should use getMIMETypeForExtension to determine content type. https://bugs.webkit.org/show_bug.cgi?id=91702 Reviewed by Jian Li. Awhile back, we changed File to only use getWellKnownMIMETypeForExtension to prevent web pages from being able to detect what applications a user has installed indirectly through the MIME types. However, some sites like YouTube's drag and drop uploader use MIME types that aren't in WebKit's internal list, so we relax the restriction for Files that originate from an user action. * fileapi/File.cpp: (WebCore::getContentTypeFromFileName): (WebCore::createBlobDataForFile): (WebCore::createBlobDataForFileWithName): (WebCore::createBlobDataForFileWithMetadata): (WebCore::File::createWithRelativePath): (WebCore::File::File): * fileapi/File.h: (File): (WebCore::File::create): (WebCore::File::createWithName): * html/FileInputType.cpp: (WebCore::FileInputType::createFileList): * platform/chromium/ChromiumDataObject.cpp: (WebCore::ChromiumDataObject::addFilename): * platform/gtk/ClipboardGtk.cpp: (WebCore::ClipboardGtk::files): * platform/mac/ClipboardMac.mm: (WebCore::ClipboardMac::files): * platform/qt/ClipboardQt.cpp: (WebCore::ClipboardQt::files): * platform/win/ClipboardWin.cpp: (WebCore::ClipboardWin::files): TBR=dcheng@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=123677

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -26 lines) Patch
M Source/WebCore/fileapi/File.h View 3 chunks +14 lines, -7 lines 0 comments Download
M Source/WebCore/fileapi/File.cpp View 4 chunks +19 lines, -13 lines 0 comments Download
M Source/WebCore/html/FileInputType.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/platform/chromium/ChromiumDataObject.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/platform/gtk/ClipboardGtk.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/platform/mac/ClipboardMac.mm View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/platform/qt/ClipboardQt.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/platform/win/ClipboardWin.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 1 (0 generated)
karen
8 years, 5 months ago (2012-07-25 23:39:03 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698