diff --git a/editor/base/nsEditorEventListeners.cpp b/editor/base/nsEditorEventListeners.cpp index acff9f53fd7..0a37f5c080b 100644 --- a/editor/base/nsEditorEventListeners.cpp +++ b/editor/base/nsEditorEventListeners.cpp @@ -42,7 +42,7 @@ #include "nsIPrivateCompositionEvent.h" #include "nsIEditorMailSupport.h" #include "nsIDocumentEncoder.h" -#include "nsIPrivateDOMEvent.h" +#include "nsIDOMNSUIEvent.h" #include "nsIPref.h" #include "nsILookAndFeel.h" #include "nsIPresContext.h" @@ -158,12 +158,12 @@ nsTextEditorKeyListener::KeyPress(nsIDOMEvent* aKeyEvent) return NS_OK; } - nsCOMPtr privateEvent = do_QueryInterface(aKeyEvent); - if(privateEvent) + nsCOMPtr nsUIEvent = do_QueryInterface(aKeyEvent); + if(nsUIEvent) { - PRBool dispatchStopped; - privateEvent->IsDispatchStopped(&dispatchStopped); - if(dispatchStopped) + PRBool defaultPrevented; + nsUIEvent->GetPreventDefault(&defaultPrevented); + if(defaultPrevented) return NS_OK; } diff --git a/editor/libeditor/text/nsEditorEventListeners.cpp b/editor/libeditor/text/nsEditorEventListeners.cpp index acff9f53fd7..0a37f5c080b 100644 --- a/editor/libeditor/text/nsEditorEventListeners.cpp +++ b/editor/libeditor/text/nsEditorEventListeners.cpp @@ -42,7 +42,7 @@ #include "nsIPrivateCompositionEvent.h" #include "nsIEditorMailSupport.h" #include "nsIDocumentEncoder.h" -#include "nsIPrivateDOMEvent.h" +#include "nsIDOMNSUIEvent.h" #include "nsIPref.h" #include "nsILookAndFeel.h" #include "nsIPresContext.h" @@ -158,12 +158,12 @@ nsTextEditorKeyListener::KeyPress(nsIDOMEvent* aKeyEvent) return NS_OK; } - nsCOMPtr privateEvent = do_QueryInterface(aKeyEvent); - if(privateEvent) + nsCOMPtr nsUIEvent = do_QueryInterface(aKeyEvent); + if(nsUIEvent) { - PRBool dispatchStopped; - privateEvent->IsDispatchStopped(&dispatchStopped); - if(dispatchStopped) + PRBool defaultPrevented; + nsUIEvent->GetPreventDefault(&defaultPrevented); + if(defaultPrevented) return NS_OK; }