From 7572d5deb5eeb1f64c0bfb12cd5109b989f1009c Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Fri, 23 Oct 2015 11:22:54 +1300 Subject: [PATCH] Bug 1216851 - Don't include event regions when deciding if we can flatten opacity. r=roc --- layout/base/nsDisplayList.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 441074446a5..f9eb12926a8 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -3962,6 +3962,10 @@ nsDisplayOpacity::ShouldFlattenAway(nsDisplayListBuilder* aBuilder) bool snap; uint32_t numChildren = 0; for (; numChildren < ArrayLength(children) && child; numChildren++, child = child->GetAbove()) { + if (child->GetType() == nsDisplayItem::TYPE_LAYER_EVENT_REGIONS) { + numChildren--; + continue; + } if (!child->CanApplyOpacity()) { return false; }