Bug 1552608 - Handle fixed layer margins in ComputeTransformForNode(). r=tnikkel

Differential Revision: https://phabricator.services.mozilla.com/D48379

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Botond Ballo 2019-10-07 22:00:31 +00:00
Родитель c747ab0102
Коммит f8900bc22d
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -3271,6 +3271,14 @@ LayerToParentLayerMatrix4x4 APZCTreeManager::ComputeTransformForNode(
scrollTargetNode->IsAncestorOf(aNode), nullptr);
});
}
} else if (IsFixedToRootContent(aNode)) {
ParentLayerPoint translation = ViewAs<ParentLayerPixel>(
AsyncCompositionManager::ComputeFixedMarginsOffset(
mFixedLayerMargins, aNode->GetFixedPosSides()),
PixelCastJustification::ScreenIsParentLayerForRoot);
return aNode->GetTransform() *
CompleteAsyncTransform(
AsyncTransformComponentMatrix::Translation(translation));
}
// Otherwise, the node does not have an async transform.
return aNode->GetTransform() * AsyncTransformMatrix();