зеркало из https://github.com/mozilla/gecko-dev.git
Bug 950993 - Fix async scrolling of fixed layers within scrollable sub-layers. r=roc
Fixed layers are relative to their nearest scrollable ancestor, so when we encounter a scrollable layer in AlignFixedAndStickyLayers, reset the transform and sub-tree root to start from that scrollable layer. This fixes async scrolling of the fixed header in the Firefox marketplace on B2G.
This commit is contained in:
Родитель
4db7806fe4
Коммит
9123b70f17
|
@ -326,6 +326,16 @@ AsyncCompositionManager::AlignFixedAndStickyLayers(Layer* aLayer,
|
|||
return;
|
||||
}
|
||||
|
||||
// Fixed layers are relative to their nearest scrollable layer, so when we
|
||||
// encounter a scrollable layer, reset the transform to that layer and remove
|
||||
// the fixed margins.
|
||||
if (aLayer->AsContainerLayer() &&
|
||||
aLayer->AsContainerLayer()->GetFrameMetrics().IsScrollable() &&
|
||||
aLayer != aTransformedSubtreeRoot) {
|
||||
AlignFixedAndStickyLayers(aLayer, aLayer, aLayer->GetTransform(), LayerMargin(0, 0, 0, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
for (Layer* child = aLayer->GetFirstChild();
|
||||
child; child = child->GetNextSibling()) {
|
||||
AlignFixedAndStickyLayers(child, aTransformedSubtreeRoot,
|
||||
|
|
Загрузка…
Ссылка в новой задаче