diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index af74530a714..ee7d328ed11 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -2715,7 +2715,8 @@ already_AddRefed nsDisplayOpacity::BuildLayer(nsDisplayListBuilder* aBuilder, LayerManager* aManager, const ContainerParameters& aContainerParameters) { - if (mFrame->GetStyleDisplay()->mOpacity == 0) { + if (mFrame->GetStyleDisplay()->mOpacity == 0 && mFrame->GetContent() && + !nsLayoutUtils::HasAnimationsForCompositor(mFrame->GetContent(), eCSSProperty_opacity)) { return nullptr; } nsRefPtr container = aManager->GetLayerBuilder()->