mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 09:49:14 +00:00
Bug 1246290 - Add a bit to FrameMetrics to indicate if APZ-scrolling should be disabled on that APZC. r=botond
MozReview-Commit-ID: 5NeFP31Y0Qg
This commit is contained in:
parent
36b6d35999
commit
967f8c8fb1
@ -713,6 +713,7 @@ struct ParamTraits<mozilla::layers::FrameMetrics>
|
||||
WriteParam(aMsg, aParam.mIsLayersIdRoot);
|
||||
WriteParam(aMsg, aParam.mUsesContainerScrolling);
|
||||
WriteParam(aMsg, aParam.mIsScrollInfoLayer);
|
||||
WriteParam(aMsg, aParam.mForceDisableApz);
|
||||
}
|
||||
|
||||
static bool ReadContentDescription(const Message* aMsg, void** aIter, paramType* aResult)
|
||||
@ -772,7 +773,8 @@ struct ParamTraits<mozilla::layers::FrameMetrics>
|
||||
ReadBoolForBitfield(aMsg, aIter, aResult, ¶mType::SetAllowVerticalScrollWithWheel) &&
|
||||
ReadBoolForBitfield(aMsg, aIter, aResult, ¶mType::SetIsLayersIdRoot) &&
|
||||
ReadBoolForBitfield(aMsg, aIter, aResult, ¶mType::SetUsesContainerScrolling) &&
|
||||
ReadBoolForBitfield(aMsg, aIter, aResult, ¶mType::SetIsScrollInfoLayer));
|
||||
ReadBoolForBitfield(aMsg, aIter, aResult, ¶mType::SetIsScrollInfoLayer) &&
|
||||
ReadBoolForBitfield(aMsg, aIter, aResult, ¶mType::SetForceDisableApz));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -74,6 +74,7 @@ public:
|
||||
, mIsLayersIdRoot(false)
|
||||
, mUsesContainerScrolling(false)
|
||||
, mIsScrollInfoLayer(false)
|
||||
, mForceDisableApz(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -113,7 +114,8 @@ public:
|
||||
mAllowVerticalScrollWithWheel == aOther.mAllowVerticalScrollWithWheel &&
|
||||
mIsLayersIdRoot == aOther.mIsLayersIdRoot &&
|
||||
mUsesContainerScrolling == aOther.mUsesContainerScrolling &&
|
||||
mIsScrollInfoLayer == aOther.mIsScrollInfoLayer;
|
||||
mIsScrollInfoLayer == aOther.mIsScrollInfoLayer &&
|
||||
mForceDisableApz == aOther.mForceDisableApz;
|
||||
}
|
||||
|
||||
bool operator!=(const FrameMetrics& aOther) const
|
||||
@ -554,6 +556,13 @@ public:
|
||||
return mIsScrollInfoLayer;
|
||||
}
|
||||
|
||||
void SetForceDisableApz(bool aForceDisable) {
|
||||
mForceDisableApz = aForceDisable;
|
||||
}
|
||||
bool IsApzForceDisabled() const {
|
||||
return mForceDisableApz;
|
||||
}
|
||||
|
||||
private:
|
||||
// A unique ID assigned to each scrollable frame.
|
||||
ViewID mScrollId;
|
||||
@ -742,6 +751,10 @@ private:
|
||||
// Whether or not this frame has a "scroll info layer" to capture events.
|
||||
bool mIsScrollInfoLayer:1;
|
||||
|
||||
// Whether or not the compositor should actually do APZ-scrolling on this
|
||||
// scrollframe.
|
||||
bool mForceDisableApz:1;
|
||||
|
||||
// WARNING!!!!
|
||||
//
|
||||
// When adding new fields to FrameMetrics, the following places should be
|
||||
|
@ -3436,6 +3436,7 @@ void AsyncPanZoomController::NotifyLayersUpdated(const ScrollMetadata& aScrollMe
|
||||
mFrameMetrics.SetIsLayersIdRoot(aLayerMetrics.IsLayersIdRoot());
|
||||
mFrameMetrics.SetUsesContainerScrolling(aLayerMetrics.UsesContainerScrolling());
|
||||
mFrameMetrics.SetIsScrollInfoLayer(aLayerMetrics.IsScrollInfoLayer());
|
||||
mFrameMetrics.SetForceDisableApz(aLayerMetrics.IsApzForceDisabled());
|
||||
|
||||
if (scrollOffsetUpdated) {
|
||||
APZC_LOG("%p updating scroll offset from %s to %s\n", this,
|
||||
|
Loading…
x
Reference in New Issue
Block a user