Bug 1501382 - Build display items within opacity:0 if we need them for APZ hit testing. r=kats

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Matt Woodrow 2018-12-12 16:57:52 +00:00
Родитель ec09b6b3b9
Коммит 010a2c6c02
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -2690,11 +2690,14 @@ void nsIFrame::BuildDisplayListForStackingContext(
// we're painting, and we're not animating opacity. Don't do this
// if we're going to compute plugin geometry, since opacity-0 plugins
// need to have display items built for them.
bool needHitTestInfo = aBuilder->BuildCompositorHitTestInfo() &&
StyleUI()->GetEffectivePointerEvents(this) !=
NS_STYLE_POINTER_EVENTS_NONE;
bool opacityItemForEventsAndPluginsOnly = false;
if (effects->mOpacity == 0.0 && aBuilder->IsForPainting() &&
!(disp->mWillChangeBitField & NS_STYLE_WILL_CHANGE_OPACITY) &&
!nsLayoutUtils::HasAnimationOfProperty(effectSet, eCSSProperty_opacity)) {
if (aBuilder->WillComputePluginGeometry()) {
if (needHitTestInfo || aBuilder->WillComputePluginGeometry()) {
opacityItemForEventsAndPluginsOnly = true;
} else {
return;