summaryrefslogtreecommitdiffstats
path: root/uriloader
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-05-14 10:50:01 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-05-14 10:50:01 +0200
commite9dd029f5d00590e1a53e63b0ab805110a10b54c (patch)
tree1126ca5dda925a62be3dc12c99c90e953d08afcf /uriloader
parent9d6a7ae25d7f5da855a8f8df884de483b4e2a538 (diff)
parent36b8fd734f590eb726ca2e50f8d1ff9cc968b8e1 (diff)
downloadUXP-e9dd029f5d00590e1a53e63b0ab805110a10b54c.tar
UXP-e9dd029f5d00590e1a53e63b0ab805110a10b54c.tar.gz
UXP-e9dd029f5d00590e1a53e63b0ab805110a10b54c.tar.lz
UXP-e9dd029f5d00590e1a53e63b0ab805110a10b54c.tar.xz
UXP-e9dd029f5d00590e1a53e63b0ab805110a10b54c.zip
Merge branch 'master' into Basilisk-release
Diffstat (limited to 'uriloader')
-rw-r--r--uriloader/base/nsURILoader.cpp12
-rw-r--r--uriloader/exthandler/gonk/nsOSHelperAppService.cpp56
-rw-r--r--uriloader/exthandler/gonk/nsOSHelperAppService.h39
-rw-r--r--uriloader/exthandler/moz.build2
-rw-r--r--uriloader/exthandler/nsExternalHelperAppService.cpp17
-rw-r--r--uriloader/exthandler/win/nsMIMEInfoWin.cpp3
6 files changed, 3 insertions, 126 deletions
diff --git a/uriloader/base/nsURILoader.cpp b/uriloader/base/nsURILoader.cpp
index 69475d68f..5a6b38028 100644
--- a/uriloader/base/nsURILoader.cpp
+++ b/uriloader/base/nsURILoader.cpp
@@ -385,16 +385,6 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIRequest *request, nsISupports *
bool allowContentDispositionToForceExternalHandling = true;
-#ifdef MOZ_B2G
-
- // On B2G, OMA content files should never be handled by an external handler
- // (even if the server specifies Content-Disposition: attachment) because the
- // data should never be stored on an unencrypted form.
- allowContentDispositionToForceExternalHandling =
- !mContentType.LowerCaseEqualsASCII("application/vnd.oma.drm.message");
-
-#endif
-
if (NS_SUCCEEDED(rv) && (disposition == nsIChannel::DISPOSITION_ATTACHMENT) &&
allowContentDispositionToForceExternalHandling) {
forceExternalHandling = true;
@@ -834,7 +824,7 @@ NS_IMETHODIMP nsURILoader::OpenURI(nsIChannel *channel,
// the preferred protocol handler.
// But for now, I'm going to let necko do the work for us....
- rv = channel->AsyncOpen(loader, nullptr);
+ rv = channel->AsyncOpen2(loader);
// no content from this load - that's OK.
if (rv == NS_ERROR_NO_CONTENT) {
diff --git a/uriloader/exthandler/gonk/nsOSHelperAppService.cpp b/uriloader/exthandler/gonk/nsOSHelperAppService.cpp
deleted file mode 100644
index d1342ec18..000000000
--- a/uriloader/exthandler/gonk/nsOSHelperAppService.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: c++; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- */
-/* Copyright 2012 Mozilla Foundation and Mozilla contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "nsOSHelperAppService.h"
-#include "nsMIMEInfoImpl.h"
-
-class nsGonkMIMEInfo : public nsMIMEInfoImpl {
-public:
- nsGonkMIMEInfo(const nsACString& aMIMEType) : nsMIMEInfoImpl(aMIMEType) { }
-
-protected:
- virtual nsresult LoadUriInternal(nsIURI *aURI) {
- return NS_ERROR_NOT_IMPLEMENTED;
- }
-};
-
-nsOSHelperAppService::nsOSHelperAppService() : nsExternalHelperAppService()
-{
-}
-
-nsOSHelperAppService::~nsOSHelperAppService()
-{
-}
-
-already_AddRefed<nsIMIMEInfo>
-nsOSHelperAppService::GetMIMEInfoFromOS(const nsACString& aMIMEType,
- const nsACString& aFileExt,
- bool* aFound)
-{
- *aFound = false;
- // Even if we return false for aFound, we need to return a working
- // nsIMIMEInfo implementation that will be used by the caller.
- RefPtr<nsGonkMIMEInfo> mimeInfo = new nsGonkMIMEInfo(aMIMEType);
- return mimeInfo.forget();
-}
-
-nsresult
-nsOSHelperAppService::OSProtocolHandlerExists(const char* aScheme,
- bool* aExists)
-{
- *aExists = false;
- return NS_OK;
-}
diff --git a/uriloader/exthandler/gonk/nsOSHelperAppService.h b/uriloader/exthandler/gonk/nsOSHelperAppService.h
deleted file mode 100644
index 99a280bfc..000000000
--- a/uriloader/exthandler/gonk/nsOSHelperAppService.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode: c++; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- */
-/* Copyright 2012 Mozilla Foundation and Mozilla contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef nsOSHelperAppService_h
-#define nsOSHelperAppService_h
-
-#include "nsCExternalHandlerService.h"
-#include "nsExternalHelperAppService.h"
-
-class nsOSHelperAppService : public nsExternalHelperAppService
-{
-public:
- nsOSHelperAppService();
- virtual ~nsOSHelperAppService();
-
- virtual already_AddRefed<nsIMIMEInfo>
- GetMIMEInfoFromOS(const nsACString& aMIMEType,
- const nsACString& aFileExt,
- bool* aFound);
-
- virtual MOZ_MUST_USE nsresult
- OSProtocolHandlerExists(const char* aScheme,
- bool* aExists);
-};
-
-#endif /* nsOSHelperAppService_h */
diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
index 6a3ca08af..714b275f1 100644
--- a/uriloader/exthandler/moz.build
+++ b/uriloader/exthandler/moz.build
@@ -24,7 +24,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
LOCAL_INCLUDES += ['win']
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
osdir = 'mac'
-elif CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gonk', 'uikit'):
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'uikit'):
osdir = CONFIG['MOZ_WIDGET_TOOLKIT']
else:
osdir = 'unix'
diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp
index 5afaae319..455ac457a 100644
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -552,16 +552,6 @@ static const nsExtraMimeTypeEntry extraMimeEntries[] =
{ APPLICATION_OGG, "ogg", "Ogg Video"},
{ AUDIO_OGG, "oga", "Ogg Audio" },
{ AUDIO_OGG, "opus", "Opus Audio" },
-#ifdef MOZ_WIDGET_GONK
- { AUDIO_AMR, "amr", "Adaptive Multi-Rate Audio" },
- { AUDIO_FLAC, "flac", "FLAC Audio" },
- { VIDEO_AVI, "avi", "Audio Video Interleave" },
- { VIDEO_AVI, "divx", "Audio Video Interleave" },
- { VIDEO_MPEG_TS, "ts", "MPEG Transport Stream" },
- { VIDEO_MPEG_TS, "m2ts", "MPEG-2 Transport Stream" },
- { VIDEO_MATROSKA, "mkv", "MATROSKA VIDEO" },
- { AUDIO_MATROSKA, "mka", "MATROSKA AUDIO" },
-#endif
{ VIDEO_WEBM, "webm", "Web Media Video" },
{ AUDIO_WEBM, "webm", "Web Media Audio" },
{ AUDIO_MP3, "mp3", "MPEG Audio" },
@@ -571,13 +561,6 @@ static const nsExtraMimeTypeEntry extraMimeEntries[] =
{ AUDIO_WAV, "wav", "Waveform Audio" },
{ VIDEO_3GPP, "3gpp,3gp", "3GPP Video" },
{ VIDEO_3GPP2,"3g2", "3GPP2 Video" },
-#ifdef MOZ_WIDGET_GONK
- // The AUDIO_3GPP has to come after the VIDEO_3GPP entry because the Gallery
- // app on Firefox OS depends on the "3gp" extension mapping to the
- // "video/3gpp" MIME type.
- { AUDIO_3GPP, "3gpp,3gp", "3GPP Audio" },
- { AUDIO_3GPP2, "3g2", "3GPP2 Audio" },
-#endif
{ AUDIO_MIDI, "mid", "Standard MIDI Audio" }
};
diff --git a/uriloader/exthandler/win/nsMIMEInfoWin.cpp b/uriloader/exthandler/win/nsMIMEInfoWin.cpp
index 2c7171c87..6ead8f4c3 100644
--- a/uriloader/exthandler/win/nsMIMEInfoWin.cpp
+++ b/uriloader/exthandler/win/nsMIMEInfoWin.cpp
@@ -243,8 +243,7 @@ nsMIMEInfoWin::LoadUriInternal(nsIURI * aURL)
SHELLEXECUTEINFOW sinfo;
memset(&sinfo, 0, sizeof(sinfo));
sinfo.cbSize = sizeof(sinfo);
- sinfo.fMask = SEE_MASK_FLAG_DDEWAIT |
- SEE_MASK_FLAG_NO_UI;
+ sinfo.fMask = SEE_MASK_FLAG_DDEWAIT;
sinfo.hwnd = nullptr;
sinfo.lpVerb = (LPWSTR)&cmdVerb;
sinfo.nShow = SW_SHOWNORMAL;