summaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
Diffstat (limited to 'dom')
-rw-r--r--dom/base/nsFrameMessageManager.cpp6
-rw-r--r--dom/base/nsGlobalWindow.cpp48
-rw-r--r--dom/canvas/WebGLContextGL.cpp11
-rw-r--r--dom/canvas/WebGLFramebuffer.cpp7
-rw-r--r--dom/canvas/WebGLFramebuffer.h11
-rw-r--r--dom/ipc/ContentParent.cpp51
-rw-r--r--dom/media/GraphDriver.cpp9
-rw-r--r--dom/power/PowerManagerService.cpp16
-rw-r--r--dom/workers/WorkerPrivate.cpp9
-rw-r--r--dom/workers/WorkerScope.cpp7
-rw-r--r--dom/worklet/WorkletGlobalScope.cpp4
11 files changed, 5 insertions, 174 deletions
diff --git a/dom/base/nsFrameMessageManager.cpp b/dom/base/nsFrameMessageManager.cpp
index 4ceada5e15..88ec9c911f 100644
--- a/dom/base/nsFrameMessageManager.cpp
+++ b/dom/base/nsFrameMessageManager.cpp
@@ -49,9 +49,6 @@
#include <algorithm>
#include "chrome/common/ipc_channel.h" // for IPC::Channel::kMaximumMessageSize
-#ifdef ANDROID
-#include <android/log.h>
-#endif
#ifdef XP_WIN
#include <windows.h>
# if defined(SendMessage)
@@ -896,9 +893,6 @@ nsFrameMessageManager::GetChildAt(uint32_t aIndex,
NS_IMETHODIMP
nsFrameMessageManager::Dump(const nsAString& aStr)
{
-#ifdef ANDROID
- __android_log_print(ANDROID_LOG_INFO, "Gecko", "%s", NS_ConvertUTF16toUTF8(aStr).get());
-#endif
#ifdef XP_WIN
if (IsDebuggerPresent()) {
OutputDebugStringW(PromiseFlatString(aStr).get());
diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp
index 38a58f947a..a09847820b 100644
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -24,9 +24,6 @@
#include "mozilla/dom/Timeout.h"
#include "mozilla/dom/TimeoutHandler.h"
#include "mozilla/IntegerPrintfMacros.h"
-#if defined(MOZ_WIDGET_ANDROID)
-#include "mozilla/dom/WindowOrientationObserver.h"
-#endif
#include "nsDOMOfflineResourceList.h"
#include "nsError.h"
#include "nsIIdleService.h"
@@ -251,10 +248,6 @@ class nsIScriptTimeoutHandler;
#endif // check
#include "AccessCheck.h"
-#ifdef ANDROID
-#include <android/log.h>
-#endif
-
#ifdef XP_WIN
#include <process.h>
#define getpid _getpid
@@ -1917,10 +1910,6 @@ nsGlobalWindow::CleanUp()
mSpeechSynthesis = nullptr;
#endif
-#if defined(MOZ_WIDGET_ANDROID)
- mOrientationChangeObserver = nullptr;
-#endif
-
ClearControllers();
mOpener = nullptr; // Forces Release
@@ -2041,10 +2030,6 @@ nsGlobalWindow::FreeInnerObjects(bool aForDocumentOpen)
mScreen = nullptr;
}
-#if defined(MOZ_WIDGET_ANDROID)
- mOrientationChangeObserver = nullptr;
-#endif
-
if (mDoc) {
// Remember the document's principal and URI.
mDocumentPrincipal = mDoc->NodePrincipal();
@@ -7133,9 +7118,6 @@ nsGlobalWindow::Dump(const nsAString& aStr)
#ifdef XP_WIN
PrintToDebugger(cstr);
#endif
-#ifdef ANDROID
- __android_log_write(ANDROID_LOG_INFO, "GeckoDump", cstr);
-#endif
FILE *fp = gDumpFile ? gDumpFile : stdout;
fputs(cstr, fp);
fflush(fp);
@@ -13764,27 +13746,6 @@ nsGlobalWindow::DisableDeviceSensor(uint32_t aType)
}
}
-#if defined(MOZ_WIDGET_ANDROID)
-void
-nsGlobalWindow::EnableOrientationChangeListener()
-{
- MOZ_ASSERT(IsInnerWindow());
- if (!nsContentUtils::ShouldResistFingerprinting(mDocShell) &&
- !mOrientationChangeObserver) {
- mOrientationChangeObserver =
- new WindowOrientationObserver(this);
- }
-}
-
-void
-nsGlobalWindow::DisableOrientationChangeListener()
-{
- MOZ_ASSERT(IsInnerWindow());
-
- mOrientationChangeObserver = nullptr;
-}
-#endif
-
void
nsGlobalWindow::SetHasGamepadEventListener(bool aHasGamepad/* = true*/)
{
@@ -14471,15 +14432,6 @@ nsGlobalWindow::InitWasOffline()
mWasOffline = NS_IsOffline();
}
-#if defined(MOZ_WIDGET_ANDROID)
-int16_t
-nsGlobalWindow::Orientation(CallerType aCallerType) const
-{
- return nsContentUtils::ResistFingerprinting(aCallerType) ?
- 0 : WindowOrientationObserver::OrientationAngle();
-}
-#endif
-
Console*
nsGlobalWindow::GetConsole(ErrorResult& aRv)
{
diff --git a/dom/canvas/WebGLContextGL.cpp b/dom/canvas/WebGLContextGL.cpp
index e58fcd0d8f..d01a0d44e3 100644
--- a/dom/canvas/WebGLContextGL.cpp
+++ b/dom/canvas/WebGLContextGL.cpp
@@ -145,9 +145,6 @@ WebGLContext::BindFramebuffer(GLenum target, WebGLFramebuffer* wfb)
} else {
GLuint framebuffername = wfb->mGLName;
gl->fBindFramebuffer(target, framebuffername);
-#ifdef ANDROID
- wfb->mIsFB = true;
-#endif
}
switch (target) {
@@ -982,14 +979,6 @@ WebGLContext::IsFramebuffer(const WebGLFramebuffer* fb)
if (!ValidateIsObject("isFramebuffer", fb))
return false;
-#ifdef ANDROID
- if (gl->WorkAroundDriverBugs() &&
- gl->Renderer() == GLRenderer::AndroidEmulator)
- {
- return fb->mIsFB;
- }
-#endif
-
MakeContextCurrent();
return gl->fIsFramebuffer(fb->mGLName);
}
diff --git a/dom/canvas/WebGLFramebuffer.cpp b/dom/canvas/WebGLFramebuffer.cpp
index 0abaf3dd79..7a1d4dbd9e 100644
--- a/dom/canvas/WebGLFramebuffer.cpp
+++ b/dom/canvas/WebGLFramebuffer.cpp
@@ -621,9 +621,6 @@ WebGLFBAttachPoint::GetParameter(const char* funcName, WebGLContext* webgl, JSCo
WebGLFramebuffer::WebGLFramebuffer(WebGLContext* webgl, GLuint fbo)
: WebGLRefCountedObject(webgl)
, mGLName(fbo)
-#ifdef ANDROID
- , mIsFB(false)
-#endif
, mDepthAttachment(this, LOCAL_GL_DEPTH_ATTACHMENT)
, mStencilAttachment(this, LOCAL_GL_STENCIL_ATTACHMENT)
, mDepthStencilAttachment(this, LOCAL_GL_DEPTH_STENCIL_ATTACHMENT)
@@ -657,10 +654,6 @@ WebGLFramebuffer::Delete()
mContext->gl->fDeleteFramebuffers(1, &mGLName);
LinkedListElement<WebGLFramebuffer>::removeFrom(mContext->mFramebuffers);
-
-#ifdef ANDROID
- mIsFB = false;
-#endif
}
////
diff --git a/dom/canvas/WebGLFramebuffer.h b/dom/canvas/WebGLFramebuffer.h
index 53e01dfe76..133bf3d090 100644
--- a/dom/canvas/WebGLFramebuffer.h
+++ b/dom/canvas/WebGLFramebuffer.h
@@ -155,17 +155,6 @@ public:
const GLuint mGLName;
protected:
-#ifdef ANDROID
- // Bug 1140459: Some drivers (including our test slaves!) don't
- // give reasonable answers for IsRenderbuffer, maybe others.
- // This shows up on Android 2.3 emulator.
- //
- // So we track the `is a Framebuffer` state ourselves.
- bool mIsFB;
-#endif
-
- ////
-
WebGLFBAttachPoint mDepthAttachment;
WebGLFBAttachPoint mStencilAttachment;
WebGLFBAttachPoint mDepthStencilAttachment;
diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp
index 089bde8bb2..410d93de27 100644
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -10,7 +10,7 @@
#include "ContentParent.h"
#include "TabParent.h"
-#if defined(ANDROID) || defined(LINUX)
+#if defined(LINUX)
# include <sys/time.h>
# include <sys/resource.h>
#endif
@@ -177,7 +177,7 @@
#include "signaling/src/peerconnection/WebrtcGlobalParent.h"
#endif
-#if defined(ANDROID) || defined(LINUX)
+#if defined(LINUX)
#include "nsSystemInfo.h"
#endif
@@ -185,18 +185,10 @@
#include "mozilla/Hal.h"
#endif
-#ifdef ANDROID
-# include "gfxAndroidPlatform.h"
-#endif
-
#ifdef MOZ_PERMISSIONS
# include "nsPermissionManager.h"
#endif
-#ifdef MOZ_WIDGET_ANDROID
-# include "AndroidBridge.h"
-#endif
-
#ifdef MOZ_WIDGET_GTK
#include <gdk/gdk.h>
#endif
@@ -1510,7 +1502,7 @@ ContentParent::OnChannelConnected(int32_t pid)
{
SetOtherProcessId(pid);
-#if defined(ANDROID) || defined(LINUX)
+#if defined(LINUX)
// Check nice preference
int32_t nice = Preferences::GetInt("dom.ipc.content.nice", 0);
@@ -2211,9 +2203,6 @@ ContentParent::OnVarChanged(const GfxVarUpdate& aVar)
bool
ContentParent::RecvReadFontList(InfallibleTArray<FontListEntry>* retValue)
{
-#ifdef ANDROID
- gfxAndroidPlatform::GetPlatform()->GetSystemFontList(retValue);
-#endif
return true;
}
@@ -2371,19 +2360,6 @@ bool
ContentParent::RecvGetSystemColors(const uint32_t& colorsCount,
InfallibleTArray<uint32_t>* colors)
{
-#ifdef MOZ_WIDGET_ANDROID
- NS_ASSERTION(AndroidBridge::Bridge() != nullptr, "AndroidBridge is not available");
- if (AndroidBridge::Bridge() == nullptr) {
- // Do not fail - the colors won't be right, but it's not critical
- return true;
- }
-
- colors->AppendElements(colorsCount);
-
- // The array elements correspond to the members of AndroidSystemColors structure,
- // so just pass the pointer to the elements buffer
- AndroidBridge::Bridge()->GetSystemColors((AndroidSystemColors*)colors->Elements());
-#endif
return true;
}
@@ -2392,17 +2368,6 @@ ContentParent::RecvGetIconForExtension(const nsCString& aFileExt,
const uint32_t& aIconSize,
InfallibleTArray<uint8_t>* bits)
{
-#ifdef MOZ_WIDGET_ANDROID
- NS_ASSERTION(AndroidBridge::Bridge() != nullptr, "AndroidBridge is not available");
- if (AndroidBridge::Bridge() == nullptr) {
- // Do not fail - just no icon will be shown
- return true;
- }
-
- bits->AppendElements(aIconSize * aIconSize * 4);
-
- AndroidBridge::Bridge()->GetIconForExtension(aFileExt, aIconSize, bits->Elements());
-#endif
return true;
}
@@ -2411,11 +2376,6 @@ ContentParent::RecvGetShowPasswordSetting(bool* showPassword)
{
// default behavior is to show the last password character
*showPassword = true;
-#ifdef MOZ_WIDGET_ANDROID
- NS_ASSERTION(AndroidBridge::Bridge() != nullptr, "AndroidBridge is not available");
-
- *showPassword = java::GeckoAppShell::GetShowPasswordSetting();
-#endif
return true;
}
@@ -4460,13 +4420,8 @@ ContentParent::RecvEndDriverCrashGuard(const uint32_t& aGuardType)
bool
ContentParent::RecvGetAndroidSystemInfo(AndroidSystemInfo* aInfo)
{
-#ifdef MOZ_WIDGET_ANDROID
- nsSystemInfo::GetAndroidSystemInfo(aInfo);
- return true;
-#else
MOZ_CRASH("wrong platform!");
return false;
-#endif
}
bool
diff --git a/dom/media/GraphDriver.cpp b/dom/media/GraphDriver.cpp
index 37c692a4bc..fe40c82e24 100644
--- a/dom/media/GraphDriver.cpp
+++ b/dom/media/GraphDriver.cpp
@@ -21,16 +21,11 @@
extern mozilla::LazyLogModule gMediaStreamGraphLog;
#define STREAM_LOG(type, msg) MOZ_LOG(gMediaStreamGraphLog, type, msg)
-// We don't use NSPR log here because we want this interleaved with adb logcat
-// on Android/B2G
+// XXX: We didn't use NSPR log here because we wanted this interleaved with
+// adb logcat on Android/B2G. This is no longer a concern; use NSPR?
// #define ENABLE_LIFECYCLE_LOG
#ifdef ENABLE_LIFECYCLE_LOG
-#ifdef ANDROID
-#include "android/log.h"
-#define LIFECYCLE_LOG(...) __android_log_print(ANDROID_LOG_INFO, "Gecko - MSG" , __VA_ARGS__); printf(__VA_ARGS__);printf("\n");
-#else
#define LIFECYCLE_LOG(...) printf(__VA_ARGS__);printf("\n");
-#endif
#else
#define LIFECYCLE_LOG(...)
#endif
diff --git a/dom/power/PowerManagerService.cpp b/dom/power/PowerManagerService.cpp
index 057d5c992b..bc2f40c40a 100644
--- a/dom/power/PowerManagerService.cpp
+++ b/dom/power/PowerManagerService.cpp
@@ -23,23 +23,7 @@
#include <unistd.h>
#endif
-#ifdef ANDROID
-#include <android/log.h>
-extern "C" char* PrintJSStack();
-static void LogFunctionAndJSStack(const char* funcname) {
- char *jsstack = PrintJSStack();
- __android_log_print(ANDROID_LOG_INFO, "PowerManagerService", \
- "Call to %s. The JS stack is:\n%s\n",
- funcname,
- jsstack ? jsstack : "<no JS stack>");
- JS_smprintf_free(jsstack);
-}
-// bug 839452
-#define LOG_FUNCTION_AND_JS_STACK() \
- LogFunctionAndJSStack(__PRETTY_FUNCTION__);
-#else
#define LOG_FUNCTION_AND_JS_STACK()
-#endif
namespace mozilla {
namespace dom {
diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp
index 1f8b3b70c4..f33ded1c5f 100644
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -91,10 +91,6 @@
#include "prthread.h"
#include "xpcpublic.h"
-#ifdef ANDROID
-#include <android/log.h>
-#endif
-
#ifdef DEBUG
#include "nsThreadManager.h"
#endif
@@ -334,11 +330,6 @@ LogErrorToConsole(const WorkerErrorReport& aReport, uint64_t aInnerWindowId)
static const char kErrorString[] = "JS error in Web Worker: %s [%s:%u]";
-#ifdef ANDROID
- __android_log_print(ANDROID_LOG_INFO, "Gecko", kErrorString, msg.get(),
- filename.get(), aReport.mLineNumber);
-#endif
-
fprintf(stderr, kErrorString, msg.get(), filename.get(), aReport.mLineNumber);
fflush(stderr);
}
diff --git a/dom/workers/WorkerScope.cpp b/dom/workers/WorkerScope.cpp
index 195df5c9eb..081f0f1065 100644
--- a/dom/workers/WorkerScope.cpp
+++ b/dom/workers/WorkerScope.cpp
@@ -33,10 +33,6 @@
#include "nsIServiceWorkerManager.h"
#include "nsIScriptTimeoutHandler.h"
-#ifdef ANDROID
-#include <android/log.h>
-#endif
-
#include "Crypto.h"
#include "Principal.h"
#include "RuntimeService.h"
@@ -378,9 +374,6 @@ WorkerGlobalScope::Dump(const Optional<nsAString>& aString) const
NS_ConvertUTF16toUTF8 str(aString.Value());
MOZ_LOG(nsContentUtils::DOMDumpLog(), LogLevel::Debug, ("[Worker.Dump] %s", str.get()));
-#ifdef ANDROID
- __android_log_print(ANDROID_LOG_INFO, "Gecko", "%s", str.get());
-#endif
fputs(str.get(), stdout);
fflush(stdout);
}
diff --git a/dom/worklet/WorkletGlobalScope.cpp b/dom/worklet/WorkletGlobalScope.cpp
index be3e975ac6..87bca208a0 100644
--- a/dom/worklet/WorkletGlobalScope.cpp
+++ b/dom/worklet/WorkletGlobalScope.cpp
@@ -92,10 +92,6 @@ WorkletGlobalScope::Dump(const Optional<nsAString>& aString) const
NS_ConvertUTF16toUTF8 str(aString.Value());
-#ifdef ANDROID
- __android_log_print(ANDROID_LOG_INFO, "Gecko", "%s", str.get());
-#endif
-
fputs(str.get(), stdout);
fflush(stdout);
}