Summary: | [EFL] Return an empty string instead of 'application/octet-stream' in getMIMETypeForExtension() | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Gyuyoung Kim <gyuyoung.kim> | ||||||
Component: | WebKit EFL | Assignee: | Gyuyoung Kim <gyuyoung.kim> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | antognolli+webkit, commit-queue, kenneth, leandro, lucas.de.marchi, tonikitoo | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | Linux | ||||||||
Attachments: |
|
Description
Gyuyoung Kim
2010-12-22 02:47:03 PST
Created attachment 77199 [details]
Patch
Is it what other ports do? (On the airport now, and can not check myself at the moment) (In reply to comment #2) > Is it what other ports do? > > (On the airport now, and can not check myself at the moment) Yes, other port also tries to find mime type for the extension type. But, if it cannot find mime type, it just returns empty string. Then, if the other port's getMIMETypeForExtension() returns empty string, the getMediaMIMETypeForExtension() of MIMETypeRegistry.cpp finds a proper mime type in mediaMIMETypeMap() for the extension. (The mediaMIMETypeMap() is defined in MIMETypeRegistry.cpp). In MIMETypeRegistryGtk.cpp String MIMETypeRegistry::getMIMETypeForExtension(const String &ext) { String s = ext.lower(); const ExtensionMap *e = extensionMap; while (e->extension) { if (s == e->extension) return e->mimeType; ++e; } return String(); } In MIMETypeRegistryQt.cpp String MIMETypeRegistry::getMIMETypeForExtension(const String &ext) { String s = ext.lower(); const ExtensionMap *e = extensionMap; while (e->extension) { if (s == e->extension) return e->mimeType; ++e; } return String(); } In MIMETypeRegistryWinCE.cpp String MIMETypeRegistry::getMIMETypeForExtension(const String &ext) { if (ext.isEmpty()) return String(); initMIMETypeEntensionMap(); String result = mimetypeMap.get(ext.lower()); if (result.isEmpty()) { result = mimeTypeForExtension(ext); if (!result.isEmpty()) mimetypeMap.add(ext, result); } return result.isEmpty() ? "unknown/unknown" : result; } Comment on attachment 77199 [details]
Patch
Tests should be layout tests. Does EFL run the layout tests yet?
(In reply to comment #4) > (From update of attachment 77199 [details]) > Tests should be layout tests. Does EFL run the layout tests yet? Yes, right. WebKit EFL doesn't have layout test yet. But, we are preparing to contribute DRT for WebKit EFL. Should I remove the test sites in ChangeLog ? Created attachment 77375 [details]
Patch
Remove test sites in ChangeLog
Comment on attachment 77375 [details] Patch Clearing flags on attachment: 77375 Committed r74625: <http://trac.webkit.org/changeset/74625> All reviewed patches have been landed. Closing bug. |