Bug 1518802 - Treat background-color animation as non-opaque even if the alpha channel is 1.0 at the moment. r=mattwoodrow

Differential Revision: https://phabricator.services.mozilla.com/D24656

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Hiroyuki Ikezoe 2019-03-24 22:41:02 +00:00
parent 4344ae1074
commit 01e23b1896

View File

@ -4838,7 +4838,12 @@ nsRegion nsDisplayBackgroundColor::GetOpaqueRegion(
nsDisplayListBuilder* aBuilder, bool* aSnap) const {
*aSnap = false;
if (mColor.a != 1) {
if (mColor.a != 1 ||
// Even if the current alpha channel is 1, we treat this item as if it's
// non-opaque if there is a background-color animation since the animation
// might change the alpha channel.
EffectCompositor::HasAnimationsForCompositor(
mFrame, DisplayItemType::TYPE_BACKGROUND_COLOR)) {
return nsRegion();
}