author | Masayuki Nakano <masayuki@d-toybox.com> |
Sat, 17 Oct 2015 15:50:09 +0900 | |
changeset 268175 | 380f6425759c35716dd0382859c8a15b74f186b8 |
parent 268174 | e99568ffca32090c9a761240d85c9a7ae033e348 |
child 268176 | 108585f1f680f621e58db5fa0c1560867b9673f7 |
push id | 29543 |
push user | philringnalda@gmail.com |
push date | Sun, 18 Oct 2015 02:55:22 +0000 |
treeherder | mozilla-central@e8c7dfe727cd [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mstange |
bugs | 1215434 |
milestone | 44.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -67,16 +67,17 @@ #include "FrameLayerBuilder.h" #include "mozilla/EventStateManager.h" #include "RestyleManager.h" #include "nsCaret.h" #include "nsISelection.h" #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(). #ifdef GetCurrentTime #undef GetCurrentTime #endif using namespace mozilla; @@ -3210,16 +3211,23 @@ nsDisplayLayerEventRegions::AddFrame(nsD if (borderBoxHasRoundedCorners || (aFrame->GetStateBits() & NS_FRAME_SVG_LAYOUT)) { mMaybeHitRegion.Or(mMaybeHitRegion, borderBox); } else { mHitRegion.Or(mHitRegion, borderBox); } 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 uint32_t touchAction = nsLayoutUtils::GetTouchActionFromFrame(aFrame); if (touchAction & NS_STYLE_TOUCH_ACTION_NONE) { mNoActionRegion.Or(mNoActionRegion, borderBox); } else {