Bug 503428 Caret-moved events missing from Thunderbird Subject field r=surkov
authorGinn Chen <ginn.chen@sun.com>
Wed, 23 Jun 2010 17:28:09 +0800
changeset 44176 35f1e03ce92849ff187e4f4134f6009eb0daf6a8
parent 44175 075fe10df9c3ec6ac6752912502ad72a7ee52043
child 44177 28962e3d0ed3bea6f36a218ee244dd3aac465707
push id14012
push userginn.chen@sun.com
push dateWed, 23 Jun 2010 09:37:55 +0000
treeherdermozilla-central@8f05ab3aa198 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs503428
milestone1.9.3a6pre
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
Bug 503428 Caret-moved events missing from Thunderbird Subject field r=surkov
accessible/src/base/nsRootAccessible.cpp
--- a/accessible/src/base/nsRootAccessible.cpp
+++ b/accessible/src/base/nsRootAccessible.cpp
@@ -71,16 +71,17 @@
 #include "nsISelectionPrivate.h"
 #include "nsIServiceManager.h"
 #include "nsPIDOMWindow.h"
 #include "nsIWebBrowserChrome.h"
 #include "nsReadableUtils.h"
 #include "nsRootAccessible.h"
 #include "nsIDOMNSEventTarget.h"
 #include "nsIDOMDocumentEvent.h"
+#include "nsIPrivateDOMEvent.h"
 #include "nsFocusManager.h"
 #include "mozilla/dom/Element.h"
 
 
 #ifdef MOZ_XUL
 #include "nsXULTreeAccessible.h"
 #include "nsIXULDocument.h"
 #include "nsIXULWindow.h"
@@ -478,16 +479,19 @@ nsRootAccessible::FireCurrentFocusEvent(
         // then simulate the focus event for the document.
         nsINode *document = targetNode->GetOwnerDoc();
         if (targetNode == nsCoreUtils::GetRoleContent(document)) {
           HandleEventWithTarget(event, document);
           return;
         }
 
         // Otherwise simulate the focus event for currently focused node.
+        nsCOMPtr<nsIPrivateDOMEvent> privateEvent(do_QueryInterface(event));
+        nsCOMPtr<nsIDOMEventTarget> target(do_QueryInterface(focusedNode));
+        privateEvent->SetTarget(target);
         HandleEventWithTarget(event, targetNode);
       }
     }
   }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsIDOMEventListener