mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1700251 - Factor out a HitTestResult::CopyWithoutScrollbarNode() helper. r=tnikkel
Depends on D109458 Differential Revision: https://phabricator.services.mozilla.com/D109459
This commit is contained in:
parent
16fade4fa5
commit
8afb24e3fb
@ -1942,10 +1942,7 @@ void APZCTreeManager::ProcessTouchInput(InputHandlingState& aState,
|
||||
|
||||
HitTestResult hit = GetTouchInputBlockAPZC(aInput, &touchBehaviors);
|
||||
// Repopulate mTouchBlockHitResult with the fields we care about.
|
||||
mTouchBlockHitResult = HitTestResult();
|
||||
mTouchBlockHitResult.mTargetApzc = hit.mTargetApzc;
|
||||
mTouchBlockHitResult.mHitResult = hit.mHitResult;
|
||||
mTouchBlockHitResult.mFixedPosSides = hit.mFixedPosSides;
|
||||
mTouchBlockHitResult = hit.CopyWithoutScrollbarNode();
|
||||
if (hit.mLayersId.IsValid()) {
|
||||
// Check for validity because we won't get a layers id for multi-touch
|
||||
// events.
|
||||
@ -2496,6 +2493,16 @@ void APZCTreeManager::ClearTree() {
|
||||
}));
|
||||
}
|
||||
|
||||
APZCTreeManager::HitTestResult
|
||||
APZCTreeManager::HitTestResult::CopyWithoutScrollbarNode() const {
|
||||
HitTestResult result;
|
||||
result.mTargetApzc = mTargetApzc;
|
||||
result.mHitResult = mHitResult;
|
||||
result.mLayersId = mLayersId;
|
||||
result.mFixedPosSides = mFixedPosSides;
|
||||
return result;
|
||||
}
|
||||
|
||||
RefPtr<HitTestingTreeNode> APZCTreeManager::GetRootNode() const {
|
||||
RecursiveMutexAutoLock lock(mTreeLock);
|
||||
return mRootNode;
|
||||
|
@ -565,6 +565,10 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
|
||||
// Make it move-only.
|
||||
HitTestResult(HitTestResult&&) = default;
|
||||
HitTestResult& operator=(HitTestResult&&) = default;
|
||||
|
||||
// Make a copy of all the fields except mScrollbarNode (the field
|
||||
// that makes this move-only).
|
||||
HitTestResult CopyWithoutScrollbarNode() const;
|
||||
};
|
||||
|
||||
/* Some helper functions to find an APZC given some identifying input. These
|
||||
|
Loading…
Reference in New Issue
Block a user