Commit 0c8ff16b authored by Dorel Luca's avatar Dorel Luca
Browse files

Backed out 2 changesets (bug 1621781) for Mochitest failures in...

Backed out 2 changesets (bug 1621781) for Mochitest failures in gfx/layers/apz/test/mochitest/test_group_mouseevents.html

Backed out changeset a5fe71693070 (bug 1621781)
Backed out changeset 58a9b7f50a4b (bug 1621781)
parent 6abadd57
...@@ -885,7 +885,6 @@ struct ScrollMetadata { ...@@ -885,7 +885,6 @@ struct ScrollMetadata {
mIsAutoDirRootContentRTL(false), mIsAutoDirRootContentRTL(false),
mForceDisableApz(false), mForceDisableApz(false),
mResolutionUpdated(false), mResolutionUpdated(false),
mIsRDMTouchSimulationActive(false),
mOverscrollBehavior() {} mOverscrollBehavior() {}
bool operator==(const ScrollMetadata& aOther) const { bool operator==(const ScrollMetadata& aOther) const {
...@@ -901,7 +900,6 @@ struct ScrollMetadata { ...@@ -901,7 +900,6 @@ struct ScrollMetadata {
mIsAutoDirRootContentRTL == aOther.mIsAutoDirRootContentRTL && mIsAutoDirRootContentRTL == aOther.mIsAutoDirRootContentRTL &&
mForceDisableApz == aOther.mForceDisableApz && mForceDisableApz == aOther.mForceDisableApz &&
mResolutionUpdated == aOther.mResolutionUpdated && mResolutionUpdated == aOther.mResolutionUpdated &&
mIsRDMTouchSimulationActive == aOther.mIsRDMTouchSimulationActive &&
mDisregardedDirection == aOther.mDisregardedDirection && mDisregardedDirection == aOther.mDisregardedDirection &&
mOverscrollBehavior == aOther.mOverscrollBehavior; mOverscrollBehavior == aOther.mOverscrollBehavior;
} }
...@@ -981,13 +979,6 @@ struct ScrollMetadata { ...@@ -981,13 +979,6 @@ struct ScrollMetadata {
void SetResolutionUpdated(bool aUpdated) { mResolutionUpdated = aUpdated; } void SetResolutionUpdated(bool aUpdated) { mResolutionUpdated = aUpdated; }
bool IsResolutionUpdated() const { return mResolutionUpdated; } bool IsResolutionUpdated() const { return mResolutionUpdated; }
void SetIsRDMTouchSimulationActive(bool aValue) {
mIsRDMTouchSimulationActive = aValue;
}
bool GetIsRDMTouchSimulationActive() const {
return mIsRDMTouchSimulationActive;
}
// For more details about the concept of a disregarded direction, refer to the // For more details about the concept of a disregarded direction, refer to the
// code which defines mDisregardedDirection. // code which defines mDisregardedDirection.
Maybe<ScrollDirection> GetDisregardedDirection() const { Maybe<ScrollDirection> GetDisregardedDirection() const {
...@@ -1064,12 +1055,6 @@ struct ScrollMetadata { ...@@ -1064,12 +1055,6 @@ struct ScrollMetadata {
// FrameMetrics::mScrollUpdateType) does for the scroll offset. // FrameMetrics::mScrollUpdateType) does for the scroll offset.
bool mResolutionUpdated : 1; bool mResolutionUpdated : 1;
// Whether or not RDM and touch simulation are active for this document.
// It's important to note that if RDM is active then this field will be
// true for the content document but NOT the chrome document containing
// the browser UI and RDM controls.
bool mIsRDMTouchSimulationActive : 1;
// The disregarded direction means the direction which is disregarded anyway, // The disregarded direction means the direction which is disregarded anyway,
// even if the scroll frame overflows in that direction and the direction is // even if the scroll frame overflows in that direction and the direction is
// specified as scrollable. This could happen in some scenarios, for instance, // specified as scrollable. This could happen in some scenarios, for instance,
......
...@@ -1009,14 +1009,7 @@ bool AsyncPanZoomController::ArePointerEventsConsumable( ...@@ -1009,14 +1009,7 @@ bool AsyncPanZoomController::ArePointerEventsConsumable(
nsEventStatus AsyncPanZoomController::HandleDragEvent( nsEventStatus AsyncPanZoomController::HandleDragEvent(
const MouseInput& aEvent, const AsyncDragMetrics& aDragMetrics, const MouseInput& aEvent, const AsyncDragMetrics& aDragMetrics,
CSSCoord aInitialThumbPos) { CSSCoord aInitialThumbPos) {
// RDM is a special case where touch events will be synthesized in response if (!StaticPrefs::apz_drag_enabled()) {
// to mouse events, and APZ will receive both even though RDM prevent-defaults
// the mouse events. This is because mouse events don't opt into APZ waiting
// to check if the event has been prevent-defaulted and are still processed
// as a result. To handle this, have APZ ignore mouse events when RDM is
// active.
if (!StaticPrefs::apz_drag_enabled() ||
mScrollMetadata.GetIsRDMTouchSimulationActive()) {
return nsEventStatus_eIgnore; return nsEventStatus_eIgnore;
} }
...@@ -4657,8 +4650,6 @@ void AsyncPanZoomController::NotifyLayersUpdated( ...@@ -4657,8 +4650,6 @@ void AsyncPanZoomController::NotifyLayersUpdated(
aScrollMetadata.IsAutoDirRootContentRTL()); aScrollMetadata.IsAutoDirRootContentRTL());
Metrics().SetIsScrollInfoLayer(aLayerMetrics.IsScrollInfoLayer()); Metrics().SetIsScrollInfoLayer(aLayerMetrics.IsScrollInfoLayer());
mScrollMetadata.SetForceDisableApz(aScrollMetadata.IsApzForceDisabled()); mScrollMetadata.SetForceDisableApz(aScrollMetadata.IsApzForceDisabled());
mScrollMetadata.SetIsRDMTouchSimulationActive(
aScrollMetadata.GetIsRDMTouchSimulationActive());
mScrollMetadata.SetDisregardedDirection( mScrollMetadata.SetDisregardedDirection(
aScrollMetadata.GetDisregardedDirection()); aScrollMetadata.GetDisregardedDirection());
mScrollMetadata.SetOverscrollBehavior( mScrollMetadata.SetOverscrollBehavior(
......
...@@ -413,7 +413,6 @@ struct ParamTraits<mozilla::layers::ScrollMetadata> ...@@ -413,7 +413,6 @@ struct ParamTraits<mozilla::layers::ScrollMetadata>
WriteParam(aMsg, aParam.mIsAutoDirRootContentRTL); WriteParam(aMsg, aParam.mIsAutoDirRootContentRTL);
WriteParam(aMsg, aParam.mForceDisableApz); WriteParam(aMsg, aParam.mForceDisableApz);
WriteParam(aMsg, aParam.mResolutionUpdated); WriteParam(aMsg, aParam.mResolutionUpdated);
WriteParam(aMsg, aParam.mIsRDMTouchSimulationActive);
WriteParam(aMsg, aParam.mDisregardedDirection); WriteParam(aMsg, aParam.mDisregardedDirection);
WriteParam(aMsg, aParam.mOverscrollBehavior); WriteParam(aMsg, aParam.mOverscrollBehavior);
} }
...@@ -448,10 +447,8 @@ struct ParamTraits<mozilla::layers::ScrollMetadata> ...@@ -448,10 +447,8 @@ struct ParamTraits<mozilla::layers::ScrollMetadata>
&paramType::SetForceDisableApz) && &paramType::SetForceDisableApz) &&
ReadBoolForBitfield(aMsg, aIter, aResult, ReadBoolForBitfield(aMsg, aIter, aResult,
&paramType::SetResolutionUpdated) && &paramType::SetResolutionUpdated) &&
ReadBoolForBitfield(aMsg, aIter, aResult, ReadParam(aMsg, aIter, &aResult->mDisregardedDirection) &&
&paramType::SetIsRDMTouchSimulationActive)) && ReadParam(aMsg, aIter, &aResult->mOverscrollBehavior));
ReadParam(aMsg, aIter, &aResult->mDisregardedDirection) &&
ReadParam(aMsg, aIter, &aResult->mOverscrollBehavior);
} }
}; };
......
...@@ -9041,16 +9041,6 @@ ScrollMetadata nsLayoutUtils::ComputeScrollMetadata( ...@@ -9041,16 +9041,6 @@ ScrollMetadata nsLayoutUtils::ComputeScrollMetadata(
FrameMetrics& metrics = metadata.GetMetrics(); FrameMetrics& metrics = metadata.GetMetrics();
metrics.SetLayoutViewport(CSSRect::FromAppUnits(aViewport)); metrics.SetLayoutViewport(CSSRect::FromAppUnits(aViewport));
nsIDocShell* docShell = presContext->GetDocShell();
BrowsingContext* bc = docShell ? docShell->GetBrowsingContext() : nullptr;
bool isTouchEventsEnabled =
docShell && docShell->GetTouchEventsOverride() ==
nsIDocShell::TOUCHEVENTS_OVERRIDE_ENABLED;
if (bc && bc->InRDMPane() && isTouchEventsEnabled) {
metadata.SetIsRDMTouchSimulationActive(true);
}
ViewID scrollId = ScrollableLayerGuid::NULL_SCROLL_ID; ViewID scrollId = ScrollableLayerGuid::NULL_SCROLL_ID;
if (aContent) { if (aContent) {
if (void* paintRequestTime = if (void* paintRequestTime =
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment