mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 09:57:32 +09:00
Issue #1053 - Part 3a: Remove Android conditionals from /gfx
This commit is contained in:
parent
7167c960d0
commit
753251e54c
43 changed files with 32 additions and 1708 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue