зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1315862 Part1: Stop dispatching pointer events in the system group. r=masayuki,smaug
MozReview-Commit-ID: 8Xqp3bxlRFt --HG-- extra : rebase_source : 25afbefb19e5ae613e9e493ea2f275a36004d523
This commit is contained in:
Родитель
e8a2815ded
Коммит
5d6aec8c60
|
@ -407,7 +407,8 @@ EventTargetChainItem::HandleEventTargetChain(
|
|||
}
|
||||
aVisitor.mEvent->mFlags.mInBubblingPhase = false;
|
||||
|
||||
if (!aVisitor.mEvent->mFlags.mInSystemGroup) {
|
||||
if (!aVisitor.mEvent->mFlags.mInSystemGroup &&
|
||||
aVisitor.mEvent->IsAllowedToDispatchInSystemGroup()) {
|
||||
// Dispatch to the system event group. Make sure to clear the
|
||||
// STOP_DISPATCH flag since this resets for each event group.
|
||||
aVisitor.mEvent->mFlags.mPropagationStopped = false;
|
||||
|
|
|
@ -553,6 +553,10 @@ public:
|
|||
* Whether the event should cause a DOM event.
|
||||
*/
|
||||
bool IsAllowedToDispatchDOMEvent() const;
|
||||
/**
|
||||
* Whether the event should be dispatched in system group.
|
||||
*/
|
||||
bool IsAllowedToDispatchInSystemGroup() const;
|
||||
/**
|
||||
* Initialize mComposed
|
||||
*/
|
||||
|
|
|
@ -416,6 +416,15 @@ WidgetEvent::IsAllowedToDispatchDOMEvent() const
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
WidgetEvent::IsAllowedToDispatchInSystemGroup() const
|
||||
{
|
||||
// We don't expect to implement default behaviors with pointer events because
|
||||
// if we do, prevent default on mouse events can't prevent default behaviors
|
||||
// anymore.
|
||||
return mClass != ePointerEventClass;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* mozilla::WidgetInputEvent
|
||||
******************************************************************************/
|
||||
|
|
Загрузка…
Ссылка в новой задаче