Bug 698929 - Implement event.stopImmediatePropagation, r=jst
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Fri, 04 Nov 2011 19:17:19 +0200
changeset 79768 ae9e5bf847fc727fc0358bdf6619922b464f2136
parent 79767 5ebd59b5a94ab8eb91ebdbf70a4e3e90878f6f00
child 79799 966d6b57146d5e4f5107128d314bdbbf39c09402
child 105301 89fff0ee52d5e237060a44b133a68e723dab8ae4
push id21424
push useropettay@mozilla.com
push dateFri, 04 Nov 2011 18:33:41 +0000
treeherdermozilla-central@ae9e5bf847fc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjst
bugs698929
milestone10.0a1
first release with
nightly linux32
ae9e5bf847fc / 10.0a1 / 20111105031111 / files
nightly linux64
ae9e5bf847fc / 10.0a1 / 20111105031111 / files
nightly mac
ae9e5bf847fc / 10.0a1 / 20111105031111 / files
nightly win32
ae9e5bf847fc / 10.0a1 / 20111105031111 / files
nightly win64
ae9e5bf847fc / 10.0a1 / 20111105031111 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 698929 - Implement event.stopImmediatePropagation, r=jst
content/events/src/nsDOMEvent.cpp
content/events/src/nsEventDispatcher.cpp
content/events/src/nsEventListenerManager.cpp
content/events/test/Makefile.in
content/events/test/test_bug698929.html
dom/indexedDB/nsIIDBVersionChangeEvent.idl
dom/interfaces/events/nsIDOMAnimationEvent.idl
dom/interfaces/events/nsIDOMBeforeUnloadEvent.idl
dom/interfaces/events/nsIDOMCloseEvent.idl
dom/interfaces/events/nsIDOMCommandEvent.idl
dom/interfaces/events/nsIDOMCompositionEvent.idl
dom/interfaces/events/nsIDOMCustomEvent.idl
dom/interfaces/events/nsIDOMDataContainerEvent.idl
dom/interfaces/events/nsIDOMDeviceMotionEvent.idl
dom/interfaces/events/nsIDOMDeviceOrientationEvent.idl
dom/interfaces/events/nsIDOMDragEvent.idl
dom/interfaces/events/nsIDOMEvent.idl
dom/interfaces/events/nsIDOMHashChangeEvent.idl
dom/interfaces/events/nsIDOMKeyEvent.idl
dom/interfaces/events/nsIDOMMessageEvent.idl
dom/interfaces/events/nsIDOMMouseEvent.idl
dom/interfaces/events/nsIDOMMouseScrollEvent.idl
dom/interfaces/events/nsIDOMMozTouchEvent.idl
dom/interfaces/events/nsIDOMMutationEvent.idl
dom/interfaces/events/nsIDOMNotifyAudioAvailableEvent.idl
dom/interfaces/events/nsIDOMNotifyPaintEvent.idl
dom/interfaces/events/nsIDOMPageTransitionEvent.idl
dom/interfaces/events/nsIDOMPopStateEvent.idl
dom/interfaces/events/nsIDOMPopupBlockedEvent.idl
dom/interfaces/events/nsIDOMProgressEvent.idl
dom/interfaces/events/nsIDOMScrollAreaEvent.idl
dom/interfaces/events/nsIDOMSimpleGestureEvent.idl
dom/interfaces/events/nsIDOMSmartCardEvent.idl
dom/interfaces/events/nsIDOMTouchEvent.idl
dom/interfaces/events/nsIDOMTransitionEvent.idl
dom/interfaces/events/nsIDOMUIEvent.idl
dom/interfaces/load-save/nsIDOMLSProgressEvent.idl
dom/interfaces/smil/nsIDOMTimeEvent.idl
dom/interfaces/storage/nsIDOMStorageEvent.idl
dom/interfaces/storage/nsIDOMStorageEventObsolete.idl
dom/interfaces/svg/nsIDOMSVGEvent.idl
dom/interfaces/svg/nsIDOMSVGZoomEvent.idl
dom/interfaces/threads/nsIDOMWorkers.idl
dom/interfaces/xul/nsIDOMXULCommandEvent.idl
security/manager/ssl/src/nsSmartCardEvent.cpp
widget/public/nsGUIEvent.h
--- a/content/events/src/nsDOMEvent.cpp
+++ b/content/events/src/nsDOMEvent.cpp
@@ -417,16 +417,24 @@ nsDOMEvent::GetTimeStamp(PRUint64* aTime
 
 NS_IMETHODIMP
 nsDOMEvent::StopPropagation()
 {
   mEvent->flags |= NS_EVENT_FLAG_STOP_DISPATCH;
   return NS_OK;
 }
 
+NS_IMETHODIMP
+nsDOMEvent::StopImmediatePropagation()
+{
+  mEvent->flags |=
+    (NS_EVENT_FLAG_STOP_DISPATCH_IMMEDIATELY | NS_EVENT_FLAG_STOP_DISPATCH);
+  return NS_OK;
+}
+
 static nsIDocument* GetDocumentForReport(nsEvent* aEvent)
 {
   nsCOMPtr<nsINode> node = do_QueryInterface(aEvent->currentTarget);
   if (node)
     return node->OwnerDoc();
 
   nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aEvent->currentTarget);
   if (!window)
--- a/content/events/src/nsEventDispatcher.cpp
+++ b/content/events/src/nsEventDispatcher.cpp
@@ -371,19 +371,19 @@ nsEventTargetChainItem::HandleEventTarge
       }
     }
     item = item->mParent;
   }
   aVisitor.mEvent->flags &= ~NS_EVENT_FLAG_BUBBLE;
 
   if (!(aFlags & NS_EVENT_FLAG_SYSTEM_EVENT)) {
     // Dispatch to the system event group.  Make sure to clear the
-    // STOP_DISPATCH flag since this resets for each event group
-    // per DOM3 Events.
-    aVisitor.mEvent->flags &= ~NS_EVENT_FLAG_STOP_DISPATCH;
+    // STOP_DISPATCH flag since this resets for each event group.
+    aVisitor.mEvent->flags &=
+      ~(NS_EVENT_FLAG_STOP_DISPATCH | NS_EVENT_FLAG_STOP_DISPATCH_IMMEDIATELY);
 
     // Setting back the original target of the event.
     aVisitor.mEvent->target = aVisitor.mEvent->originalTarget;
 
     // Special handling if PresShell (or some other caller)
     // used a callback object.
     if (aCallback) {
       aCallback->HandleEvent(aVisitor);
@@ -391,16 +391,21 @@ nsEventTargetChainItem::HandleEventTarge
 
     // Retarget for system event group (which does the default handling too).
     // Setting back the target which was used also for default event group.
     aVisitor.mEvent->target = firstTarget;
     HandleEventTargetChain(aVisitor, aFlags | NS_EVENT_FLAG_SYSTEM_EVENT,
                            aCallback,
                            createdELMs != nsEventListenerManager::sCreatedCount,
                            aPusher);
+
+    // After dispatch, clear all the propagation flags so that
+    // system group listeners don't affect to the event.
+    aVisitor.mEvent->flags &=
+      ~(NS_EVENT_FLAG_STOP_DISPATCH | NS_EVENT_FLAG_STOP_DISPATCH_IMMEDIATELY);
   }
 
   return NS_OK;
 }
 
 #define NS_CHAIN_POOL_SIZE 128
 
 class ChainItemPool {
--- a/content/events/src/nsEventListenerManager.cpp
+++ b/content/events/src/nsEventListenerManager.cpp
@@ -759,16 +759,19 @@ nsEventListenerManager::HandleEventInter
   if (*aEventStatus == nsEventStatus_eConsumeNoDefault) {
     aEvent->flags |= NS_EVENT_FLAG_NO_DEFAULT;
   }
 
   nsAutoTObserverArray<nsListenerStruct, 2>::EndLimitedIterator iter(mListeners);
   nsAutoPopupStatePusher popupStatePusher(nsDOMEvent::GetEventPopupControlState(aEvent));
   bool hasListener = false;
   while (iter.HasMore()) {
+    if (aEvent->flags & NS_EVENT_FLAG_STOP_DISPATCH_IMMEDIATELY) {
+      break;
+    }
     nsListenerStruct* ls = &iter.GetNext();
     // Check that the phase is same in event and event listener.
     // Handle only trusted events, except when listener permits untrusted events.
     if (ListenerCanHandle(ls, aEvent)) {
       hasListener = true;
       // XXX The (mFlags & aFlags) test here seems fragile. Shouldn't we
       // specifically only test the capture/bubble flags.
       if ((ls->mFlags & aFlags & ~NS_EVENT_FLAG_SYSTEM_EVENT) &&
--- a/content/events/test/Makefile.in
+++ b/content/events/test/Makefile.in
@@ -106,16 +106,17 @@ include $(topsrcdir)/config/rules.mk
 		test_bug656954.html \
 		test_bug659350.html \
 		test_bug662678.html \
 		test_bug667919-1.html \
 		test_bug667919-2.html \
 		test_bug667612.html \
 		empty.js \
 		test_bug689564.html \
+		test_bug698929.html \
 		$(NULL)
 
 #bug 585630
 ifneq (mobile,$(MOZ_BUILD_APP))
 _TEST_FILES += \
 		test_dragstart.html \
 		$(NULL)
 endif
new file mode 100644
--- /dev/null
+++ b/content/events/test/test_bug698929.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=698929
+-->
+<head>
+  <title>Test for Bug 698929</title>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=698929">Mozilla Bug 698929</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+  
+</div>
+<pre id="test">
+<script type="application/javascript">
+
+/** Test for Bug 698929 **/
+
+  var e = document.createEvent("Event");
+  e.initEvent("foo", true, true);
+  var c = 0;
+  var b = 0;
+  document.addEventListener("foo",
+    function() {
+      ++c;
+    });
+  document.body.addEventListener("foo", function(e) {
+    ++b;
+    e.stopImmediatePropagation();
+  });
+  document.body.addEventListener("foo", function(e) {
+    ++b;
+  });
+  document.body.dispatchEvent(e);
+  document.documentElement.dispatchEvent(e);
+  is(c, 1, "Listener in the document should have been called once.");
+  is(b, 1, "Listener in the body should have been called once.");
+
+
+
+</script>
+</pre>
+</body>
+</html>
--- a/dom/indexedDB/nsIIDBVersionChangeEvent.idl
+++ b/dom/indexedDB/nsIIDBVersionChangeEvent.idl
@@ -34,14 +34,14 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(2c5159dc-7d71-4fc6-a3b3-884ed7586456)]
+[scriptable, builtinclass, uuid(52e21085-d6cd-4886-a5eb-19b47d13abf6)]
 interface nsIIDBVersionChangeEvent : nsIDOMEvent
 {
   readonly attribute unsigned long long oldVersion;
   readonly attribute unsigned long long newVersion;
 };
--- a/dom/interfaces/events/nsIDOMAnimationEvent.idl
+++ b/dom/interfaces/events/nsIDOMAnimationEvent.idl
@@ -38,17 +38,17 @@
 #include "nsIDOMEvent.idl"
 
 /**
  * Animation events are defined in:
  * http://www.w3.org/TR/css3-animations/#animation-events-
  * http://dev.w3.org/csswg/css3-animations/#animation-events-
  */
 
-[scriptable, uuid(656d5f7c-c116-4154-8afd-f2c7458c7fb7)]
+[scriptable, uuid(cf76ec40-85fb-4623-b637-59a50af36d60)]
 interface nsIDOMAnimationEvent : nsIDOMEvent {
   readonly attribute DOMString          animationName;
   readonly attribute float              elapsedTime;
   void               initAnimationEvent(in DOMString typeArg,
                                         in boolean canBubbleArg,
                                         in boolean cancelableArg,
                                         in DOMString propertyNameArg,
                                         in float elapsedTimeArg);
--- a/dom/interfaces/events/nsIDOMBeforeUnloadEvent.idl
+++ b/dom/interfaces/events/nsIDOMBeforeUnloadEvent.idl
@@ -43,17 +43,17 @@
  * sent to handlers of the "beforeunload" event. This event is
  * non-standard. Interface derived from Microsoft IE's event
  * implementation.
  *
  * http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/events.asp
  *
  */
 
-[scriptable, uuid(da19e9dc-dea2-4a1d-a958-9be375c9799c)]
+[scriptable, uuid(d286b454-0ed0-4e4b-b51d-3cf6d8c1299d)]
 interface nsIDOMBeforeUnloadEvent : nsIDOMEvent
 {
   /**
    * Attribute used to pass back a return value from a beforeunload
    * handler
    */
            attribute DOMString          returnValue;
 };
--- a/dom/interfaces/events/nsIDOMCloseEvent.idl
+++ b/dom/interfaces/events/nsIDOMCloseEvent.idl
@@ -40,17 +40,17 @@
 
 /**
  * The nsIDOMCloseEvent interface is the interface to the event
  * close on a WebSocket object.
  *
  * For more information on this interface, please see
  * http://dev.w3.org/html5/websockets/#closeevent
  */
-[scriptable, uuid(f83d9d6d-6c0c-418c-b12a-438e76d5866b)]
+[scriptable, uuid(07fb24d2-a102-41a2-bdaa-eb5e0d399eba)]
 interface nsIDOMCloseEvent : nsIDOMEvent
 {
   readonly attribute boolean wasClean;
   readonly attribute unsigned short code;
   readonly attribute DOMString reason;
 
   void initCloseEvent(in DOMString aType,
                       in boolean aCanBubble,
--- a/dom/interfaces/events/nsIDOMCommandEvent.idl
+++ b/dom/interfaces/events/nsIDOMCommandEvent.idl
@@ -32,17 +32,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, uuid(37fb1798-0f76-4870-af6f-0135b4d973c8)]
+[scriptable, uuid(cfdbc647-847f-4bd9-8595-5dd0a1592b7b)]
 interface nsIDOMCommandEvent : nsIDOMEvent
 {
   readonly attribute DOMString command;
 
   void initCommandEvent(in DOMString typeArg,
                         in boolean canBubbleArg,
                         in boolean canCancelArg,
                         in DOMString command);
--- a/dom/interfaces/events/nsIDOMCompositionEvent.idl
+++ b/dom/interfaces/events/nsIDOMCompositionEvent.idl
@@ -34,17 +34,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMUIEvent.idl"
 
-[scriptable, uuid(bf01c23c-cf5f-4a8e-86a7-040c6e45d685)]
+[scriptable, uuid(9244a692-2827-4f98-8335-fff958d046fc)]
 interface nsIDOMCompositionEvent : nsIDOMUIEvent
 {
   readonly attribute DOMString data;
   readonly attribute DOMString locale;
 
   void initCompositionEvent(in DOMString typeArg,
                             in boolean canBubbleArg,
                             in boolean cancelableArg,
--- a/dom/interfaces/events/nsIDOMCustomEvent.idl
+++ b/dom/interfaces/events/nsIDOMCustomEvent.idl
@@ -33,17 +33,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMEvent.idl"
 interface nsIVariant;
 
-[scriptable, uuid(e93f84c5-e72f-4429-b797-f0c28d87890f)]
+[scriptable, uuid(eee65f98-bb6f-489c-b7e3-40e5f0c90645)]
 interface nsIDOMCustomEvent : nsIDOMEvent
 {
 
   readonly attribute nsIVariant detail;
 
   void initCustomEvent(in DOMString  typeArg, 
                        in boolean    canBubbleArg, 
                        in boolean    cancelableArg, 
--- a/dom/interfaces/events/nsIDOMDataContainerEvent.idl
+++ b/dom/interfaces/events/nsIDOMDataContainerEvent.idl
@@ -34,17 +34,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMEvent.idl"
 #include "nsIVariant.idl"
 
-[scriptable, uuid(3600d66c-b9ac-4c22-b39a-d64cce619921)]
+[scriptable, uuid(ac70e6bd-1f52-45ce-9d63-0aa650480ba1)]
 interface nsIDOMDataContainerEvent : nsIDOMEvent
 {
   /**
    * Return the data associated with the given key.
    *
    * @param  key  the key
    * @return      the data associated with the key
    */
--- a/dom/interfaces/events/nsIDOMDeviceMotionEvent.idl
+++ b/dom/interfaces/events/nsIDOMDeviceMotionEvent.idl
@@ -48,17 +48,17 @@ interface nsIDOMDeviceAcceleration : nsI
 interface nsIDOMDeviceRotationRate : nsISupports
 {
   readonly attribute double alpha;
   readonly attribute double beta;
   readonly attribute double gamma;
 };
 
 
-[scriptable, uuid(66E8D2C9-0826-444C-8FB8-E509BC9615F8)]
+[scriptable, uuid(b74dfd3f-0d16-4717-aaf7-8cadfe739532)]
 interface nsIDOMDeviceMotionEvent : nsIDOMEvent
 {
   void initDeviceMotionEvent(in DOMString eventTypeArg,
                              in boolean canBubbleArg,
                              in boolean cancelableArg,
                              in nsIDOMDeviceAcceleration acceleration,
                              in nsIDOMDeviceAcceleration accelerationIncludingGravity,
                              in nsIDOMDeviceRotationRate rotationRate,
--- a/dom/interfaces/events/nsIDOMDeviceOrientationEvent.idl
+++ b/dom/interfaces/events/nsIDOMDeviceOrientationEvent.idl
@@ -31,17 +31,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, uuid(daf2d570-0ecc-4aa0-aba4-26f60dfcba6a)]
+[scriptable, uuid(a9bd91fd-c0a7-44ed-9975-5a58faba3be3)]
 interface nsIDOMDeviceOrientationEvent : nsIDOMEvent
 {
   void initDeviceOrientationEvent(in DOMString eventTypeArg,
                                   in boolean canBubbleArg,
                                   in boolean cancelableArg,
                                   in double alpha,
                                   in double beta,
                                   in double gamma,
--- a/dom/interfaces/events/nsIDOMDragEvent.idl
+++ b/dom/interfaces/events/nsIDOMDragEvent.idl
@@ -35,17 +35,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "domstubs.idl"
 #include "nsIDOMMouseEvent.idl"
 
 interface nsIDOMDataTransfer;
 
-[scriptable, uuid(26b40393-c383-4e9a-977f-e8e1351926eb)]
+[scriptable, uuid(74fb5f01-e473-4302-93f5-6f74bdaaddf2)]
 interface nsIDOMDragEvent : nsIDOMMouseEvent
 {
   readonly attribute nsIDOMDataTransfer dataTransfer;
 
   void initDragEvent(in DOMString typeArg,
                      in boolean canBubbleArg,
                      in boolean cancelableArg,
                      in nsIDOMWindow aView,
--- a/dom/interfaces/events/nsIDOMEvent.idl
+++ b/dom/interfaces/events/nsIDOMEvent.idl
@@ -44,17 +44,17 @@ interface nsIDOMEventTarget;
 /**
  * The nsIDOMEvent interface is the primary datatype for all events in
  * the Document Object Model.
  *
  * For more information on this interface please see 
  * http://www.w3.org/TR/DOM-Level-2-Events/
  */
 
-[scriptable, uuid(548137e8-fd2c-48c4-8635-3033f7db79e0)]
+[scriptable, uuid(e85cff74-951f-45c1-be0c-89442ea2f500)]
 interface nsIDOMEvent : nsISupports
 {
   // PhaseType
   /**
    * The current event phase is the capturing phase.
    */
   const unsigned short      CAPTURING_PHASE                = 1;
 
@@ -169,9 +169,15 @@ interface nsIDOMEvent : nsISupports
   void                      initEvent(in DOMString eventTypeArg,
                                       in boolean canBubbleArg,
                                       in boolean cancelableArg);
 
   /**
    * Used to indicate whether preventDefault() has been called for this event.
    */
   readonly attribute boolean defaultPrevented;
+
+  /**
+   * Prevents other event listeners from being triggered and,
+   * unlike Event.stopPropagation() its effect is immediate.
+   */
+  void                       stopImmediatePropagation();
 };
--- a/dom/interfaces/events/nsIDOMHashChangeEvent.idl
+++ b/dom/interfaces/events/nsIDOMHashChangeEvent.idl
@@ -29,17 +29,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, uuid(34850f11-8b88-43ce-8d55-9aa8b18753bd)]
+[scriptable, uuid(9fc4785c-b769-40e5-8f79-586e01413afd)]
 interface nsIDOMHashChangeEvent : nsIDOMEvent
 {
   readonly attribute DOMString oldURL;
   readonly attribute DOMString newURL;
 
   void initHashChangeEvent(in DOMString typeArg,
                            in boolean canBubbleArg,
                            in boolean cancelableArg,
--- a/dom/interfaces/events/nsIDOMKeyEvent.idl
+++ b/dom/interfaces/events/nsIDOMKeyEvent.idl
@@ -34,17 +34,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMUIEvent.idl"
 
-[scriptable, uuid(ffcfb88a-d1d1-40b9-96e1-e338211d3511)]
+[scriptable, uuid(def974c3-b491-481b-bc67-29174af4b26a)]
 interface nsIDOMKeyEvent : nsIDOMUIEvent
 {
   const unsigned long DOM_VK_CANCEL         = 0x03;
   const unsigned long DOM_VK_HELP           = 0x06;
   const unsigned long DOM_VK_BACK_SPACE     = 0x08;
   const unsigned long DOM_VK_TAB            = 0x09;
   const unsigned long DOM_VK_CLEAR          = 0x0C;
   const unsigned long DOM_VK_RETURN         = 0x0D;
--- a/dom/interfaces/events/nsIDOMMessageEvent.idl
+++ b/dom/interfaces/events/nsIDOMMessageEvent.idl
@@ -40,17 +40,17 @@
 
 /**
  * The nsIDOMMessageEvent interface is used for server-sent events and for
  * cross-domain messaging.
  *
  * For more information on this interface, please see
  * http://www.whatwg.org/specs/web-apps/current-work/#messageevent
  */
-[scriptable, uuid(9ac4fa26-4d19-4f4e-807e-b30cd0dbe56a)]
+[scriptable, uuid(3aca4a44-8e5f-4829-9d59-ce4adbba2b12)]
 interface nsIDOMMessageEvent : nsIDOMEvent
 {
   /**
    * Custom string data associated with this event.
    */
   [implicit_jscontext]
   readonly attribute jsval data;
   
--- a/dom/interfaces/events/nsIDOMMouseEvent.idl
+++ b/dom/interfaces/events/nsIDOMMouseEvent.idl
@@ -43,17 +43,17 @@
 /**
  * The nsIDOMMouseEvent interface is the datatype for all mouse events
  * in the Document Object Model.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Events/
  */
 
-[scriptable, uuid(7e6cb6e1-d3ba-4e60-a6ff-96350187a1e3)]
+[scriptable, uuid(7f57aa45-6792-4d8b-ba5b-201533cf0b2f)]
 interface nsIDOMMouseEvent : nsIDOMUIEvent
 {
   readonly attribute long               screenX;
   readonly attribute long               screenY;
 
   readonly attribute long               clientX;
   readonly attribute long               clientY;
 
--- a/dom/interfaces/events/nsIDOMMouseScrollEvent.idl
+++ b/dom/interfaces/events/nsIDOMMouseScrollEvent.idl
@@ -33,17 +33,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMMouseEvent.idl"
 
-[scriptable, uuid(eac2ea89-7926-417a-bbc8-bb893e77bebb)]
+[scriptable, uuid(159f24b9-2058-40b9-b5bc-6477d192955a)]
 interface nsIDOMMouseScrollEvent : nsIDOMMouseEvent
 {
   const long HORIZONTAL_AXIS = 1;
   const long VERTICAL_AXIS = 2;
 
   readonly attribute long axis;
 
   void                initMouseScrollEvent(in DOMString typeArg,
--- a/dom/interfaces/events/nsIDOMMozTouchEvent.idl
+++ b/dom/interfaces/events/nsIDOMMozTouchEvent.idl
@@ -35,17 +35,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 
 #include "nsIDOMMouseEvent.idl"
 
 
-[scriptable, uuid(e680bab6-740a-4097-b5e0-5e9d7d381cbc)]
+[scriptable, uuid(268da07b-4c41-4deb-96a2-10985644e6b0)]
 interface nsIDOMMozTouchEvent : nsIDOMMouseEvent
 {
   readonly attribute unsigned long streamId;
 
   void initMozTouchEvent(in DOMString typeArg,
                          in boolean canBubbleArg,
                          in boolean cancelableArg,
                          in nsIDOMWindow viewArg,
--- a/dom/interfaces/events/nsIDOMMutationEvent.idl
+++ b/dom/interfaces/events/nsIDOMMutationEvent.idl
@@ -34,17 +34,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, uuid(8e440d86-886a-4e76-9e59-c13b939c9a4b)]
+[scriptable, uuid(72b3ddba-6cbb-4011-ac3b-50bd900b223d)]
 interface nsIDOMMutationEvent : nsIDOMEvent
 {
   const unsigned short      MODIFICATION       = 1;
   const unsigned short      ADDITION           = 2;
   const unsigned short      REMOVAL            = 3;
 
   readonly attribute nsIDOMNode       relatedNode;
   readonly attribute DOMString        prevValue;
--- a/dom/interfaces/events/nsIDOMNotifyAudioAvailableEvent.idl
+++ b/dom/interfaces/events/nsIDOMNotifyAudioAvailableEvent.idl
@@ -35,17 +35,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMEvent.idl"
 #include "nsIVariant.idl"
 
-[scriptable, uuid(6250652d-7a6a-49a4-a2ee-9114e1e83427)]
+[scriptable, uuid(cd362d2f-a9a1-4127-940d-477ba0e82bd6)]
 interface nsIDOMNotifyAudioAvailableEvent : nsIDOMEvent
 {
   [implicit_jscontext]
   readonly attribute jsval  frameBuffer;
 
   readonly attribute float  time;
 
   void initAudioAvailableEvent(in DOMString typeArg,
--- a/dom/interfaces/events/nsIDOMNotifyPaintEvent.idl
+++ b/dom/interfaces/events/nsIDOMNotifyPaintEvent.idl
@@ -40,17 +40,17 @@
 
 interface nsIDOMPaintRequestList;
 
 /**
  * The nsIDOMNotifyPaintEvent interface is used for the MozDOMAfterPaint
  * event, which fires at a window when painting has happened in
  * that window.
  */
-[scriptable, uuid(792e5779-7c39-4817-91a7-fdb3fba6428f)]
+[scriptable, uuid(5e9e91ad-8638-4e1c-bded-35b51b6df279)]
 interface nsIDOMNotifyPaintEvent : nsIDOMEvent
 {
   /**
    * Get a list of rectangles which are affected. The rectangles are in CSS pixels
    * relative to the viewport origin.
    * If the caller is not trusted (e.g., regular Web content) then only painting
    * caused by the current document is reported; in particular, painting in subdocuments
    * is not reported.
--- a/dom/interfaces/events/nsIDOMPageTransitionEvent.idl
+++ b/dom/interfaces/events/nsIDOMPageTransitionEvent.idl
@@ -39,17 +39,17 @@
 #include "nsIDOMEvent.idl"
 
 /**
  * The nsIDOMPageTransitionEvent interface is used for the pageshow and
  * pagehide events, which are generic events that apply to both page
  * load/unload and saving/restoring a document from session history.
  */
 
-[scriptable, uuid(b712418b-376f-4f75-b156-5d9ad99fe51f)]
+[scriptable, uuid(3ca21c34-8391-4c5b-891e-0540a675dbf4)]
 interface nsIDOMPageTransitionEvent : nsIDOMEvent
 {
   /**
    * Set to true if the document has been or will be persisted across
    * firing of the event.  For example, if a document is being cached in
    * session history, |persisted| is true for the PageHide event.
    */
   readonly attribute boolean persisted;
--- a/dom/interfaces/events/nsIDOMPopStateEvent.idl
+++ b/dom/interfaces/events/nsIDOMPopStateEvent.idl
@@ -31,17 +31,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIVariant;
 
-[scriptable, uuid(f3834fd5-0ef5-4ccd-a741-0b6685414342)]
+[scriptable, uuid(034f5fcc-9b41-433c-9795-64767051926a)]
 interface nsIDOMPopStateEvent : nsIDOMEvent
 {
   /**
    * The state associated with this popstate event
    */
   readonly attribute nsIVariant state;
 
   void initPopStateEvent(in DOMString typeArg,
--- a/dom/interfaces/events/nsIDOMPopupBlockedEvent.idl
+++ b/dom/interfaces/events/nsIDOMPopupBlockedEvent.idl
@@ -39,17 +39,17 @@
 
 interface nsIURI;
 
 /**
  * The nsIDOMPopupBlockedEvent interface is the datatype for events
  * posted when a popup window is blocked.
  */
 
-[scriptable, uuid(05be571f-c3ea-4959-a340-c57b1591ae4b)]
+[scriptable, uuid(853828af-eda7-459a-be7f-9011c20394ae)]
 interface nsIDOMPopupBlockedEvent : nsIDOMEvent
 {
   /**
    * The window object that attempted to open the blocked popup
    * (i.e. the window object on which open() was called).
    */
   readonly attribute nsIDOMWindow requestingWindow;
 
--- a/dom/interfaces/events/nsIDOMProgressEvent.idl
+++ b/dom/interfaces/events/nsIDOMProgressEvent.idl
@@ -40,17 +40,17 @@
 
 /**
  * The nsIDOMProgressEvent is used in the media elements (<video> and <audio>
  * to inform of the progress of the media download. It is currently undefined
  * in the HTML5 specification. This implementation is a placeholder until
  * the specification is complete and is compatible with the WebKit ProgressEvent.
  */
 
-[scriptable, uuid(6af7022c-d7f8-414c-a11f-a7918f14052b)]
+[scriptable, uuid(2377d8a6-9e27-4eb2-a377-9910772b33d3)]
 interface nsIDOMProgressEvent : nsIDOMEvent
 {
   readonly attribute boolean lengthComputable;
   readonly attribute unsigned long long loaded;
   readonly attribute unsigned long long total;
   void initProgressEvent(in DOMString typeArg,
                          in boolean canBubbleArg,
                          in boolean cancelableArg,
--- a/dom/interfaces/events/nsIDOMScrollAreaEvent.idl
+++ b/dom/interfaces/events/nsIDOMScrollAreaEvent.idl
@@ -32,17 +32,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMUIEvent.idl"
 
-[scriptable, uuid(00028177-32a5-4ea3-b71d-8409beb15225)]
+[scriptable, uuid(a382424b-464f-475f-8880-f4ceaca9fde9)]
 interface nsIDOMScrollAreaEvent : nsIDOMUIEvent
 {
   // Scroll area client rect
   readonly attribute float x;
   readonly attribute float y;
   readonly attribute float width;
   readonly attribute float height;
 
--- a/dom/interfaces/events/nsIDOMSimpleGestureEvent.idl
+++ b/dom/interfaces/events/nsIDOMSimpleGestureEvent.idl
@@ -92,17 +92,17 @@
  * Default behavior:
  *
  * Some operating systems support default behaviors for gesture events
  * when they are not handled by the application. Consumers should
  * use event.preventDefault() to prevent default behavior when
  * consuming events.
  */
 
-[scriptable, uuid(0fdcef08-b4e8-4d41-91a0-4f5d259bfb81)]
+[scriptable, uuid(e9bdcc53-1bc0-4cae-9eb3-b215b6be7f70)]
 interface nsIDOMSimpleGestureEvent : nsIDOMMouseEvent
 {
   /* Swipe direction constants */
   const unsigned long DIRECTION_UP = 1;
   const unsigned long DIRECTION_DOWN = 2;
   const unsigned long DIRECTION_LEFT = 4;
   const unsigned long DIRECTION_RIGHT = 8;
   
--- a/dom/interfaces/events/nsIDOMSmartCardEvent.idl
+++ b/dom/interfaces/events/nsIDOMSmartCardEvent.idl
@@ -33,14 +33,14 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, uuid(52bdc7ca-a934-4a40-a2e2-ac83a70b4019)]
+[scriptable, uuid(57e2dd86-3c70-4d9c-81d0-856d42e6bc7d)]
 interface nsIDOMSmartCardEvent : nsIDOMEvent
 {
   readonly attribute DOMString   tokenName;
   [noscript] void Init(in nsIDOMEvent event);
 };
--- a/dom/interfaces/events/nsIDOMTouchEvent.idl
+++ b/dom/interfaces/events/nsIDOMTouchEvent.idl
@@ -60,17 +60,17 @@ interface nsIDOMTouch : nsISupports {
 
 [scriptable, uuid(60706eb7-d50d-4379-b01c-e78e6af84213)]
 interface nsIDOMTouchList : nsISupports {
   readonly attribute unsigned long length;
   nsIDOMTouch item(in unsigned long index);
   nsIDOMTouch identifiedTouch(in long identifier);
 };
 
-[scriptable, uuid(df94b20b-7998-4f00-935c-ee2c6b179711)]
+[scriptable, uuid(0cc687df-0ed5-4b7f-b89d-cbb99b21d23a)]
 interface nsIDOMTouchEvent : nsIDOMUIEvent {
   readonly attribute nsIDOMTouchList touches;
   readonly attribute nsIDOMTouchList targetTouches;
   readonly attribute nsIDOMTouchList changedTouches;
   readonly attribute boolean         altKey;
   readonly attribute boolean         metaKey;
   readonly attribute boolean         ctrlKey;
   readonly attribute boolean         shiftKey;
--- a/dom/interfaces/events/nsIDOMTransitionEvent.idl
+++ b/dom/interfaces/events/nsIDOMTransitionEvent.idl
@@ -38,17 +38,17 @@
 #include "nsIDOMEvent.idl"
 
 /**
  * Transition events are defined in:
  * http://www.w3.org/TR/css3-transitions/#transition-events-
  * http://dev.w3.org/csswg/css3-transitions/#transition-events-
  */
 
-[scriptable, uuid(3e49ea4c-6f23-4aff-bd8f-e587edf514ec)]
+[scriptable, uuid(9ded6ca5-f5b2-4bf3-9250-e4f7808dc605)]
 interface nsIDOMTransitionEvent : nsIDOMEvent {
   readonly attribute DOMString           propertyName;
   readonly attribute float               elapsedTime;
   void               initTransitionEvent(in DOMString typeArg, 
                                          in boolean canBubbleArg, 
                                          in boolean cancelableArg, 
                                          in DOMString propertyNameArg,
                                          in float elapsedTimeArg);
--- a/dom/interfaces/events/nsIDOMUIEvent.idl
+++ b/dom/interfaces/events/nsIDOMUIEvent.idl
@@ -42,17 +42,17 @@
 /**
  * The nsIDOMUIEvent interface is the datatype for all UI events in the
  * Document Object Model.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Events/
  */
 
-[scriptable, uuid(4f3032d1-bdc5-4f37-bece-af8056d71c5c)]
+[scriptable, uuid(af3f130e-0c22-4613-a150-780a46c22e3a)]
 interface nsIDOMUIEvent : nsIDOMEvent
 {
   readonly attribute nsIDOMWindow       view;
   readonly attribute long               detail;
   void                      initUIEvent(in DOMString typeArg,
                                         in boolean canBubbleArg,
                                         in boolean cancelableArg,
                                         in nsIDOMWindow viewArg,
--- a/dom/interfaces/load-save/nsIDOMLSProgressEvent.idl
+++ b/dom/interfaces/load-save/nsIDOMLSProgressEvent.idl
@@ -35,15 +35,15 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIDOMLSInput;
 
-[scriptable, uuid(b9a2371f-70e9-4657-b0e8-28e15b40857e)]
+[scriptable, uuid(89477959-7ce6-4f6f-9885-942e0a2c93cc)]
 interface nsIDOMLSProgressEvent : nsIDOMEvent
 {
   readonly attribute nsIDOMLSInput   input;
   readonly attribute unsigned long   position;
   readonly attribute unsigned long   totalSize;
 };
--- a/dom/interfaces/smil/nsIDOMTimeEvent.idl
+++ b/dom/interfaces/smil/nsIDOMTimeEvent.idl
@@ -40,17 +40,17 @@
 /**
  * The SMIL TimeEvent interface.
  *
  * For more information please refer to:
  * http://www.w3.org/TR/SMIL/smil-timing.html#Events-TimeEvent
  * http://www.w3.org/TR/SVG/animate.html#InterfaceTimeEvent
  */
 
-[scriptable, uuid(873785cc-d8be-48af-8b30-5c566e3f4e6e)]
+[scriptable, uuid(5d7de21b-97c2-4a1d-a1f4-2ae527067660)]
 interface nsIDOMTimeEvent : nsIDOMEvent
 {
   readonly attribute long detail;
   readonly attribute nsIDOMWindow view;
   
   void initTimeEvent(in DOMString typeArg,
                      in nsIDOMWindow viewArg,
                      in long detailArg);
--- a/dom/interfaces/storage/nsIDOMStorageEvent.idl
+++ b/dom/interfaces/storage/nsIDOMStorageEvent.idl
@@ -43,17 +43,17 @@
  * http://dev.w3.org/html5/webstorage/#the-storage-event
  * for more information.
  *
  * Event sent to a window when a storage area changes.
  */
 
 interface nsIDOMStorage;
 
-[scriptable, uuid(AE0CB688-68B3-4fb3-9A11-2DA8E620E808)]
+[scriptable, uuid(501d7dc8-5b8b-4cce-99ad-16ed1046030a)]
 interface nsIDOMStorageEvent : nsIDOMEvent
 {
   /**
    * Attribute represents the key being changed. The key attribute is null
    * when change has been invoked by the storage clear() method.
    */
   readonly attribute DOMString key;
 
--- a/dom/interfaces/storage/nsIDOMStorageEventObsolete.idl
+++ b/dom/interfaces/storage/nsIDOMStorageEventObsolete.idl
@@ -41,17 +41,17 @@
 /**
  * Interface for a client side storage. See
  * http://www.whatwg.org/specs/web-apps/current-work/#scs-client-side
  * for more information.
  *
  * Event sent to a window when a storage area changes.
  */
 
-[scriptable, uuid(c0178907-847d-41c0-8a62-31301bb946fa)]
+[scriptable, uuid(2b3b40fe-4734-4661-b7ff-dc555215db4e)]
 interface nsIDOMStorageEventObsolete : nsIDOMEvent
 {
   /**
    * Domain of the storage area which changed, or #session for
    * session storage.
    */
   readonly attribute DOMString domain;
 
--- a/dom/interfaces/svg/nsIDOMSVGEvent.idl
+++ b/dom/interfaces/svg/nsIDOMSVGEvent.idl
@@ -37,12 +37,12 @@
 
 #include "nsIDOMEvent.idl"
 
 /**
  * For more information on this interface please see
  * http://www.w3.org/TR/SVG11/script.html#InterfaceSVGEvent
  */
 
-[scriptable, uuid(13aed1cc-a505-45d5-bbc2-0052c6bf200f)]
+[scriptable, uuid(40c55169-8b5e-456d-a58b-ee4518d93c40)]
 interface nsIDOMSVGEvent : nsIDOMEvent
 {
 };
--- a/dom/interfaces/svg/nsIDOMSVGZoomEvent.idl
+++ b/dom/interfaces/svg/nsIDOMSVGZoomEvent.idl
@@ -40,17 +40,17 @@
 /**
  * For more information on this interface please see
  * http://www.w3.org/TR/SVG11/script.html#InterfaceSVGZoomEvent
  */
 
 interface nsIDOMSVGRect;
 interface nsIDOMSVGPoint;
 
-[scriptable, uuid(91f381f0-65ba-4392-bbf9-381fda450d76)]
+[scriptable, uuid(85ba3378-83eb-4d26-8917-c5c73c705669)]
 interface nsIDOMSVGZoomEvent : nsIDOMUIEvent
 {
   readonly attribute nsIDOMSVGRect  zoomRectScreen;
   readonly attribute float          previousScale;
   readonly attribute nsIDOMSVGPoint previousTranslate;
   readonly attribute float          newScale;
   readonly attribute nsIDOMSVGPoint newTranslate;
 };
--- a/dom/interfaces/threads/nsIDOMWorkers.idl
+++ b/dom/interfaces/threads/nsIDOMWorkers.idl
@@ -46,33 +46,33 @@
 interface nsIDOMEventListener;
 
 [scriptable, uuid(ab3725b8-3fca-40cc-a42c-92fb154ef01d)]
 interface nsIWorkerMessagePort : nsISupports
 {
   void postMessage(/* in JSObject aMessage */);
 };
 
-[scriptable, uuid(508f2d49-e9a0-4fe8-bd33-321820173b4a)]
+[scriptable, uuid(c013e89d-467e-4e77-b011-d00da5c1d957)]
 interface nsIWorkerMessageEvent : nsIDOMEvent
 {
   readonly attribute DOMString data;
   readonly attribute DOMString origin;
 
   readonly attribute nsISupports source;
 
   void initMessageEvent(in DOMString aTypeArg,
                         in boolean aCanBubbleArg,
                         in boolean aCancelableArg,
                         in DOMString aDataArg,
                         in DOMString aOriginArg,
                         in nsISupports aSourceArg);
 };
 
-[scriptable, uuid(73d82c1d-05de-49c9-a23b-7121ff09a67a)]
+[scriptable, uuid(963b856d-61b8-4c4d-bd6e-7bb3664a2993)]
 interface nsIWorkerErrorEvent : nsIDOMEvent
 {
   readonly attribute DOMString message;
   readonly attribute DOMString filename;
 
   readonly attribute unsigned long lineno;
 
   void initErrorEvent(in DOMString aTypeArg,
--- a/dom/interfaces/xul/nsIDOMXULCommandEvent.idl
+++ b/dom/interfaces/xul/nsIDOMXULCommandEvent.idl
@@ -38,17 +38,17 @@
 
 /**
  * This interface is supported by command events, which are dispatched to
  * XUL elements as a result of mouse or keyboard activation.
  */
 
 #include "nsIDOMUIEvent.idl"
 
-[scriptable, uuid(da4922ca-6dbc-4df6-8187-91f3a71eb48f)]
+[scriptable, uuid(980999ae-7702-4c8f-944d-77db4e99583c)]
 interface nsIDOMXULCommandEvent : nsIDOMUIEvent
 {
   /**
    * Command events support the same set of modifier keys as mouse and key
    * events.
    */
   readonly attribute boolean ctrlKey;
   readonly attribute boolean shiftKey;
--- a/security/manager/ssl/src/nsSmartCardEvent.cpp
+++ b/security/manager/ssl/src/nsSmartCardEvent.cpp
@@ -227,16 +227,22 @@ NS_IMETHODIMP nsSmartCardEvent::GetTimeS
 }
 
 NS_IMETHODIMP nsSmartCardEvent::StopPropagation()
 {
   NS_ASSERTION(mInner, "SmartCardEvent called without Init");
   return mInner->StopPropagation();
 }
 
+NS_IMETHODIMP nsSmartCardEvent::StopImmediatePropagation()
+{
+  NS_ASSERTION(mInner, "SmartCardEvent called without Init");
+  return mInner->StopImmediatePropagation();
+}
+
 NS_IMETHODIMP nsSmartCardEvent::PreventDefault()
 {
   NS_ASSERTION(mInner, "SmartCardEvent called without Init");
   return mInner->PreventDefault();
 }
 
 NS_IMETHODIMP nsSmartCardEvent::GetDefaultPrevented(bool* aReturn)
 {
--- a/widget/public/nsGUIEvent.h
+++ b/widget/public/nsGUIEvent.h
@@ -159,16 +159,18 @@ class nsHashKey;
 #define NS_PRIV_EVENT_UNTRUSTED_PERMITTED 0x8000
 
 #define NS_EVENT_FLAG_EXCEPTION_THROWN    0x10000
 
 #define NS_EVENT_FLAG_PREVENT_MULTIPLE_ACTIONS 0x20000
 
 #define NS_EVENT_RETARGET_TO_NON_NATIVE_ANONYMOUS 0x40000
 
+#define NS_EVENT_FLAG_STOP_DISPATCH_IMMEDIATELY 0x80000
+
 #define NS_EVENT_CAPTURE_MASK             (~(NS_EVENT_FLAG_BUBBLE | NS_EVENT_FLAG_NO_CONTENT_DISPATCH))
 #define NS_EVENT_BUBBLE_MASK              (~(NS_EVENT_FLAG_CAPTURE | NS_EVENT_FLAG_NO_CONTENT_DISPATCH))
 
 #define NS_EVENT_TYPE_NULL                   0
 
 /**
  * GUI MESSAGES
  */