mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-20 22:27:31 +09:00
[PALEMOON] Bug 863773 - Changes the way plugin handlers are loaded at the preferences applications pane. Uses enabledPlugin attribute from each navigator.mimeTypes to find the actual plugin used to handle the mime type
This commit is contained in:
parent
93973ff406
commit
55b65909aa
1 changed files with 12 additions and 21 deletions
|
|
@ -1069,29 +1069,20 @@ var gApplicationsPane = {
|
||||||
_loadPluginHandlers: function() {
|
_loadPluginHandlers: function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
|
let mimeTypes = navigator.mimeTypes;
|
||||||
let pluginTags = pluginHost.getPluginTags();
|
|
||||||
|
|
||||||
for (let i = 0; i < pluginTags.length; ++i) {
|
for (let mimeType of mimeTypes) {
|
||||||
let pluginTag = pluginTags[i];
|
let handlerInfoWrapper;
|
||||||
|
if (mimeType.type in this._handledTypes) {
|
||||||
let mimeTypes = pluginTag.getMimeTypes();
|
handlerInfoWrapper = this._handledTypes[mimeType.type];
|
||||||
for (let j = 0; j < mimeTypes.length; ++j) {
|
} else {
|
||||||
let type = mimeTypes[j];
|
let wrappedHandlerInfo =
|
||||||
|
this._mimeSvc.getFromTypeAndExtension(mimeType.type, null);
|
||||||
let handlerInfoWrapper;
|
handlerInfoWrapper = new HandlerInfoWrapper(mimeType.type, wrappedHandlerInfo);
|
||||||
if (type in this._handledTypes)
|
handlerInfoWrapper.handledOnlyByPlugin = true;
|
||||||
handlerInfoWrapper = this._handledTypes[type];
|
this._handledTypes[mimeType.type] = handlerInfoWrapper;
|
||||||
else {
|
|
||||||
let wrappedHandlerInfo =
|
|
||||||
this._mimeSvc.getFromTypeAndExtension(type, null);
|
|
||||||
handlerInfoWrapper = new HandlerInfoWrapper(type, wrappedHandlerInfo);
|
|
||||||
handlerInfoWrapper.handledOnlyByPlugin = true;
|
|
||||||
this._handledTypes[type] = handlerInfoWrapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
handlerInfoWrapper.pluginName = pluginTag.name;
|
|
||||||
}
|
}
|
||||||
|
handlerInfoWrapper.pluginName = mimeType.enabledPlugin.name;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue