зеркало из https://github.com/mozilla/gecko-dev.git
Bug 539356 - Handled scrolled inactive layers trees correctly. r=roc
This commit is contained in:
Родитель
a980777bb7
Коммит
6ad714c685
|
@ -91,6 +91,8 @@ struct LayerPropertiesBase : public LayerProperties
|
|||
virtual nsIntRect ComputeDifferences(Layer* aRoot,
|
||||
NotifySubDocInvalidationFunc aCallback);
|
||||
|
||||
virtual void MoveBy(const nsIntPoint& aOffset);
|
||||
|
||||
nsIntRect ComputeChange(NotifySubDocInvalidationFunc aCallback)
|
||||
{
|
||||
bool transformChanged = mTransform != mLayer->GetTransform();
|
||||
|
@ -343,6 +345,12 @@ LayerPropertiesBase::ComputeDifferences(Layer* aRoot, NotifySubDocInvalidationFu
|
|||
return ComputeChange(aCallback);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
LayerPropertiesBase::MoveBy(const nsIntPoint& aOffset)
|
||||
{
|
||||
mTransform.TranslatePost(gfxPoint3D(aOffset.x, aOffset.y, 0));
|
||||
}
|
||||
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -59,6 +59,9 @@ struct LayerProperties
|
|||
*/
|
||||
virtual nsIntRect ComputeDifferences(Layer* aRoot,
|
||||
NotifySubDocInvalidationFunc aCallback) = 0;
|
||||
|
||||
|
||||
virtual void MoveBy(const nsIntPoint& aOffset) = 0;
|
||||
};
|
||||
|
||||
} // namespace layers
|
||||
|
|
|
@ -2378,6 +2378,8 @@ FrameLayerBuilder::AddThebesDisplayItem(ThebesLayer* aLayer,
|
|||
tempManager->SetRoot(layer);
|
||||
layerBuilder->WillEndTransaction();
|
||||
|
||||
nsIntPoint offset = GetLastPaintOffset(aLayer) - GetTranslationForThebesLayer(aLayer);
|
||||
props->MoveBy(-offset);
|
||||
nsIntRect invalid = props->ComputeDifferences(layer, nullptr);
|
||||
if (aLayerState == LAYER_SVG_EFFECTS) {
|
||||
invalid = nsSVGIntegrationUtils::AdjustInvalidAreaForSVGEffects(aItem->GetUnderlyingFrame(), invalid);
|
||||
|
|
Загрузка…
Ссылка в новой задаче