diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-11-03 09:06:25 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-11-03 09:06:25 +0100 |
commit | 1626b5d7041ea9c3db92200f91542da46e49dde6 (patch) | |
tree | e99c393052ef818645027da57774672990e29514 /modules | |
parent | 314fb761d144b160d3aeb72840c89e31c4f21a4a (diff) | |
parent | 1d55939c7ca0e80555a24b240ff68d5bdbb48b4a (diff) | |
download | UXP-1626b5d7041ea9c3db92200f91542da46e49dde6.tar UXP-1626b5d7041ea9c3db92200f91542da46e49dde6.tar.gz UXP-1626b5d7041ea9c3db92200f91542da46e49dde6.tar.lz UXP-1626b5d7041ea9c3db92200f91542da46e49dde6.tar.xz UXP-1626b5d7041ea9c3db92200f91542da46e49dde6.zip |
Merge branch 'master' into Basilisk-releasev2018.11.04
Diffstat (limited to 'modules')
-rw-r--r-- | modules/libjar/nsJARChannel.cpp | 19 | ||||
-rw-r--r-- | modules/libpref/init/all.js | 19 |
2 files changed, 33 insertions, 5 deletions
diff --git a/modules/libjar/nsJARChannel.cpp b/modules/libjar/nsJARChannel.cpp index ee60602da..2f721fa3f 100644 --- a/modules/libjar/nsJARChannel.cpp +++ b/modules/libjar/nsJARChannel.cpp @@ -995,6 +995,25 @@ nsJARChannel::OnStartRequest(nsIRequest *req, nsISupports *ctx) mRequest = req; nsresult rv = mListener->OnStartRequest(this, mListenerContext); mRequest = nullptr; + NS_ENSURE_SUCCESS(rv, rv); + + // Restrict loadable content types. + nsAutoCString contentType; + GetContentType(contentType); + auto contentPolicyType = mLoadInfo->GetExternalContentPolicyType(); + if (contentType.Equals(APPLICATION_HTTP_INDEX_FORMAT) && + contentPolicyType != nsIContentPolicy::TYPE_DOCUMENT && + contentPolicyType != nsIContentPolicy::TYPE_FETCH) { + return NS_ERROR_CORRUPTED_CONTENT; + } + if (contentPolicyType == nsIContentPolicy::TYPE_STYLESHEET && + !contentType.EqualsLiteral(TEXT_CSS)) { + return NS_ERROR_CORRUPTED_CONTENT; + } + if (contentPolicyType == nsIContentPolicy::TYPE_SCRIPT && + !nsContentUtils::IsJavascriptMIMEType(NS_ConvertUTF8toUTF16(contentType))) { + return NS_ERROR_CORRUPTED_CONTENT; + } return rv; } diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 32c59e737..957affa79 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -117,6 +117,9 @@ pref("browser.cache.compression_level", 0); // Don't show "Open with" option on download dialog if true. pref("browser.download.forbid_open_with", false); +// Save download locations as a content preference +pref("browser.download.lastDir.savePerSite", true); + #ifdef XP_WIN // Save internet zone information on downloaded files: // 0 => Never @@ -128,8 +131,6 @@ pref("browser.download.saveZoneInformation", 2); // Whether or not testing features are enabled. pref("dom.quotaManager.testing", false); -// Whether or not indexedDB is enabled. -pref("dom.indexedDB.enabled", true); // Whether or not indexedDB experimental features are enabled. pref("dom.indexedDB.experimental", false); // Enable indexedDB logging. @@ -584,6 +585,10 @@ pref("media.mediasource.webm.enabled", true); #endif pref("media.mediasource.webm.audio.enabled", true); +#ifdef MOZ_AV1 +pref("media.av1.enabled", false); +#endif + // Use new MediaFormatReader architecture for plain ogg. pref("media.flac.enabled", true); pref("media.ogg.flac.enabled", true); @@ -2214,9 +2219,10 @@ pref("ui.key.contentAccess", 5); pref("ui.key.menuAccessKeyFocuses", false); // overridden below pref("ui.key.saveLink.shift", true); // true = shift, false = meta -// When true, overrides OS convention to lock content scrolling +// When true, overrides Windows OS convention to lock content scrolling // if a contextual menu is open. -pref("ui.menu.allow_content_scroll", false); +// XXX: Only effective on Windows for now! +pref("ui.menu.allow_content_scroll", true); // Disable page loading activity cursor by default. pref("ui.use_activity_cursor", false); @@ -2432,7 +2438,7 @@ pref("layout.word_select.stop_at_punctuation", true); pref("layout.selection.caret_style", 0); // pref to report CSS errors to the error console -pref("layout.css.report_errors", true); +pref("layout.css.report_errors", false); // Should the :visited selector ever match (otherwise :link matches instead)? pref("layout.css.visited_links_enabled", true); @@ -5400,6 +5406,9 @@ pref("plugins.navigator_hide_disabled_flash", false); // Disable browser frames by default pref("dom.mozBrowserFramesEnabled", false); +// Thick caret when behind CJK characters +pref("layout.cjkthickcaret", true); + // Is support for 'color-adjust' CSS property enabled? pref("layout.css.color-adjust.enabled", true); |