Bug 1434580, ensure proper mouseover handling, r=masayuki
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Fri, 02 Feb 2018 13:25:26 +0200
changeset 402190 bfd4bdfd40b43d0491c66af5b599659427e4e795
parent 402189 66e1fd211ecab25135a796a7eeab369068e416c0
child 402191 5be11180f9bc3a678a86ba4fd3ecb5ca45df4289
push id99507
push useropettay@mozilla.com
push dateFri, 02 Feb 2018 11:26:44 +0000
treeherdermozilla-inbound@bfd4bdfd40b4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1434580
milestone60.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
Bug 1434580, ensure proper mouseover handling, r=masayuki
dom/events/EventStateManager.cpp
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -4315,19 +4315,20 @@ EventStateManager::NotifyMouseOver(Widge
   if (aContent == wrapper->mFirstOverEventElement)
     return;
 
   // Check to see if we're a subdocument and if so update the parent
   // document's ESM state to indicate that the mouse is over the
   // content associated with our subdocument.
   EnsureDocument(mPresContext);
   if (nsIDocument *parentDoc = mDocument->GetParentDocument()) {
-    if (nsIContent *docContent = parentDoc->FindContentForSubDocument(mDocument)) {
+    if (nsCOMPtr<nsIContent> docContent =
+          parentDoc->FindContentForSubDocument(mDocument)) {
       if (nsIPresShell *parentShell = parentDoc->GetShell()) {
-        EventStateManager* parentESM =
+        RefPtr<EventStateManager> parentESM =
           parentShell->GetPresContext()->EventStateManager();
         parentESM->NotifyMouseOver(aMouseEvent, docContent);
       }
     }
   }
   // Firing the DOM event in the parent document could cause all kinds
   // of havoc.  Reverify and take care.
   if (wrapper->mLastOverElement == aContent)