Bug 617525. Dispatch MozAfterPaint events to GetParentTarget. r=roc
authorOlli Pettay <Olli.Pettay@gmail.com>
Mon, 20 Dec 2010 14:37:43 +1300
changeset 59493 b4a5b419d513bfc9c4eaee444fc9efb45551ab36
parent 59492 6a5105de6bbd93006b125e097d32c7ec69cac33f
child 59494 10f6af33d3fb0279cef6dc360051a4de4f8c2b09
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersroc
bugs617525
milestone2.0b9pre
Bug 617525. Dispatch MozAfterPaint events to GetParentTarget. r=roc
layout/base/nsPresContext.cpp
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -2083,17 +2083,17 @@ nsPresContext::FireDOMPaintEvent()
         isCrossDocOnly = PR_FALSE;
       }
     }
     if (isCrossDocOnly) {
       // Don't tell the window about this event, it should not know that
       // something happened in a subdocument. Tell only the chrome event handler.
       // (Events sent to the window get propagated to the chrome event handler
       // automatically.)
-      dispatchTarget = do_QueryInterface(ourWindow->GetChromeEventHandler());
+      dispatchTarget = do_QueryInterface(ourWindow->GetParentTarget());
       if (!dispatchTarget) {
         return;
       }
     }
   }
   // Events sent to the window get propagated to the chrome event handler
   // automatically.
   nsCOMPtr<nsIDOMEvent> event;