summaryrefslogtreecommitdiff
path: root/dom/base
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-03-11 06:43:10 +0000
committerMoonchild <moonchild@palemoon.org>2021-03-11 06:43:10 +0000
commitcc8a7e3f7b7d40967d2dd537b6343c87ba9138c7 (patch)
treebe5418a62494a956557ac0e769773ed2d558fdde /dom/base
parentdce8a3300b191eeebee6f15f3f6e0f5a12a177b1 (diff)
downloaduxp-cc8a7e3f7b7d40967d2dd537b6343c87ba9138c7.tar.gz
Issue #1053 - Remove MOZ_WIDGET_ANDROID and IDB_MOBILE
Diffstat (limited to 'dom/base')
-rw-r--r--dom/base/ScreenOrientation.cpp31
-rw-r--r--dom/base/nsGlobalWindow.h16
-rw-r--r--dom/base/nsPIDOMWindow.h5
3 files changed, 0 insertions, 52 deletions
diff --git a/dom/base/ScreenOrientation.cpp b/dom/base/ScreenOrientation.cpp
index ec9c4fa295..6d65e63a57 100644
--- a/dom/base/ScreenOrientation.cpp
+++ b/dom/base/ScreenOrientation.cpp
@@ -309,40 +309,9 @@ ScreenOrientation::LockInternal(ScreenOrientationInternal aOrientation, ErrorRes
return nullptr;
}
-#if !defined(MOZ_WIDGET_ANDROID)
// User agent does not support locking the screen orientation.
p->MaybeReject(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return p.forget();
-#else
- LockPermission perm = GetLockOrientationPermission(true);
- if (perm == LOCK_DENIED) {
- p->MaybeReject(NS_ERROR_DOM_SECURITY_ERR);
- return p.forget();
- }
-
- nsCOMPtr<nsIDocShellTreeItem> root;
- docShell->GetSameTypeRootTreeItem(getter_AddRefs(root));
- nsCOMPtr<nsIDocShell> rootShell(do_QueryInterface(root));
- if (!rootShell) {
- aRv.Throw(NS_ERROR_UNEXPECTED);
- return nullptr;
- }
-
- rootShell->SetOrientationLock(aOrientation);
- AbortOrientationPromises(rootShell);
-
- doc->SetOrientationPendingPromise(p);
-
- nsCOMPtr<nsIRunnable> lockOrientationTask =
- new LockOrientationTask(this, p, aOrientation, doc,
- perm == FULLSCREEN_LOCK_ALLOWED);
- aRv = NS_DispatchToMainThread(lockOrientationTask);
- if (NS_WARN_IF(aRv.Failed())) {
- return nullptr;
- }
-
- return p.forget();
-#endif
}
bool
diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h
index de9b9f4d4c..c9c661dd53 100644
--- a/dom/base/nsGlobalWindow.h
+++ b/dom/base/nsGlobalWindow.h
@@ -135,9 +135,6 @@ class TabGroup;
class Timeout;
class U2F;
class WakeLock;
-#if defined(MOZ_WIDGET_ANDROID)
-class WindowOrientationObserver;
-#endif
class Worklet;
namespace cache {
class CacheStorage;
@@ -622,11 +619,6 @@ public:
virtual void EnableDeviceSensor(uint32_t aType) override;
virtual void DisableDeviceSensor(uint32_t aType) override;
-#if defined(MOZ_WIDGET_ANDROID)
- virtual void EnableOrientationChangeListener() override;
- virtual void DisableOrientationChangeListener() override;
-#endif
-
virtual void EnableTimeChangeNotifications() override;
virtual void DisableTimeChangeNotifications() override;
@@ -884,10 +876,6 @@ public:
nsIDOMOfflineResourceList* GetApplicationCache(mozilla::ErrorResult& aError);
already_AddRefed<nsIDOMOfflineResourceList> GetApplicationCache() override;
-#if defined(MOZ_WIDGET_ANDROID)
- int16_t Orientation(mozilla::dom::CallerType aCallerType) const;
-#endif
-
mozilla::dom::Console* GetConsole(mozilla::ErrorResult& aRv);
// https://w3c.github.io/webappsec-secure-contexts/#dom-window-issecurecontext
@@ -1915,10 +1903,6 @@ protected:
nsTArray<uint32_t> mEnabledSensors;
-#if defined(MOZ_WIDGET_ANDROID)
- nsAutoPtr<mozilla::dom::WindowOrientationObserver> mOrientationChangeObserver;
-#endif
-
#ifdef MOZ_WEBSPEECH
// mSpeechSynthesis is only used on inner windows.
RefPtr<mozilla::dom::SpeechSynthesis> mSpeechSynthesis;
diff --git a/dom/base/nsPIDOMWindow.h b/dom/base/nsPIDOMWindow.h
index d8d14b512f..21eb4cff7f 100644
--- a/dom/base/nsPIDOMWindow.h
+++ b/dom/base/nsPIDOMWindow.h
@@ -438,11 +438,6 @@ public:
*/
virtual void DisableDeviceSensor(uint32_t aType) = 0;
-#if defined(MOZ_WIDGET_ANDROID)
- virtual void EnableOrientationChangeListener() = 0;
- virtual void DisableOrientationChangeListener() = 0;
-#endif
-
virtual void EnableTimeChangeNotifications() = 0;
virtual void DisableTimeChangeNotifications() = 0;