mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Bug 1215434 part.2 Add plugin frame rect to dispatch-to-content region if it wants to handle wheel event as default action r=mstange
This commit is contained in:
parent
07adf60de2
commit
f28a82b6bc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user