mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 899519 - Use "description" instead of "mime type name" for filter name for accept attribute. r=mounir,bz
This commit is contained in:
parent
8c1d091b8e
commit
c74a371a66
@ -6025,10 +6025,14 @@ HTMLInputElement::SetFilePickerFiltersFromAccept(nsIFilePicker* filePicker)
|
||||
continue;
|
||||
}
|
||||
|
||||
// Get mime type name
|
||||
nsCString mimeTypeName;
|
||||
mimeInfo->GetType(mimeTypeName);
|
||||
CopyUTF8toUTF16(mimeTypeName, filterName);
|
||||
// Get a name for the filter: first try the description, then the mime type
|
||||
// name if there is no description
|
||||
mimeInfo->GetDescription(filterName);
|
||||
if (filterName.IsEmpty()) {
|
||||
nsCString mimeTypeName;
|
||||
mimeInfo->GetType(mimeTypeName);
|
||||
CopyUTF8toUTF16(mimeTypeName, filterName);
|
||||
}
|
||||
|
||||
// Get extension list
|
||||
nsCOMPtr<nsIUTF8StringEnumerator> extensions;
|
||||
|
Loading…
Reference in New Issue
Block a user