mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1158424 - Add APZCTreeManager::FindRootContentApzcForLayersId(). r=kats
This commit is contained in:
parent
d9d2910535
commit
711c9d3110
@ -1531,6 +1531,25 @@ APZCTreeManager::FindRootApzcForLayersId(uint64_t aLayersId) const
|
||||
return resultNode ? resultNode->GetApzc() : nullptr;
|
||||
}
|
||||
|
||||
AsyncPanZoomController*
|
||||
APZCTreeManager::FindRootContentApzcForLayersId(uint64_t aLayersId) const
|
||||
{
|
||||
mTreeLock.AssertCurrentThreadOwns();
|
||||
|
||||
struct RootContentForLayersIdMatcher {
|
||||
uint64_t mLayersId;
|
||||
bool operator()(const HitTestingTreeNode* aNode) const {
|
||||
AsyncPanZoomController* apzc = aNode->GetApzc();
|
||||
return apzc
|
||||
&& apzc->GetLayersId() == mLayersId
|
||||
&& apzc->IsRootContent();
|
||||
}
|
||||
};
|
||||
const HitTestingTreeNode* resultNode = BreadthFirstSearch(mRootNode.get(),
|
||||
RootContentForLayersIdMatcher{aLayersId});
|
||||
return resultNode ? resultNode->GetApzc() : nullptr;
|
||||
}
|
||||
|
||||
/* The methods GetScreenToApzcTransform() and GetApzcToGeckoTransform() return
|
||||
some useful transformations that input events may need applied. This is best
|
||||
illustrated with an example. Consider a chain of layers, L, M, N, O, P, Q, R. Layer L
|
||||
|
@ -413,6 +413,7 @@ private:
|
||||
const ParentLayerPoint& aHitTestPoint,
|
||||
HitTestResult* aOutHitResult);
|
||||
AsyncPanZoomController* FindRootApzcForLayersId(uint64_t aLayersId) const;
|
||||
AsyncPanZoomController* FindRootContentApzcForLayersId(uint64_t aLayersId) const;
|
||||
already_AddRefed<AsyncPanZoomController> GetMultitouchTarget(AsyncPanZoomController* aApzc1, AsyncPanZoomController* aApzc2) const;
|
||||
already_AddRefed<AsyncPanZoomController> CommonAncestor(AsyncPanZoomController* aApzc1, AsyncPanZoomController* aApzc2) const;
|
||||
already_AddRefed<AsyncPanZoomController> RootAPZCForLayersId(AsyncPanZoomController* aApzc) const;
|
||||
|
Loading…
Reference in New Issue
Block a user