mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1552608 - Add a helper APZCTreeManager::IsFixedToRootContent(node). r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D48378 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
194efdc5a5
commit
c747ab0102
@ -3193,6 +3193,18 @@ already_AddRefed<AsyncPanZoomController> APZCTreeManager::CommonAncestor(
|
||||
return ancestor.forget();
|
||||
}
|
||||
|
||||
bool APZCTreeManager::IsFixedToRootContent(
|
||||
const HitTestingTreeNode* aNode) const {
|
||||
mTreeLock.AssertCurrentThreadIn();
|
||||
ScrollableLayerGuid::ViewID fixedTarget = aNode->GetFixedPosTarget();
|
||||
if (fixedTarget == ScrollableLayerGuid::NULL_SCROLL_ID) {
|
||||
return false;
|
||||
}
|
||||
RefPtr<AsyncPanZoomController> targetApzc =
|
||||
GetTargetAPZC(aNode->GetLayersId(), fixedTarget);
|
||||
return targetApzc && targetApzc->IsRootContent();
|
||||
}
|
||||
|
||||
LayerToParentLayerMatrix4x4 APZCTreeManager::ComputeTransformForNode(
|
||||
const HitTestingTreeNode* aNode) const {
|
||||
mTreeLock.AssertCurrentThreadIn();
|
||||
|
@ -630,6 +630,7 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
|
||||
AsyncPanZoomController* aApzc1, AsyncPanZoomController* aApzc2) const;
|
||||
already_AddRefed<AsyncPanZoomController> CommonAncestor(
|
||||
AsyncPanZoomController* aApzc1, AsyncPanZoomController* aApzc2) const;
|
||||
bool IsFixedToRootContent(const HitTestingTreeNode* aNode) const;
|
||||
/**
|
||||
* Perform hit testing for a touch-start event.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user