From 51091fd760ac40e911211836f6376426c3ac602c Mon Sep 17 00:00:00 2001 From: Basilisk-Dev Date: Fri, 1 Mar 2024 23:44:01 -0500 Subject: [PATCH 1/2] [Basilisk] Add error handling to MIME type processing in prefs. Port of MoonchildProductions/Pale-Moon#1959 --- .../preferences/in-content/applications.js | 23 +++++++++++++++---- .../components/preferences/in-content/jar.mn | 2 +- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/application/basilisk/components/preferences/in-content/applications.js b/application/basilisk/components/preferences/in-content/applications.js index 6f29896576..07072195ab 100644 --- a/application/basilisk/components/preferences/in-content/applications.js +++ b/application/basilisk/components/preferences/in-content/applications.js @@ -1076,11 +1076,26 @@ var gApplicationsPane = { if (mimeType.type in this._handledTypes) { handlerInfoWrapper = this._handledTypes[mimeType.type]; } else { - let wrappedHandlerInfo = + if (mimeType.type == '') { + // If an incorrect empty MIME type is present, don't break. + continue; + } + try { + let wrappedHandlerInfo = this._mimeSvc.getFromTypeAndExtension(mimeType.type, null); - handlerInfoWrapper = new HandlerInfoWrapper(mimeType.type, wrappedHandlerInfo); - handlerInfoWrapper.handledOnlyByPlugin = true; - this._handledTypes[mimeType.type] = handlerInfoWrapper; + handlerInfoWrapper = new HandlerInfoWrapper(mimeType.type, wrappedHandlerInfo); + handlerInfoWrapper.handledOnlyByPlugin = true; + this._handledTypes[mimeType.type] = handlerInfoWrapper; + #ifdef DEBUG + console.log("Enumerate MIME type: " + mimeType.type); + #endif + } catch(e) { + #ifdef DEBUG + console.log("Error fetching MIME type info for " + mimeType.type); + console.log(e); + #endif + continue; + } } handlerInfoWrapper.pluginName = mimeType.enabledPlugin.name; } diff --git a/application/basilisk/components/preferences/in-content/jar.mn b/application/basilisk/components/preferences/in-content/jar.mn index 3596e9fb7c..50347d9981 100644 --- a/application/basilisk/components/preferences/in-content/jar.mn +++ b/application/basilisk/components/preferences/in-content/jar.mn @@ -10,7 +10,7 @@ browser.jar: content/browser/preferences/in-content/main.js content/browser/preferences/in-content/privacy.js content/browser/preferences/in-content/advanced.js - content/browser/preferences/in-content/applications.js +* content/browser/preferences/in-content/applications.js * content/browser/preferences/in-content/content.js #ifdef MOZ_SERVICES_SYNC content/browser/preferences/in-content/sync.js From 3fface9c03f3b97733c0f56d71dd1e93a5631554 Mon Sep 17 00:00:00 2001 From: Basilisk-Dev Date: Mon, 6 May 2024 16:30:09 -0400 Subject: [PATCH 2/2] [Basilisk] MoonchildProductions/UXP#2510 - Unprefix -moz-fit-content CSS keyword in Basilisk frontend --- application/basilisk/base/content/browser.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/basilisk/base/content/browser.css b/application/basilisk/base/content/browser.css index c1af9d1739..6de8a8cd0c 100644 --- a/application/basilisk/base/content/browser.css +++ b/application/basilisk/base/content/browser.css @@ -20,7 +20,7 @@ } #main-window[customize-entered] { - min-width: -moz-fit-content; + min-width: fit-content; } searchbar {