summaryrefslogtreecommitdiffstats
path: root/gfx/layers/apz/util
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/layers/apz/util')
-rw-r--r--gfx/layers/apz/util/APZCCallbackHelper.cpp13
-rw-r--r--gfx/layers/apz/util/APZEventState.cpp7
-rw-r--r--gfx/layers/apz/util/APZThreadUtils.cpp17
3 files changed, 3 insertions, 34 deletions
diff --git a/gfx/layers/apz/util/APZCCallbackHelper.cpp b/gfx/layers/apz/util/APZCCallbackHelper.cpp
index 3f33a59e4..2fda14719 100644
--- a/gfx/layers/apz/util/APZCCallbackHelper.cpp
+++ b/gfx/layers/apz/util/APZCCallbackHelper.cpp
@@ -580,18 +580,7 @@ GetRootDocumentElementFor(nsIWidget* aWidget)
static nsIFrame*
UpdateRootFrameForTouchTargetDocument(nsIFrame* aRootFrame)
{
-#if defined(MOZ_WIDGET_ANDROID)
- // Re-target so that the hit test is performed relative to the frame for the
- // Root Content Document instead of the Root Document which are different in
- // Android. See bug 1229752 comment 16 for an explanation of why this is necessary.
- if (nsIDocument* doc = aRootFrame->PresContext()->PresShell()->GetTouchEventTargetDocument()) {
- if (nsIPresShell* shell = doc->GetShell()) {
- if (nsIFrame* frame = shell->GetRootFrame()) {
- return frame;
- }
- }
- }
-#endif
+ // No retargeting needed on desktop.
return aRootFrame;
}
diff --git a/gfx/layers/apz/util/APZEventState.cpp b/gfx/layers/apz/util/APZEventState.cpp
index 20a41eed5..00a18d7b2 100644
--- a/gfx/layers/apz/util/APZEventState.cpp
+++ b/gfx/layers/apz/util/APZEventState.cpp
@@ -479,11 +479,8 @@ APZEventState::ProcessAPZStateChange(ViewID aViewId,
void
APZEventState::ProcessClusterHit()
{
- // If we hit a cluster of links then we shouldn't activate any of them,
- // as we will be showing the zoomed view. (This is only called on Fennec).
-#ifndef MOZ_WIDGET_ANDROID
- MOZ_ASSERT(false);
-#endif
+ // If we hit a cluster of links then we shouldn't activate any of them.
+ MOZ_ASSERT(false, "Cluster hits shouldn't happen on desktop!");
mActiveElementManager->ClearActivation();
}
diff --git a/gfx/layers/apz/util/APZThreadUtils.cpp b/gfx/layers/apz/util/APZThreadUtils.cpp
index 46f67d010..e1975a2a0 100644
--- a/gfx/layers/apz/util/APZThreadUtils.cpp
+++ b/gfx/layers/apz/util/APZThreadUtils.cpp
@@ -6,9 +6,6 @@
#include "mozilla/layers/APZThreadUtils.h"
#include "mozilla/layers/Compositor.h"
-#ifdef MOZ_WIDGET_ANDROID
-#include "AndroidBridge.h"
-#endif
namespace mozilla {
namespace layers {
@@ -57,15 +54,6 @@ APZThreadUtils::RunOnControllerThread(already_AddRefed<Runnable> aTask)
{
RefPtr<Runnable> task = aTask;
-#ifdef MOZ_WIDGET_ANDROID
- // This is needed while nsWindow::ConfigureAPZControllerThread is not propper
- // implemented.
- if (AndroidBridge::IsJavaUiThread()) {
- task->Run();
- } else {
- AndroidBridge::Bridge()->PostTaskToUiThread(task.forget(), 0);
- }
-#else
if (!sControllerThread) {
// Could happen on startup
NS_WARNING("Dropping task posted to controller thread");
@@ -77,17 +65,12 @@ APZThreadUtils::RunOnControllerThread(already_AddRefed<Runnable> aTask)
} else {
sControllerThread->PostTask(task.forget());
}
-#endif
}
/*static*/ bool
APZThreadUtils::IsControllerThread()
{
-#ifdef MOZ_WIDGET_ANDROID
- return AndroidBridge::IsJavaUiThread();
-#else
return sControllerThread == MessageLoop::current();
-#endif
}
NS_IMPL_ISUPPORTS(GenericTimerCallbackBase, nsITimerCallback)