Loading gfx/layers/FrameMetrics.h +15 −0 Original line number Diff line number Diff line Loading @@ -885,6 +885,7 @@ struct ScrollMetadata { mIsAutoDirRootContentRTL(false), mForceDisableApz(false), mResolutionUpdated(false), mIsRDMTouchSimulationActive(false), mOverscrollBehavior() {} bool operator==(const ScrollMetadata& aOther) const { Loading @@ -900,6 +901,7 @@ struct ScrollMetadata { mIsAutoDirRootContentRTL == aOther.mIsAutoDirRootContentRTL && mForceDisableApz == aOther.mForceDisableApz && mResolutionUpdated == aOther.mResolutionUpdated && mIsRDMTouchSimulationActive == aOther.mIsRDMTouchSimulationActive && mDisregardedDirection == aOther.mDisregardedDirection && mOverscrollBehavior == aOther.mOverscrollBehavior; } Loading Loading @@ -979,6 +981,13 @@ 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 { Loading Loading @@ -1055,6 +1064,12 @@ 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, Loading gfx/layers/apz/src/AsyncPanZoomController.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -4650,6 +4650,8 @@ void AsyncPanZoomController::NotifyLayersUpdated( aScrollMetadata.IsAutoDirRootContentRTL()); Metrics().SetIsScrollInfoLayer(aLayerMetrics.IsScrollInfoLayer()); mScrollMetadata.SetForceDisableApz(aScrollMetadata.IsApzForceDisabled()); mScrollMetadata.SetIsRDMTouchSimulationActive( aScrollMetadata.GetIsRDMTouchSimulationActive()); mScrollMetadata.SetDisregardedDirection( aScrollMetadata.GetDisregardedDirection()); mScrollMetadata.SetOverscrollBehavior( Loading gfx/layers/ipc/LayersMessageUtils.h +5 −2 Original line number Diff line number Diff line Loading @@ -413,6 +413,7 @@ 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); } Loading Loading @@ -447,8 +448,10 @@ struct ParamTraits<mozilla::layers::ScrollMetadata> ¶mType::SetForceDisableApz) && ReadBoolForBitfield(aMsg, aIter, aResult, ¶mType::SetResolutionUpdated) && ReadBoolForBitfield(aMsg, aIter, aResult, ¶mType::SetIsRDMTouchSimulationActive)) && ReadParam(aMsg, aIter, &aResult->mDisregardedDirection) && ReadParam(aMsg, aIter, &aResult->mOverscrollBehavior)); ReadParam(aMsg, aIter, &aResult->mOverscrollBehavior); } }; Loading layout/base/nsLayoutUtils.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -9041,6 +9041,16 @@ 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 = Loading Loading
gfx/layers/FrameMetrics.h +15 −0 Original line number Diff line number Diff line Loading @@ -885,6 +885,7 @@ struct ScrollMetadata { mIsAutoDirRootContentRTL(false), mForceDisableApz(false), mResolutionUpdated(false), mIsRDMTouchSimulationActive(false), mOverscrollBehavior() {} bool operator==(const ScrollMetadata& aOther) const { Loading @@ -900,6 +901,7 @@ struct ScrollMetadata { mIsAutoDirRootContentRTL == aOther.mIsAutoDirRootContentRTL && mForceDisableApz == aOther.mForceDisableApz && mResolutionUpdated == aOther.mResolutionUpdated && mIsRDMTouchSimulationActive == aOther.mIsRDMTouchSimulationActive && mDisregardedDirection == aOther.mDisregardedDirection && mOverscrollBehavior == aOther.mOverscrollBehavior; } Loading Loading @@ -979,6 +981,13 @@ 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 { Loading Loading @@ -1055,6 +1064,12 @@ 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, Loading
gfx/layers/apz/src/AsyncPanZoomController.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -4650,6 +4650,8 @@ void AsyncPanZoomController::NotifyLayersUpdated( aScrollMetadata.IsAutoDirRootContentRTL()); Metrics().SetIsScrollInfoLayer(aLayerMetrics.IsScrollInfoLayer()); mScrollMetadata.SetForceDisableApz(aScrollMetadata.IsApzForceDisabled()); mScrollMetadata.SetIsRDMTouchSimulationActive( aScrollMetadata.GetIsRDMTouchSimulationActive()); mScrollMetadata.SetDisregardedDirection( aScrollMetadata.GetDisregardedDirection()); mScrollMetadata.SetOverscrollBehavior( Loading
gfx/layers/ipc/LayersMessageUtils.h +5 −2 Original line number Diff line number Diff line Loading @@ -413,6 +413,7 @@ 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); } Loading Loading @@ -447,8 +448,10 @@ struct ParamTraits<mozilla::layers::ScrollMetadata> ¶mType::SetForceDisableApz) && ReadBoolForBitfield(aMsg, aIter, aResult, ¶mType::SetResolutionUpdated) && ReadBoolForBitfield(aMsg, aIter, aResult, ¶mType::SetIsRDMTouchSimulationActive)) && ReadParam(aMsg, aIter, &aResult->mDisregardedDirection) && ReadParam(aMsg, aIter, &aResult->mOverscrollBehavior)); ReadParam(aMsg, aIter, &aResult->mOverscrollBehavior); } }; Loading
layout/base/nsLayoutUtils.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -9041,6 +9041,16 @@ 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 = Loading