From 25e665baf6a8449c8a12d06ef7011df34731cc9a Mon Sep 17 00:00:00 2001 From: Timothy Nikkel Date: Mon, 8 Jun 2015 13:30:40 -0500 Subject: [PATCH] Bug 1172310. Don't add viewport frame bounds to the layer event regions because they are never the result of hit testing. r=roc For regular, display list based, hit testing viewport frames never add any items to the display list. So are never "hit". Layer event regions should follow this same path. The code that this replaces was a partial, incorrect, fix for this problem (from bug 1121033). --- layout/base/nsDisplayList.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index a5071a964f5..4852f5884ba 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -3125,14 +3125,9 @@ nsDisplayLayerEventRegions::AddFrame(nsDisplayListBuilder* aBuilder, } if (!aFrame->GetParent()) { MOZ_ASSERT(aFrame->GetType() == nsGkAtoms::viewportFrame); - nsSubDocumentFrame* subdoc = static_cast( - nsLayoutUtils::GetCrossDocParentFrame(aFrame)); - if (subdoc && subdoc->PassPointerEventsToChildren()) { - // If this viewport frame is for a subdocument with - // mozpasspointerevents, then we don't want to add the viewport itself - // to the event regions. Instead we want to add only subframes. - return; - } + // Viewport frames are never event targets, other frames, like canvas frames, + // are the event targets for any regions viewport frames may cover. + return; } uint8_t pointerEvents = aFrame->StyleVisibility()->GetEffectivePointerEvents(aFrame); if (pointerEvents == NS_STYLE_POINTER_EVENTS_NONE) {