Backed out 11 changesets (bug 1678505) for causing crashes. a=backout
Backed out changeset 7cd5f2c1c3f4 (bug 1678505) Backed out changeset 09f4c4093c07 (bug 1678505) Backed out changeset 76e3f391b7dd (bug 1678505) Backed out changeset 6a0e949d4a2d (bug 1678505) Backed out changeset 69c7b98ac8f6 (bug 1678505) Backed out changeset 63608c5df1b0 (bug 1678505) Backed out changeset a4532c4a1768 (bug 1678505) Backed out changeset 09aab64b89cd (bug 1678505) Backed out changeset e832d2bfe7a6 (bug 1678505) Backed out changeset e0898b4f9fe6 (bug 1678505) Backed out changeset 04a759c327cd (bug 1678505)
This commit is contained in:
@@ -33,7 +33,6 @@
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/gfx/DataSurfaceHelpers.h"
|
||||
#include "mozilla/gfx/Types.h"
|
||||
#include "mozilla/layers/LayersTypes.h"
|
||||
#include "mozilla/layers/RenderTrace.h"
|
||||
#include "mozilla/widget/AndroidVsync.h"
|
||||
#include <algorithm>
|
||||
@@ -393,7 +392,7 @@ class NPZCSupport final
|
||||
WheelDeltaAdjustmentStrategy::eNone);
|
||||
|
||||
APZEventResult result = controller->InputBridge()->ReceiveInputEvent(input);
|
||||
if (result.GetStatus() == nsEventStatus_eConsumeNoDefault) {
|
||||
if (result.mStatus == nsEventStatus_eConsumeNoDefault) {
|
||||
return INPUT_RESULT_IGNORED;
|
||||
}
|
||||
|
||||
@@ -402,11 +401,11 @@ class NPZCSupport final
|
||||
window->ProcessUntransformedAPZEvent(&wheelEvent, result);
|
||||
});
|
||||
|
||||
switch (result.GetStatus()) {
|
||||
switch (result.mStatus) {
|
||||
case nsEventStatus_eIgnore:
|
||||
return INPUT_RESULT_UNHANDLED;
|
||||
case nsEventStatus_eConsumeDoDefault:
|
||||
return result.GetHandledResult()->IsHandledByRoot()
|
||||
return (result.mHandledResult == Some(APZHandledResult::HandledByRoot))
|
||||
? INPUT_RESULT_HANDLED
|
||||
: INPUT_RESULT_HANDLED_CONTENT;
|
||||
default:
|
||||
@@ -458,15 +457,15 @@ class NPZCSupport final
|
||||
return result;
|
||||
}
|
||||
|
||||
static int32_t ConvertAPZHandledPlace(APZHandledPlace aHandledPlace) {
|
||||
switch (aHandledPlace) {
|
||||
case APZHandledPlace::Unhandled:
|
||||
static int32_t ConvertAPZHandledResult(APZHandledResult aHandledResult) {
|
||||
switch (aHandledResult) {
|
||||
case APZHandledResult::Unhandled:
|
||||
return INPUT_RESULT_UNHANDLED;
|
||||
case APZHandledPlace::HandledByRoot:
|
||||
case APZHandledResult::HandledByRoot:
|
||||
return INPUT_RESULT_HANDLED;
|
||||
case APZHandledPlace::HandledByContent:
|
||||
case APZHandledResult::HandledByContent:
|
||||
return INPUT_RESULT_HANDLED_CONTENT;
|
||||
case APZHandledPlace::Invalid:
|
||||
case APZHandledResult::Invalid:
|
||||
MOZ_ASSERT_UNREACHABLE("The handled result should NOT be Invalid");
|
||||
return INPUT_RESULT_UNHANDLED;
|
||||
}
|
||||
@@ -474,43 +473,6 @@ class NPZCSupport final
|
||||
return INPUT_RESULT_UNHANDLED;
|
||||
}
|
||||
|
||||
static int32_t ConvertSideBits(SideBits aSideBits) {
|
||||
int32_t ret = java::PanZoomController::SCROLLABLE_FLAG_NONE;
|
||||
if (aSideBits & SideBits::eTop) {
|
||||
ret |= java::PanZoomController::SCROLLABLE_FLAG_TOP;
|
||||
}
|
||||
if (aSideBits & SideBits::eRight) {
|
||||
ret |= java::PanZoomController::SCROLLABLE_FLAG_RIGHT;
|
||||
}
|
||||
if (aSideBits & SideBits::eBottom) {
|
||||
ret |= java::PanZoomController::SCROLLABLE_FLAG_BOTTOM;
|
||||
}
|
||||
if (aSideBits & SideBits::eLeft) {
|
||||
ret |= java::PanZoomController::SCROLLABLE_FLAG_LEFT;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int32_t ConvertScrollDirections(
|
||||
layers::ScrollDirections aScrollDirections) {
|
||||
int32_t ret = java::PanZoomController::OVERSCROLL_FLAG_NONE;
|
||||
if (aScrollDirections.contains(layers::HorizontalScrollDirection)) {
|
||||
ret |= java::PanZoomController::OVERSCROLL_FLAG_HORIZONTAL;
|
||||
}
|
||||
if (aScrollDirections.contains(layers::VerticalScrollDirection)) {
|
||||
ret |= java::PanZoomController::OVERSCROLL_FLAG_VERTICAL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static java::PanZoomController::InputResultDetail::LocalRef
|
||||
ConvertAPZHandledResult(const APZHandledResult& aHandledResult) {
|
||||
return java::PanZoomController::InputResultDetail::New(
|
||||
ConvertAPZHandledPlace(aHandledResult.mPlace),
|
||||
ConvertSideBits(aHandledResult.mScrollableDirections),
|
||||
ConvertScrollDirections(aHandledResult.mOverscrollDirections));
|
||||
}
|
||||
|
||||
public:
|
||||
int32_t HandleMouseEvent(int32_t aAction, int64_t aTime, int32_t aMetaState,
|
||||
float aX, float aY, int buttons) {
|
||||
@@ -570,7 +532,7 @@ class NPZCSupport final
|
||||
nsWindow::GetEventTimeStamp(aTime), nsWindow::GetModifiers(aMetaState));
|
||||
|
||||
APZEventResult result = controller->InputBridge()->ReceiveInputEvent(input);
|
||||
if (result.GetStatus() == nsEventStatus_eConsumeNoDefault) {
|
||||
if (result.mStatus == nsEventStatus_eConsumeNoDefault) {
|
||||
return INPUT_RESULT_IGNORED;
|
||||
}
|
||||
|
||||
@@ -579,11 +541,11 @@ class NPZCSupport final
|
||||
window->ProcessUntransformedAPZEvent(&mouseEvent, result);
|
||||
});
|
||||
|
||||
switch (result.GetStatus()) {
|
||||
switch (result.mStatus) {
|
||||
case nsEventStatus_eIgnore:
|
||||
return INPUT_RESULT_UNHANDLED;
|
||||
case nsEventStatus_eConsumeDoDefault:
|
||||
return result.GetHandledResult()->IsHandledByRoot()
|
||||
return (result.mHandledResult == Some(APZHandledResult::HandledByRoot))
|
||||
? INPUT_RESULT_HANDLED
|
||||
: INPUT_RESULT_HANDLED_CONTENT;
|
||||
default:
|
||||
@@ -821,21 +783,18 @@ class NPZCSupport final
|
||||
|
||||
if (!controller) {
|
||||
if (aReturnResult) {
|
||||
aReturnResult->Complete(java::PanZoomController::InputResultDetail::New(
|
||||
INPUT_RESULT_UNHANDLED,
|
||||
java::PanZoomController::SCROLLABLE_FLAG_NONE,
|
||||
java::PanZoomController::OVERSCROLL_FLAG_NONE));
|
||||
aReturnResult->Complete(
|
||||
java::sdk::Integer::ValueOf(INPUT_RESULT_UNHANDLED));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
APZEventResult result =
|
||||
controller->InputBridge()->ReceiveInputEvent(aInput);
|
||||
if (result.GetStatus() == nsEventStatus_eConsumeNoDefault) {
|
||||
if (result.mStatus == nsEventStatus_eConsumeNoDefault) {
|
||||
if (aReturnResult) {
|
||||
aReturnResult->Complete(java::PanZoomController::InputResultDetail::New(
|
||||
INPUT_RESULT_IGNORED, java::PanZoomController::SCROLLABLE_FLAG_NONE,
|
||||
java::PanZoomController::OVERSCROLL_FLAG_NONE));
|
||||
aReturnResult->Complete(
|
||||
java::sdk::Integer::ValueOf(INPUT_RESULT_IGNORED));
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -852,28 +811,22 @@ class NPZCSupport final
|
||||
return;
|
||||
}
|
||||
|
||||
if (result.GetHandledResult() != Nothing()) {
|
||||
if (result.mHandledResult != Nothing()) {
|
||||
// We know conclusively that the root APZ handled this or not and
|
||||
// don't need to do any more work.
|
||||
switch (result.GetStatus()) {
|
||||
switch (result.mStatus) {
|
||||
case nsEventStatus_eIgnore:
|
||||
aReturnResult->Complete(
|
||||
java::PanZoomController::InputResultDetail::New(
|
||||
INPUT_RESULT_UNHANDLED,
|
||||
java::PanZoomController::SCROLLABLE_FLAG_NONE,
|
||||
java::PanZoomController::OVERSCROLL_FLAG_NONE));
|
||||
java::sdk::Integer::ValueOf(INPUT_RESULT_UNHANDLED));
|
||||
break;
|
||||
case nsEventStatus_eConsumeDoDefault:
|
||||
aReturnResult->Complete(
|
||||
ConvertAPZHandledResult(result.GetHandledResult().value()));
|
||||
aReturnResult->Complete(java::sdk::Integer::ValueOf(
|
||||
ConvertAPZHandledResult(result.mHandledResult.value())));
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSERT_UNREACHABLE("Unexpected nsEventStatus");
|
||||
aReturnResult->Complete(
|
||||
java::PanZoomController::InputResultDetail::New(
|
||||
INPUT_RESULT_UNHANDLED,
|
||||
java::PanZoomController::SCROLLABLE_FLAG_NONE,
|
||||
java::PanZoomController::OVERSCROLL_FLAG_NONE));
|
||||
java::sdk::Integer::ValueOf(INPUT_RESULT_UNHANDLED));
|
||||
break;
|
||||
}
|
||||
return;
|
||||
@@ -883,8 +836,9 @@ class NPZCSupport final
|
||||
controller->AddInputBlockCallback(
|
||||
result.mInputBlockId,
|
||||
[aReturnResult = java::GeckoResult::GlobalRef(aReturnResult)](
|
||||
uint64_t aInputBlockId, const APZHandledResult& aHandledResult) {
|
||||
aReturnResult->Complete(ConvertAPZHandledResult(aHandledResult));
|
||||
uint64_t aInputBlockId, APZHandledResult aHandledResult) {
|
||||
aReturnResult->Complete(java::sdk::Integer::ValueOf(
|
||||
ConvertAPZHandledResult(aHandledResult)));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user