aboutsummaryrefslogtreecommitdiff
path: root/www/firefox/files/patch-bug1423159
diff options
context:
space:
mode:
Diffstat (limited to 'www/firefox/files/patch-bug1423159')
-rw-r--r--www/firefox/files/patch-bug142315969
1 files changed, 69 insertions, 0 deletions
diff --git a/www/firefox/files/patch-bug1423159 b/www/firefox/files/patch-bug1423159
new file mode 100644
index 000000000000..85e7148b5b91
--- /dev/null
+++ b/www/firefox/files/patch-bug1423159
@@ -0,0 +1,69 @@
+commit 6508b1194af3
+Author: Olli Pettay <Olli.Pettay@helsinki.fi>
+Date: Sun Dec 10 14:49:49 2017 -0500
+
+ Bug 1423159 - Ensure proper multiprocess mouse enter/exit handling. r=stone, a=abillings
+
+ --HG--
+ extra : source : 689357a9394830406290ae1fb2200521a99bd7ad
+---
+ dom/events/EventStateManager.cpp | 19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+diff --git dom/events/EventStateManager.cpp dom/events/EventStateManager.cpp
+index 441036b5c5bf..f076f8ae0f09 100644
+--- dom/events/EventStateManager.cpp
++++ dom/events/EventStateManager.cpp
+@@ -4041,33 +4041,36 @@ EventStateManager::DispatchMouseOrPointerEvent(WidgetMouseEvent* aMouseEvent,
+ return nullptr;
+ }
+
++ nsCOMPtr<nsIContent> targetContent = aTargetContent;
++ nsCOMPtr<nsIContent> relatedContent = aRelatedContent;
++
+ nsAutoPtr<WidgetMouseEvent> dispatchEvent;
+ CreateMouseOrPointerWidgetEvent(aMouseEvent, aMessage,
+- aRelatedContent, dispatchEvent);
++ relatedContent, dispatchEvent);
+
+ AutoWeakFrame previousTarget = mCurrentTarget;
+- mCurrentTargetContent = aTargetContent;
++ mCurrentTargetContent = targetContent;
+
+ nsIFrame* targetFrame = nullptr;
+
+ nsEventStatus status = nsEventStatus_eIgnore;
+- ESMEventCB callback(aTargetContent);
+- EventDispatcher::Dispatch(aTargetContent, mPresContext, dispatchEvent, nullptr,
++ ESMEventCB callback(targetContent);
++ EventDispatcher::Dispatch(targetContent, mPresContext, dispatchEvent, nullptr,
+ &status, &callback);
+
+ if (mPresContext) {
+ // Although the primary frame was checked in event callback, it may not be
+ // the same object after event dispatch and handling, so refetch it.
+- targetFrame = mPresContext->GetPrimaryFrameFor(aTargetContent);
++ targetFrame = mPresContext->GetPrimaryFrameFor(targetContent);
+
+ // If we are entering/leaving remote content, dispatch a mouse enter/exit
+ // event to the remote frame.
+- if (IsRemoteTarget(aTargetContent)) {
++ if (IsRemoteTarget(targetContent)) {
+ if (aMessage == eMouseOut) {
+ // For remote content, send a "top-level" widget mouse exit event.
+ nsAutoPtr<WidgetMouseEvent> remoteEvent;
+ CreateMouseOrPointerWidgetEvent(aMouseEvent, eMouseExitFromWidget,
+- aRelatedContent, remoteEvent);
++ relatedContent, remoteEvent);
+ remoteEvent->mExitFrom = WidgetMouseEvent::eTopLevel;
+
+ // mCurrentTarget is set to the new target, so we must reset it to the
+@@ -4079,7 +4082,7 @@ EventStateManager::DispatchMouseOrPointerEvent(WidgetMouseEvent* aMouseEvent,
+ } else if (aMessage == eMouseOver) {
+ nsAutoPtr<WidgetMouseEvent> remoteEvent;
+ CreateMouseOrPointerWidgetEvent(aMouseEvent, eMouseEnterIntoWidget,
+- aRelatedContent, remoteEvent);
++ relatedContent, remoteEvent);
+ HandleCrossProcessEvent(remoteEvent, &status);
+ }
+ }