зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1514653 - Use the reference frame of the first flattened effect when recycling the layer r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D17079 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
7292107f24
Коммит
f534fe0743
|
@ -4416,6 +4416,7 @@ void ContainerState::ProcessDisplayItems(nsDisplayList* aList) {
|
|||
// AGR and ASR for the container item that was flattened.
|
||||
AnimatedGeometryRoot* containerAGR = nullptr;
|
||||
const ActiveScrolledRoot* containerASR = nullptr;
|
||||
nsIFrame* containerReferenceFrame = nullptr;
|
||||
RefPtr<TransformClipNode> transformNode = nullptr;
|
||||
|
||||
const auto InTransform = [&]() { return transformNode; };
|
||||
|
@ -5044,7 +5045,8 @@ void ContainerState::ProcessDisplayItems(nsDisplayList* aList) {
|
|||
if (!paintedLayerData->mLayer) {
|
||||
// Try to recycle the old layer of this display item.
|
||||
RefPtr<PaintedLayer> layer = AttemptToRecyclePaintedLayer(
|
||||
itemAGR, item, topLeft, referenceFrame);
|
||||
itemAGR, item, topLeft,
|
||||
inEffect ? containerReferenceFrame : referenceFrame);
|
||||
if (layer) {
|
||||
paintedLayerData->mLayer = layer;
|
||||
|
||||
|
@ -5066,14 +5068,16 @@ void ContainerState::ProcessDisplayItems(nsDisplayList* aList) {
|
|||
selectedLayer = nullptr;
|
||||
containerAGR = nullptr;
|
||||
containerASR = nullptr;
|
||||
containerReferenceFrame = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
const auto SelectLayerIfNeeded = [&]() {
|
||||
if (!selectedLayer) {
|
||||
selectedLayer = paintedLayerData;
|
||||
containerAGR = item->GetAnimatedGeometryRoot();
|
||||
containerASR = item->GetActiveScrolledRoot();
|
||||
containerAGR = itemAGR;
|
||||
containerASR = itemASR;
|
||||
containerReferenceFrame = const_cast<nsIFrame*>(referenceFrame);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче