mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1152512 - Use the latest JavaScript version when parsing AutoConfig files. r=mrbkap (1f68c0fc8) - Bug 1138059 - Tweak XPCOMUtils.defineLazyGetter behavior to avoid weird behavior in weird cases. r=mak. (9adbc6d75) - Bug 1171013 - Extend defineLazyModuleGetter to support user-defined proxy objects. r=mfinkle (aa469e579) - Bug 1171904 - Remove --enable-js-crash-diagnostics and just use the NIGHTLY defines; r=sfink (b47e0d9ca) - Pointer style (01a808b27) - Bug 1176568. Fix the proto cycle checking to work correctly for inner/outer globals. r=waldo (78cd2558d) - Bug 1144452. Print the global in JSObject::dump. r=waldo (1c00520a1) - Bug 1191482 - Improve WeakCache sweep code and add assertions r=terence (5ca525c46) - Bug 1188836 - Fix compacting GC zone selection by passing total arenacount to ShouldRelocateZone() r=terrence (11c95eb99) - Bug 1188936 - Release/protect relocated arenas earlier r=terrence (1700c2a6e) - pointer style (6e3e502d7) - do not start private by default (86b11721d) - Bug 1153707 jsval is wrongly passed to XPT Javascript method on ppc/32 and SPARC/32 r=bobbyholley (a02e2f6d9) - Bug 1170859- MIPS64: Fix copy u32 type arg to argument register. r=froydnj (c489e99b4) - Bug 1155154 - Part 1 - Fix the check for duplicate filters when one filter is a subtring of another one. r=smaug (e442c3c0c) - Bug 1155154 - Part 2 - Rename extension filter. r=smaug (8f9b4d21e) - Bug 1155154 - Part 3 - Ignore file extension filters with characters that can be interpreted by the file picker. r=smaug (cf972fd8f) - Bug 1186603 - Add a "Contains" method for string classes and use it in HTMLInputElement. r=nfroyd (c5d5f51e8)
This commit is contained in:
@@ -7182,8 +7182,12 @@ HTMLInputElement::SetFilePickerFiltersFromAccept(nsIFilePicker* filePicker)
|
||||
filterBundle->GetStringFromName(MOZ_UTF16("videoFilter"),
|
||||
getter_Copies(extensionListStr));
|
||||
} else if (token.First() == '.') {
|
||||
if (token.Contains(';') || token.Contains('*')) {
|
||||
// Ignore this filter as it contains reserved characters
|
||||
continue;
|
||||
}
|
||||
extensionListStr = NS_LITERAL_STRING("*") + token;
|
||||
filterName = extensionListStr + NS_LITERAL_STRING("; ");
|
||||
filterName = extensionListStr;
|
||||
atLeastOneFileExtensionFilter = true;
|
||||
} else {
|
||||
//... if no image/audio/video filter is found, check mime types filters
|
||||
@@ -7261,7 +7265,14 @@ HTMLInputElement::SetFilePickerFiltersFromAccept(nsIFilePicker* filePicker)
|
||||
if (i == j) {
|
||||
continue;
|
||||
}
|
||||
if (FindInReadable(filterToCheck.mFilter, filtersCopy[j].mFilter)) {
|
||||
// Check if this filter's extension list is a substring of the other one.
|
||||
// e.g. if filters are "*.jpeg" and "*.jpeg; *.jpg" the first one should
|
||||
// be removed.
|
||||
// Add an extra "; " to be sure the check will work and avoid cases like
|
||||
// "*.xls" being a subtring of "*.xslx" while those are two differents
|
||||
// filters and none should be removed.
|
||||
if (FindInReadable(filterToCheck.mFilter + NS_LITERAL_STRING(";"),
|
||||
filtersCopy[j].mFilter + NS_LITERAL_STRING(";"))) {
|
||||
// We already have a similar, less restrictive filter (i.e.
|
||||
// filterToCheck extensionList is just a subset of another filter
|
||||
// extension list): remove this one
|
||||
|
||||
Reference in New Issue
Block a user