Bug 1100140 - When a scrollable layer is marked as fixed-position, don't treat it as fixed relative to itself. r=botond

This commit is contained in:
Kartikaya Gupta 2014-11-19 13:41:48 -05:00
parent d474b181de
commit ffa15da173

View File

@ -267,7 +267,10 @@ AsyncCompositionManager::AlignFixedAndStickyLayers(Layer* aLayer,
const Matrix4x4& aCurrentTransformForRoot,
const LayerMargin& aFixedLayerMargins)
{
// If aLayer == aTransformedSubtreeRoot, then treat aLayer as fixed relative
// to the ancestor scrollable layer rather than relative to itself.
bool isRootFixed = aLayer->GetIsFixedPosition() &&
aLayer != aTransformedSubtreeRoot &&
!aLayer->GetParent()->GetIsFixedPosition();
bool isStickyForSubtree = aLayer->GetIsStickyPosition() &&
aLayer->GetStickyScrollContainerId() == aTransformScrollId;