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 {
mIsAutoDirRootContentRTL(false),
mForceDisableApz(false),
mResolutionUpdated(false),
mIsRDMTouchSimulationActive(false),
mOverscrollBehavior() {}
bool operator==(const ScrollMetadata& aOther) const {
......@@ -901,7 +900,6 @@ struct ScrollMetadata {
mIsAutoDirRootContentRTL == aOther.mIsAutoDirRootContentRTL &&
mForceDisableApz == aOther.mForceDisableApz &&
mResolutionUpdated == aOther.mResolutionUpdated &&
mIsRDMTouchSimulationActive == aOther.mIsRDMTouchSimulationActive &&
mDisregardedDirection == aOther.mDisregardedDirection &&
mOverscrollBehavior == aOther.mOverscrollBehavior;
}
......@@ -981,13 +979,6 @@ struct ScrollMetadata {
void SetResolutionUpdated(bool aUpdated) { mResolutionUpdated = aUpdated; }
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
// code which defines mDisregardedDirection.
Maybe<ScrollDirection> GetDisregardedDirection() const {
......@@ -1064,12 +1055,6 @@ struct ScrollMetadata {
// FrameMetrics::mScrollUpdateType) does for the scroll offset.
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,
// even if the scroll frame overflows in that direction and the direction is
// specified as scrollable. This could happen in some scenarios, for instance,
......
......@@ -1009,14 +1009,7 @@ bool AsyncPanZoomController::ArePointerEventsConsumable(
nsEventStatus AsyncPanZoomController::HandleDragEvent(
const MouseInput& aEvent, const AsyncDragMetrics& aDragMetrics,
CSSCoord aInitialThumbPos) {
// RDM is a special case where touch events will be synthesized in response
// 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()) {
if (!StaticPrefs::apz_drag_enabled()) {
return nsEventStatus_eIgnore;
}
......@@ -4657,8 +4650,6 @@ void AsyncPanZoomController::NotifyLayersUpdated(
aScrollMetadata.IsAutoDirRootContentRTL());
Metrics().SetIsScrollInfoLayer(aLayerMetrics.IsScrollInfoLayer());
mScrollMetadata.SetForceDisableApz(aScrollMetadata.IsApzForceDisabled());
mScrollMetadata.SetIsRDMTouchSimulationActive(
aScrollMetadata.GetIsRDMTouchSimulationActive());
mScrollMetadata.SetDisregardedDirection(
aScrollMetadata.GetDisregardedDirection());
mScrollMetadata.SetOverscrollBehavior(
......
......@@ -413,7 +413,6 @@ struct ParamTraits<mozilla::layers::ScrollMetadata>
WriteParam(aMsg, aParam.mIsAutoDirRootContentRTL);
WriteParam(aMsg, aParam.mForceDisableApz);
WriteParam(aMsg, aParam.mResolutionUpdated);
WriteParam(aMsg, aParam.mIsRDMTouchSimulationActive);
WriteParam(aMsg, aParam.mDisregardedDirection);
WriteParam(aMsg, aParam.mOverscrollBehavior);
}
......@@ -448,10 +447,8 @@ struct ParamTraits<mozilla::layers::ScrollMetadata>
&paramType::SetForceDisableApz) &&
ReadBoolForBitfield(aMsg, aIter, aResult,
&paramType::SetResolutionUpdated) &&
ReadBoolForBitfield(aMsg, aIter, aResult,
&paramType::SetIsRDMTouchSimulationActive)) &&
ReadParam(aMsg, aIter, &aResult->mDisregardedDirection) &&
ReadParam(aMsg, aIter, &aResult->mOverscrollBehavior);
ReadParam(aMsg, aIter, &aResult->mOverscrollBehavior));
}
};
......
......@@ -9041,16 +9041,6 @@ ScrollMetadata nsLayoutUtils::ComputeScrollMetadata(
FrameMetrics& metrics = metadata.GetMetrics();
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;
if (aContent) {
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