зеркало из https://github.com/mozilla/gecko-dev.git
Bug 836786 - Allow mousemove events to propagate from windowless plugins. r=josh
This commit is contained in:
Родитель
3e6918c03f
Коммит
2e7b45dab0
|
@ -1682,7 +1682,8 @@ nsPluginInstanceOwner::ProcessMouseDown(nsIDOMEvent* aMouseEvent)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsPluginInstanceOwner::DispatchMouseToPlugin(nsIDOMEvent* aMouseEvent)
|
||||
nsresult nsPluginInstanceOwner::DispatchMouseToPlugin(nsIDOMEvent* aMouseEvent,
|
||||
bool aAllowPropagate)
|
||||
{
|
||||
#if !defined(XP_MACOSX)
|
||||
if (!mPluginWindow || (mPluginWindow->type == NPWindowTypeWindow))
|
||||
|
@ -1699,7 +1700,9 @@ nsresult nsPluginInstanceOwner::DispatchMouseToPlugin(nsIDOMEvent* aMouseEvent)
|
|||
nsEventStatus rv = ProcessEvent(*mouseEvent);
|
||||
if (nsEventStatus_eConsumeNoDefault == rv) {
|
||||
aMouseEvent->PreventDefault();
|
||||
aMouseEvent->StopPropagation();
|
||||
if (!aAllowPropagate) {
|
||||
aMouseEvent->StopPropagation();
|
||||
}
|
||||
}
|
||||
if (mouseEvent->message == NS_MOUSE_BUTTON_UP) {
|
||||
mLastMouseDownButtonType = -1;
|
||||
|
@ -1741,8 +1744,10 @@ nsPluginInstanceOwner::HandleEvent(nsIDOMEvent* aEvent)
|
|||
}
|
||||
return DispatchMouseToPlugin(aEvent);
|
||||
}
|
||||
if (eventType.EqualsLiteral("mousemove") ||
|
||||
eventType.EqualsLiteral("click") ||
|
||||
if (eventType.EqualsLiteral("mousemove")) {
|
||||
return DispatchMouseToPlugin(aEvent, true);
|
||||
}
|
||||
if (eventType.EqualsLiteral("click") ||
|
||||
eventType.EqualsLiteral("dblclick") ||
|
||||
eventType.EqualsLiteral("mouseover") ||
|
||||
eventType.EqualsLiteral("mouseout")) {
|
||||
|
|
|
@ -365,7 +365,8 @@ private:
|
|||
nsRefPtr<nsPluginDOMContextMenuListener> mCXMenuListener;
|
||||
|
||||
nsresult DispatchKeyToPlugin(nsIDOMEvent* aKeyEvent);
|
||||
nsresult DispatchMouseToPlugin(nsIDOMEvent* aMouseEvent);
|
||||
nsresult DispatchMouseToPlugin(nsIDOMEvent* aMouseEvent,
|
||||
bool aAllowPropagate = false);
|
||||
nsresult DispatchFocusToPlugin(nsIDOMEvent* aFocusEvent);
|
||||
|
||||
int mLastMouseDownButtonType;
|
||||
|
|
Загрузка…
Ссылка в новой задаче