diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 5f36f51c9f91..21267c4e00d6 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -72,6 +72,7 @@ #include "nsDOMTokenList.h" #include "mozilla/RuleNodeCacheConditions.h" #include "nsCSSProps.h" +#include "nsPluginFrame.h" // GetCurrentTime is defined in winbase.h as zero argument macro forwarding to // GetTickCount(). @@ -3215,6 +3216,13 @@ nsDisplayLayerEventRegions::AddFrame(nsDisplayListBuilder* aBuilder, } if (aBuilder->GetAncestorHasApzAwareEventHandler()) { mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, borderBox); + } else if (aFrame->GetType() == nsGkAtoms::objectFrame) { + // If the frame is a plugin frame and wants to handle wheel events as + // default action, we should add the frame to dispatch-to-content region. + nsPluginFrame* pluginFrame = do_QueryFrame(aFrame); + if (pluginFrame && pluginFrame->WantsToHandleWheelEventAsDefaultAction()) { + mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, borderBox); + } } // Touch action region