LCOV - code coverage report
Current view: top level - dom/events - EventNameList.h (source / functions) Hit Total Coverage
Test: output.info Lines: 194 202 96.0 %
Date: 2017-07-14 16:53:18 Functions: 0 524 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
       3             : /* This Source Code Form is subject to the terms of the Mozilla Public
       4             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       5             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       6             : 
       7             : /*
       8             :  * This file contains the list of event names that are exposed via IDL
       9             :  * on various objects.  It is designed to be used as inline input to
      10             :  * various consumers through the magic of C preprocessing.
      11             :  *
      12             :  * Each entry consists of 4 pieces of information:
      13             :  * 1) The name of the event
      14             :  * 2) The event message
      15             :  * 3) The event type (see the EventNameType enum in nsContentUtils.h)
      16             :  * 4) The event struct type for this event.
      17             :  * Items 2-4 might be empty strings for events for which they don't make sense.
      18             :  *
      19             :  * Event names that are exposed as content attributes on HTML elements
      20             :  * and as IDL attributes on Elements, Documents and Windows and have
      21             :  * no forwarding behavior should be enclosed in the EVENT macro.
      22             :  *
      23             :  * Event names that are exposed as content attributes on HTML elements
      24             :  * and as IDL attributes on Elements, Documents and Windows and are
      25             :  * forwarded from <body> and <frameset> to the Window should be
      26             :  * enclosed in the FORWARDED_EVENT macro.  If this macro is not
      27             :  * defined, it will be defined to be equivalent to EVENT.
      28             :  *
      29             :  * Event names that are exposed as IDL attributes on Windows only
      30             :  * should be enclosed in the WINDOW_ONLY_EVENT macro.  If this macro
      31             :  * is not defined, it will be defined to the empty string.
      32             :  *
      33             :  * Event names that are exposed as content and IDL attributes on
      34             :  * <body> and <frameset>, which forward them to the Window, and are
      35             :  * exposed as IDL attributes on the Window should be enclosed in the
      36             :  * WINDOW_EVENT macro.  If this macro is not defined, it will be
      37             :  * defined to be equivalent to WINDOW_ONLY_EVENT.
      38             :  *
      39             :  * Touch-specific event names should be enclosed in TOUCH_EVENT.  They
      40             :  * are otherwise equivalent to those enclosed in EVENT.  If
      41             :  * TOUCH_EVENT is not defined, it will be defined to the empty string.
      42             :  *
      43             :  * Event names that are only exposed as IDL attributes on Documents
      44             :  * should be enclosed in the DOCUMENT_ONLY_EVENT macro.  If this macro is
      45             :  * not defined, it will be defined to the empty string.
      46             :  *
      47             :  * Event names that are not exposed as IDL attributes at all should be
      48             :  * enclosed in NON_IDL_EVENT.  If NON_IDL_EVENT is not defined, it
      49             :  * will be defined to the empty string.
      50             :  *
      51             :  * If you change which macros event names are enclosed in, please
      52             :  * update the tests for bug 689564 and bug 659350 as needed.
      53             :  */
      54             : 
      55             : #ifdef MESSAGE_TO_EVENT
      56             : #ifdef EVENT
      57             : #error "Don't define EVENT"
      58             : #endif /* EVENT */
      59             : #ifdef WINDOW_ONLY_EVENT
      60             : #error "Don't define WINDOW_ONLY_EVENT"
      61             : #endif /* WINDOW_ONLY_EVENT */
      62             : #ifdef TOUCH_EVENT
      63             : #error "Don't define TOUCH_EVENT"
      64             : #endif /* TOUCH_EVENT */
      65             : #ifdef DOCUMENT_ONLY_EVENT
      66             : #error "Don't define DOCUMENT_ONLY_EVENT"
      67             : #endif /* DOCUMENT_ONLY_EVENT */
      68             : #ifdef NON_IDL_EVENT
      69             : #error "Don't define NON_IDL_EVENT"
      70             : #endif /* NON_IDL_EVENT */
      71             : 
      72             : #define EVENT MESSAGE_TO_EVENT
      73             : #define WINDOW_ONLY_EVENT MESSAGE_TO_EVENT
      74             : #define TOUCH_EVENT MESSAGE_TO_EVENT
      75             : #define DOCUMENT_ONLY_EVENT MESSAGE_TO_EVENT
      76             : #define NON_IDL_EVENT MESSAGE_TO_EVENT
      77             : #endif /* MESSAGE_TO_EVENT */
      78             : 
      79             : #ifdef DEFINED_FORWARDED_EVENT
      80             : #error "Don't define DEFINED_FORWARDED_EVENT"
      81             : #endif /* DEFINED_FORWARDED_EVENT */
      82             : 
      83             : #ifndef FORWARDED_EVENT
      84             : #define FORWARDED_EVENT EVENT
      85             : #define DEFINED_FORWARDED_EVENT
      86             : #endif /* FORWARDED_EVENT */
      87             : 
      88             : #ifdef DEFINED_WINDOW_ONLY_EVENT
      89             : #error "Don't define DEFINED_WINDOW_ONLY_EVENT"
      90             : #endif /* DEFINED_WINDOW_ONLY_EVENT */
      91             : 
      92             : #ifndef WINDOW_ONLY_EVENT
      93             : #define WINDOW_ONLY_EVENT(_name, _message, _type, _struct)
      94             : #define DEFINED_WINDOW_ONLY_EVENT
      95             : #endif /* WINDOW_ONLY_EVENT */
      96             : 
      97             : #ifdef DEFINED_WINDOW_EVENT
      98             : #error "Don't define DEFINED_WINDOW_EVENT"
      99             : #endif /* DEFINED_WINDOW_EVENT */
     100             : 
     101             : #ifndef WINDOW_EVENT
     102             : #define WINDOW_EVENT WINDOW_ONLY_EVENT
     103             : #define DEFINED_WINDOW_EVENT
     104             : #endif /* WINDOW_EVENT */
     105             : 
     106             : #ifdef DEFINED_TOUCH_EVENT
     107             : #error "Don't define DEFINED_TOUCH_EVENT"
     108             : #endif /* DEFINED_TOUCH_EVENT */
     109             : 
     110             : #ifndef TOUCH_EVENT
     111             : #define TOUCH_EVENT(_name, _message, _type, _struct)
     112             : #define DEFINED_TOUCH_EVENT
     113             : #endif /* TOUCH_EVENT */
     114             : 
     115             : #ifdef DEFINED_DOCUMENT_ONLY_EVENT
     116             : #error "Don't define DEFINED_DOCUMENT_ONLY_EVENT"
     117             : #endif /* DEFINED_DOCUMENT_ONLY_EVENT */
     118             : 
     119             : #ifndef DOCUMENT_ONLY_EVENT
     120             : #define DOCUMENT_ONLY_EVENT(_name, _message, _type, _struct)
     121             : #define DEFINED_DOCUMENT_ONLY_EVENT
     122             : #endif /* DOCUMENT_ONLY_EVENT */
     123             : 
     124             : #ifdef DEFINED_NON_IDL_EVENT
     125             : #error "Don't define DEFINED_NON_IDL_EVENT"
     126             : #endif /* DEFINED_NON_IDL_EVENT */
     127             : 
     128             : #ifndef NON_IDL_EVENT
     129             : #define NON_IDL_EVENT(_name, _message, _type, _struct)
     130             : #define DEFINED_NON_IDL_EVENT
     131             : #endif /* NON_IDL_EVENT */
     132             : 
     133             : #ifdef DEFINED_ERROR_EVENT
     134             : #error "Don't define DEFINED_ERROR_EVENT"
     135             : #endif /* DEFINED_ERROR_EVENT */
     136             : 
     137             : #ifndef ERROR_EVENT
     138             : #define ERROR_EVENT FORWARDED_EVENT
     139             : #define DEFINED_ERROR_EVENT
     140             : #endif /* ERROR_EVENT */
     141             : 
     142             : #ifdef DEFINED_BEFOREUNLOAD_EVENT
     143             : #error "Don't define DEFINED_BEFOREUNLOAD_EVENT"
     144             : #endif /* DEFINED_BEFOREUNLOAD_EVENT */
     145             : 
     146             : #ifndef BEFOREUNLOAD_EVENT
     147             : #define BEFOREUNLOAD_EVENT WINDOW_EVENT
     148             : #define DEFINED_BEFOREUNLOAD_EVENT
     149             : #endif /* BEFOREUNLOAD_EVENT */
     150             : 
     151           3 : EVENT(abort,
     152             :       eImageAbort,
     153             :       EventNameType_All,
     154             :       eBasicEventClass)
     155           3 : EVENT(canplay,
     156             :       eCanPlay,
     157             :       EventNameType_HTML,
     158             :       eBasicEventClass)
     159           3 : EVENT(canplaythrough,
     160             :       eCanPlayThrough,
     161             :       EventNameType_HTML,
     162             :       eBasicEventClass)
     163           3 : EVENT(change,
     164             :       eFormChange,
     165             :       EventNameType_HTMLXUL,
     166             :       eBasicEventClass)
     167           3 : EVENT(CheckboxStateChange,
     168             :       eFormCheckboxStateChange,
     169             :       EventNameType_None,
     170             :       eBasicEventClass)
     171           3 : EVENT(RadioStateChange,
     172             :       eFormRadioStateChange,
     173             :       EventNameType_None,
     174             :       eBasicEventClass)
     175           3 : EVENT(auxclick,
     176             :       eMouseAuxClick,
     177             :       EventNameType_All,
     178             :       eMouseEventClass)
     179           3 : EVENT(click,
     180             :       eMouseClick,
     181             :       EventNameType_All,
     182             :       eMouseEventClass)
     183           3 : EVENT(close,
     184             :       eClose,
     185             :       EventNameType_HTMLXUL,
     186             :       eBasicEventClass)
     187           3 : EVENT(contextmenu,
     188             :       eContextMenu,
     189             :       EventNameType_HTMLXUL,
     190             :       eMouseEventClass)
     191           3 : NON_IDL_EVENT(mouselongtap,
     192             :       eMouseLongTap,
     193             :       EventNameType_HTMLXUL,
     194             :       eMouseEventClass)
     195             : // Not supported yet
     196             : // EVENT(cuechange)
     197           3 : EVENT(dblclick,
     198             :       eMouseDoubleClick,
     199             :       EventNameType_HTMLXUL,
     200             :       eMouseEventClass)
     201           3 : EVENT(drag,
     202             :       eDrag,
     203             :       EventNameType_HTMLXUL,
     204             :       eDragEventClass)
     205           3 : EVENT(dragend,
     206             :       eDragEnd,
     207             :       EventNameType_HTMLXUL,
     208             :       eDragEventClass)
     209           3 : EVENT(dragenter,
     210             :       eDragEnter,
     211             :       EventNameType_HTMLXUL,
     212             :       eDragEventClass)
     213           3 : EVENT(dragexit,
     214             :       eDragExit,
     215             :       EventNameType_HTMLXUL,
     216             :       eDragEventClass)
     217           3 : EVENT(dragleave,
     218             :       eDragLeave,
     219             :       EventNameType_HTMLXUL,
     220             :       eDragEventClass)
     221           3 : EVENT(dragover,
     222             :       eDragOver,
     223             :       EventNameType_HTMLXUL,
     224             :       eDragEventClass)
     225           3 : EVENT(dragstart,
     226             :       eDragStart,
     227             :       EventNameType_HTMLXUL,
     228             :       eDragEventClass)
     229           3 : EVENT(drop,
     230             :       eDrop,
     231             :       EventNameType_HTMLXUL,
     232             :       eDragEventClass)
     233           3 : EVENT(durationchange,
     234             :       eDurationChange,
     235             :       EventNameType_HTML,
     236             :       eBasicEventClass)
     237           3 : EVENT(emptied,
     238             :       eEmptied,
     239             :       EventNameType_HTML,
     240             :       eBasicEventClass)
     241           3 : EVENT(ended,
     242             :       eEnded,
     243             :       EventNameType_HTML,
     244             :       eBasicEventClass)
     245           3 : EVENT(fullscreenchange,
     246             :       eFullscreenChange,
     247             :       EventNameType_HTML,
     248             :       eBasicEventClass)
     249           3 : EVENT(fullscreenerror,
     250             :       eFullscreenError,
     251             :       EventNameType_HTML,
     252             :       eBasicEventClass)
     253           3 : EVENT(input,
     254             :       eEditorInput,
     255             :       EventNameType_HTMLXUL,
     256             :       eEditorInputEventClass)
     257           3 : EVENT(invalid,
     258             :       eFormInvalid,
     259             :       EventNameType_HTMLXUL,
     260             :       eBasicEventClass)
     261           3 : EVENT(keydown,
     262             :       eKeyDown,
     263             :       EventNameType_HTMLXUL,
     264             :       eKeyboardEventClass)
     265           3 : EVENT(keypress,
     266             :       eKeyPress,
     267             :       EventNameType_HTMLXUL,
     268             :       eKeyboardEventClass)
     269           3 : EVENT(keyup,
     270             :       eKeyUp,
     271             :       EventNameType_HTMLXUL,
     272             :       eKeyboardEventClass)
     273           3 : EVENT(mozkeydownonplugin,
     274             :       eKeyDownOnPlugin,
     275             :       EventNameType_None,
     276             :       eKeyboardEventClass)
     277           3 : EVENT(mozkeyuponplugin,
     278             :       eKeyUpOnPlugin,
     279             :       EventNameType_None,
     280             :       eKeyboardEventClass)
     281           3 : NON_IDL_EVENT(mozaccesskeynotfound,
     282             :               eAccessKeyNotFound,
     283             :               EventNameType_None,
     284             :               eKeyboardEventClass)
     285           3 : EVENT(loadeddata,
     286             :       eLoadedData,
     287             :       EventNameType_HTML,
     288             :       eBasicEventClass)
     289           3 : EVENT(loadedmetadata,
     290             :       eLoadedMetaData,
     291             :       EventNameType_HTML,
     292             :       eBasicEventClass)
     293           5 : EVENT(loadend,
     294             :       eLoadEnd,
     295             :       EventNameType_HTML,
     296             :       eBasicEventClass)
     297           5 : EVENT(loadstart,
     298             :       eLoadStart,
     299             :       EventNameType_HTML,
     300             :       eBasicEventClass)
     301           3 : EVENT(mousedown,
     302             :       eMouseDown,
     303             :       EventNameType_All,
     304             :       eMouseEventClass)
     305           3 : EVENT(mouseenter,
     306             :       eMouseEnter,
     307             :       EventNameType_All,
     308             :       eMouseEventClass)
     309           3 : EVENT(mouseleave,
     310             :       eMouseLeave,
     311             :       EventNameType_All,
     312             :       eMouseEventClass)
     313           7 : EVENT(mousemove,
     314             :       eMouseMove,
     315             :       EventNameType_All,
     316             :       eMouseEventClass)
     317           4 : EVENT(mouseout,
     318             :       eMouseOut,
     319             :       EventNameType_All,
     320             :       eMouseEventClass)
     321           3 : EVENT(mouseover,
     322             :       eMouseOver,
     323             :       EventNameType_All,
     324             :       eMouseEventClass)
     325           3 : EVENT(mouseup,
     326             :       eMouseUp,
     327             :       EventNameType_All,
     328             :       eMouseEventClass)
     329           3 : EVENT(mozfullscreenchange,
     330             :       eMozFullscreenChange,
     331             :       EventNameType_HTML,
     332             :       eBasicEventClass)
     333           3 : EVENT(mozfullscreenerror,
     334             :       eMozFullscreenError,
     335             :       EventNameType_HTML,
     336             :       eBasicEventClass)
     337           3 : EVENT(mozpointerlockchange,
     338             :       eMozPointerLockChange,
     339             :       EventNameType_HTML,
     340             :       eBasicEventClass)
     341           3 : EVENT(mozpointerlockerror,
     342             :       eMozPointerLockError,
     343             :       EventNameType_HTML,
     344             :       eBasicEventClass)
     345           3 : EVENT(pointerlockchange,
     346             :       ePointerLockChange,
     347             :       EventNameType_HTML,
     348             :       eBasicEventClass)
     349           3 : EVENT(pointerlockerror,
     350             :       ePointerLockError,
     351             :       EventNameType_HTML,
     352             :       eBasicEventClass)
     353           3 : EVENT(pointerdown,
     354             :       ePointerDown,
     355             :       EventNameType_All,
     356             :       ePointerEventClass)
     357           3 : EVENT(pointermove,
     358             :       ePointerMove,
     359             :       EventNameType_All,
     360             :       ePointerEventClass)
     361           3 : EVENT(pointerup,
     362             :       ePointerUp,
     363             :       EventNameType_All,
     364             :       ePointerEventClass)
     365           3 : EVENT(pointercancel,
     366             :       ePointerCancel,
     367             :       EventNameType_All,
     368             :       ePointerEventClass)
     369           3 : EVENT(pointerover,
     370             :       ePointerOver,
     371             :       EventNameType_All,
     372             :       ePointerEventClass)
     373           3 : EVENT(pointerout,
     374             :       ePointerOut,
     375             :       EventNameType_All,
     376             :       ePointerEventClass)
     377           3 : EVENT(pointerenter,
     378             :       ePointerEnter,
     379             :       EventNameType_All,
     380             :       ePointerEventClass)
     381           3 : EVENT(pointerleave,
     382             :       ePointerLeave,
     383             :       EventNameType_All,
     384             :       ePointerEventClass)
     385           3 : EVENT(gotpointercapture,
     386             :       ePointerGotCapture,
     387             :       EventNameType_All,
     388             :       ePointerEventClass)
     389           3 : EVENT(lostpointercapture,
     390             :       ePointerLostCapture,
     391             :       EventNameType_All,
     392             :       ePointerEventClass)
     393           3 : EVENT(selectstart,
     394             :       eSelectStart,
     395             :       EventNameType_HTMLXUL,
     396             :       eBasicEventClass)
     397             : 
     398             : // Not supported yet; probably never because "wheel" is a better idea.
     399             : // EVENT(mousewheel)
     400           3 : EVENT(pause,
     401             :       ePause,
     402             :       EventNameType_HTML,
     403             :       eBasicEventClass)
     404           3 : EVENT(play,
     405             :       ePlay,
     406             :       EventNameType_HTML,
     407             :       eBasicEventClass)
     408           3 : EVENT(playing,
     409             :       ePlaying,
     410             :       EventNameType_HTML,
     411             :       eBasicEventClass)
     412           5 : EVENT(progress,
     413             :       eProgress,
     414             :       EventNameType_HTML,
     415             :       eBasicEventClass)
     416           3 : EVENT(ratechange,
     417             :       eRateChange,
     418             :       EventNameType_HTML,
     419             :       eBasicEventClass)
     420           3 : EVENT(reset,
     421             :       eFormReset,
     422             :       EventNameType_HTMLXUL,
     423             :       eBasicEventClass)
     424           3 : EVENT(seeked,
     425             :       eSeeked,
     426             :       EventNameType_HTML,
     427             :       eBasicEventClass)
     428           3 : EVENT(seeking,
     429             :       eSeeking,
     430             :       EventNameType_HTML,
     431             :       eBasicEventClass)
     432           3 : EVENT(select,
     433             :       eFormSelect,
     434             :       EventNameType_HTMLXUL,
     435             :       eBasicEventClass)
     436           3 : EVENT(show,
     437             :       eShow,
     438             :       EventNameType_HTML,
     439             :       eBasicEventClass)
     440           3 : EVENT(stalled,
     441             :       eStalled,
     442             :       EventNameType_HTML,
     443             :       eBasicEventClass)
     444           3 : EVENT(submit,
     445             :       eFormSubmit,
     446             :       EventNameType_HTMLXUL,
     447             :       eBasicEventClass)
     448           3 : EVENT(suspend,
     449             :       eSuspend,
     450             :       EventNameType_HTML,
     451             :       eBasicEventClass)
     452           3 : EVENT(timeupdate,
     453             :       eTimeUpdate,
     454             :       EventNameType_HTML,
     455             :       eBasicEventClass)
     456           3 : EVENT(toggle,
     457             :       eToggle,
     458             :       EventNameType_HTML,
     459             :       eBasicEventClass)
     460           3 : EVENT(volumechange,
     461             :       eVolumeChange,
     462             :       EventNameType_HTML,
     463             :       eBasicEventClass)
     464           3 : EVENT(waiting,
     465             :       eWaiting,
     466             :       EventNameType_HTML,
     467             :       eBasicEventClass)
     468           3 : EVENT(wheel,
     469             :       eWheel,
     470             :       EventNameType_All,
     471             :       eWheelEventClass)
     472           3 : EVENT(copy,
     473             :       eCopy,
     474             :       EventNameType_HTMLXUL,
     475             :       eClipboardEventClass)
     476           3 : EVENT(cut,
     477             :       eCut,
     478             :       EventNameType_HTMLXUL,
     479             :       eClipboardEventClass)
     480           3 : EVENT(paste,
     481             :       ePaste,
     482             :       EventNameType_HTMLXUL,
     483             :       eClipboardEventClass)
     484             : // Gecko-specific extensions that apply to elements
     485           3 : EVENT(beforescriptexecute,
     486             :       eBeforeScriptExecute,
     487             :       EventNameType_HTMLXUL,
     488             :       eBasicEventClass)
     489           3 : EVENT(afterscriptexecute,
     490             :       eAfterScriptExecute,
     491             :       EventNameType_HTMLXUL,
     492             :       eBasicEventClass)
     493             : 
     494           3 : FORWARDED_EVENT(blur,
     495             :                 eBlur,
     496             :                 EventNameType_HTMLXUL,
     497             :                 eFocusEventClass)
     498           3 : ERROR_EVENT(error,
     499             :             eLoadError,
     500             :             EventNameType_All,
     501             :             eBasicEventClass)
     502           6 : FORWARDED_EVENT(focus,
     503             :                 eFocus,
     504             :                 EventNameType_HTMLXUL,
     505             :                 eFocusEventClass)
     506           3 : FORWARDED_EVENT(focusin,
     507             :                 eFocusIn,
     508             :                 EventNameType_HTMLXUL,
     509             :                 eFocusEventClass)
     510           3 : FORWARDED_EVENT(focusout,
     511             :                 eFocusOut,
     512             :                 EventNameType_HTMLXUL,
     513             :                 eFocusEventClass)
     514           6 : FORWARDED_EVENT(load,
     515             :                 eLoad,
     516             :                 EventNameType_All,
     517             :                 eBasicEventClass)
     518           6 : FORWARDED_EVENT(resize,
     519             :                 eResize,
     520             :                 EventNameType_All,
     521             :                 eBasicEventClass)
     522           3 : FORWARDED_EVENT(scroll,
     523             :                 eScroll,
     524             :                 (EventNameType_HTMLXUL | EventNameType_SVGSVG),
     525             :                 eBasicEventClass)
     526             : 
     527           3 : WINDOW_EVENT(afterprint,
     528             :              eAfterPrint,
     529             :              EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly,
     530             :              eBasicEventClass)
     531           3 : WINDOW_EVENT(beforeprint,
     532             :              eBeforePrint,
     533             :              EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly,
     534             :              eBasicEventClass)
     535           3 : BEFOREUNLOAD_EVENT(beforeunload,
     536             :                    eBeforeUnload,
     537             :                    EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly,
     538             :                    eBasicEventClass)
     539           3 : WINDOW_EVENT(hashchange,
     540             :              eHashChange,
     541             :              EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly,
     542             :              eBasicEventClass)
     543           3 : WINDOW_EVENT(languagechange,
     544             :              eLanguageChange,
     545             :              EventNameType_HTMLBodyOrFramesetOnly,
     546             :              eBasicEventClass)
     547             : // XXXbz Should the onmessage attribute on <body> really not work?  If so, do we
     548             : // need a different macro to flag things like that (IDL, but not content
     549             : // attributes on body/frameset), or is just using EventNameType_None enough?
     550           3 : WINDOW_EVENT(message,
     551             :              eMessage,
     552             :              EventNameType_None,
     553             :              eBasicEventClass)
     554           3 : WINDOW_EVENT(offline,
     555             :              eOffline,
     556             :              EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly,
     557             :              eBasicEventClass)
     558           3 : WINDOW_EVENT(online,
     559             :              eOnline,
     560             :              EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly,
     561             :              eBasicEventClass)
     562             : #if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
     563             : WINDOW_EVENT(orientationchange,
     564             :              eOrientationChange,
     565             :              EventNameType_HTMLBodyOrFramesetOnly,
     566             :              eBasicEventClass)
     567             : #endif
     568           7 : WINDOW_EVENT(pagehide,
     569             :              ePageHide,
     570             :              EventNameType_HTMLBodyOrFramesetOnly,
     571             :              eBasicEventClass)
     572          13 : WINDOW_EVENT(pageshow,
     573             :              ePageShow,
     574             :              EventNameType_HTMLBodyOrFramesetOnly,
     575             :              eBasicEventClass)
     576           3 : WINDOW_EVENT(popstate,
     577             :              ePopState,
     578             :              EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly,
     579             :              eBasicEventClass)
     580             : // Not supported yet
     581             : // WINDOW_EVENT(redo)
     582           3 : WINDOW_EVENT(storage,
     583             :              eStorage,
     584             :              EventNameType_HTMLBodyOrFramesetOnly,
     585             :              eBasicEventClass)
     586             : // Not supported yet
     587             : // WINDOW_EVENT(undo)
     588           4 : WINDOW_EVENT(unload,
     589             :              eUnload,
     590             :              (EventNameType_XUL | EventNameType_SVGSVG |
     591             :               EventNameType_HTMLBodyOrFramesetOnly),
     592             :              eBasicEventClass)
     593             : 
     594           3 : WINDOW_ONLY_EVENT(devicemotion,
     595             :                   eDeviceMotion,
     596             :                   EventNameType_None,
     597             :                   eBasicEventClass)
     598           3 : WINDOW_ONLY_EVENT(deviceorientation,
     599             :                   eDeviceOrientation,
     600             :                   EventNameType_None,
     601             :                   eBasicEventClass)
     602           3 : WINDOW_ONLY_EVENT(absolutedeviceorientation,
     603             :                   eAbsoluteDeviceOrientation,
     604             :                   EventNameType_None,
     605             :                   eBasicEventClass)
     606           3 : WINDOW_ONLY_EVENT(deviceproximity,
     607             :                   eDeviceProximity,
     608             :                   EventNameType_None,
     609             :                   eBasicEventClass)
     610           3 : WINDOW_ONLY_EVENT(userproximity,
     611             :                   eUserProximity,
     612             :                   EventNameType_None,
     613             :                   eBasicEventClass)
     614           3 : WINDOW_ONLY_EVENT(devicelight,
     615             :                   eDeviceLight,
     616             :                   EventNameType_None,
     617             :                   eBasicEventClass)
     618           3 : WINDOW_ONLY_EVENT(vrdisplayactivate,
     619             :                   eVRDisplayActivate,
     620             :                   EventNameType_None,
     621             :                   eBasicEventClass)
     622           3 : WINDOW_ONLY_EVENT(vrdisplaydeactivate,
     623             :                   eVRDisplayDeactivate,
     624             :                   EventNameType_None,
     625             :                   eBasicEventClass)
     626           3 : WINDOW_ONLY_EVENT(vrdisplayconnect,
     627             :                   eVRDisplayConnect,
     628             :                   EventNameType_None,
     629             :                   eBasicEventClass)
     630           3 : WINDOW_ONLY_EVENT(vrdisplaydisconnect,
     631             :                   eVRDisplayDisconnect,
     632             :                   EventNameType_None,
     633             :                   eBasicEventClass)
     634           3 : WINDOW_ONLY_EVENT(vrdisplaypresentchange,
     635             :                   eVRDisplayPresentChange,
     636             :                   EventNameType_None,
     637             :                   eBasicEventClass)
     638             : // Install events as per W3C Manifest spec
     639           3 : WINDOW_ONLY_EVENT(appinstalled,
     640             :                   eAppInstalled,
     641             :                   EventNameType_None,
     642             :                   eBasicEventClass)
     643             : 
     644             : 
     645             : #ifdef MOZ_B2G
     646             : WINDOW_ONLY_EVENT(moztimechange,
     647             :                   eTimeChange,
     648             :                   EventNameType_None,
     649             :                   eBasicEventClass)
     650             : WINDOW_ONLY_EVENT(moznetworkupload,
     651             :                   eNetworkUpload,
     652             :                   EventNameType_None,
     653             :                   eBasicEventClass)
     654             : WINDOW_ONLY_EVENT(moznetworkdownload,
     655             :                   eNetworkDownload,
     656             :                   EventNameType_None,
     657             :                   eBasicEventClass)
     658             : #endif // MOZ_B2G
     659             : 
     660           0 : TOUCH_EVENT(touchstart,
     661             :             eTouchStart,
     662             :             EventNameType_All,
     663             :             eTouchEventClass)
     664           0 : TOUCH_EVENT(touchend,
     665             :             eTouchEnd,
     666             :             EventNameType_All,
     667             :             eTouchEventClass)
     668           0 : TOUCH_EVENT(touchmove,
     669             :             eTouchMove,
     670             :             EventNameType_All,
     671             :             eTouchEventClass )
     672           0 : TOUCH_EVENT(touchcancel,
     673             :             eTouchCancel,
     674             :             EventNameType_All,
     675             :             eTouchEventClass)
     676             : 
     677          12 : DOCUMENT_ONLY_EVENT(readystatechange,
     678             :                     eReadyStateChange,
     679             :                     EventNameType_HTMLXUL,
     680             :                     eBasicEventClass)
     681          11 : DOCUMENT_ONLY_EVENT(selectionchange,
     682             :                     eSelectionChange,
     683             :                     EventNameType_HTMLXUL,
     684             :                     eBasicEventClass)
     685             : 
     686           3 : NON_IDL_EVENT(MozMouseHittest,
     687             :               eMouseHitTest,
     688             :               EventNameType_None,
     689             :               eMouseEventClass)
     690             : 
     691           3 : NON_IDL_EVENT(DOMAttrModified,
     692             :               eLegacyAttrModified,
     693             :               EventNameType_HTMLXUL,
     694             :               eMutationEventClass)
     695           3 : NON_IDL_EVENT(DOMCharacterDataModified,
     696             :               eLegacyCharacterDataModified,
     697             :               EventNameType_HTMLXUL,
     698             :               eMutationEventClass)
     699           3 : NON_IDL_EVENT(DOMNodeInserted,
     700             :               eLegacyNodeInserted,
     701             :               EventNameType_HTMLXUL,
     702             :               eMutationEventClass)
     703           3 : NON_IDL_EVENT(DOMNodeRemoved,
     704             :               eLegacyNodeRemoved,
     705             :               EventNameType_HTMLXUL,
     706             :               eMutationEventClass)
     707           3 : NON_IDL_EVENT(DOMNodeInsertedIntoDocument,
     708             :               eLegacyNodeInsertedIntoDocument,
     709             :               EventNameType_HTMLXUL,
     710             :               eMutationEventClass)
     711           3 : NON_IDL_EVENT(DOMNodeRemovedFromDocument,
     712             :               eLegacyNodeRemovedFromDocument,
     713             :               EventNameType_HTMLXUL,
     714             :               eMutationEventClass)
     715           3 : NON_IDL_EVENT(DOMSubtreeModified,
     716             :               eLegacySubtreeModified,
     717             :               EventNameType_HTMLXUL,
     718             :               eMutationEventClass)
     719             : 
     720           3 : NON_IDL_EVENT(DOMActivate,
     721             :               eLegacyDOMActivate,
     722             :               EventNameType_HTMLXUL,
     723             :               eUIEventClass)
     724           3 : NON_IDL_EVENT(DOMFocusIn,
     725             :               eLegacyDOMFocusIn,
     726             :               EventNameType_HTMLXUL,
     727             :               eUIEventClass)
     728           3 : NON_IDL_EVENT(DOMFocusOut,
     729             :               eLegacyDOMFocusOut,
     730             :               EventNameType_HTMLXUL,
     731             :               eUIEventClass)
     732             : 
     733           3 : NON_IDL_EVENT(DOMMouseScroll,
     734             :               eLegacyMouseLineOrPageScroll,
     735             :               EventNameType_HTMLXUL,
     736             :               eMouseScrollEventClass)
     737           3 : NON_IDL_EVENT(MozMousePixelScroll,
     738             :               eLegacyMousePixelScroll,
     739             :               EventNameType_HTMLXUL,
     740             :               eMouseScrollEventClass)
     741             : 
     742           3 : NON_IDL_EVENT(open,
     743             :               eOpen,
     744             :               EventNameType_None,
     745             :               eBasicEventClass)
     746             : 
     747           3 : NON_IDL_EVENT(dataavailable,
     748             :               eMediaRecorderDataAvailable,
     749             :               EventNameType_None,
     750             :               eBasicEventClass)
     751             : 
     752           3 : NON_IDL_EVENT(stop,
     753             :               eMediaRecorderStop,
     754             :               EventNameType_None,
     755             :               eBasicEventClass)
     756             : 
     757           3 : NON_IDL_EVENT(warning,
     758             :               eMediaRecorderWarning,
     759             :               EventNameType_None,
     760             :               eBasicEventClass)
     761             : 
     762             : // Events that only have on* attributes on XUL elements
     763             : 
     764             :  // "text" event is legacy event for modifying composition string in EditorBase.
     765             :  // This shouldn't be used by web/xul apps.  "compositionupdate" should be
     766             :  // used instead.
     767           3 : NON_IDL_EVENT(text,
     768             :               eCompositionChange,
     769             :               EventNameType_XUL,
     770             :               eCompositionEventClass)
     771           3 : NON_IDL_EVENT(compositionstart,
     772             :               eCompositionStart,
     773             :               EventNameType_XUL,
     774             :               eCompositionEventClass)
     775           3 : NON_IDL_EVENT(compositionupdate,
     776             :               eCompositionUpdate,
     777             :               EventNameType_XUL,
     778             :               eCompositionEventClass)
     779           3 : NON_IDL_EVENT(compositionend,
     780             :               eCompositionEnd,
     781             :               EventNameType_XUL,
     782             :               eCompositionEventClass)
     783           3 : NON_IDL_EVENT(command,
     784             :               eXULCommand,
     785             :               EventNameType_XUL,
     786             :               eInputEventClass)
     787           3 : NON_IDL_EVENT(popupshowing,
     788             :               eXULPopupShowing,
     789             :               EventNameType_XUL,
     790             :               eBasicEventClass)
     791           3 : NON_IDL_EVENT(popupshown,
     792             :               eXULPopupShown,
     793             :               EventNameType_XUL,
     794             :               eBasicEventClass)
     795           3 : NON_IDL_EVENT(popuppositioned,
     796             :               eXULPopupPositioned,
     797             :               EventNameType_XUL,
     798             :               eBasicEventClass)
     799           3 : NON_IDL_EVENT(popuphiding,
     800             :               eXULPopupHiding,
     801             :               EventNameType_XUL,
     802             :               eBasicEventClass)
     803           3 : NON_IDL_EVENT(popuphidden,
     804             :               eXULPopupHidden,
     805             :               EventNameType_XUL,
     806             :               eBasicEventClass)
     807           3 : NON_IDL_EVENT(broadcast,
     808             :               eXULBroadcast,
     809             :               EventNameType_XUL,
     810             :               eBasicEventClass)
     811           3 : NON_IDL_EVENT(commandupdate,
     812             :               eXULCommandUpdate,
     813             :               EventNameType_XUL,
     814             :               eBasicEventClass)
     815          15 : NON_IDL_EVENT(overflow,
     816             :               eScrollPortOverflow,
     817             :               EventNameType_XUL,
     818             :               eBasicEventClass)
     819           3 : NON_IDL_EVENT(underflow,
     820             :               eScrollPortUnderflow,
     821             :               EventNameType_XUL,
     822             :               eBasicEventClass)
     823             : 
     824             : // Various SVG events
     825           3 : NON_IDL_EVENT(SVGLoad,
     826             :               eSVGLoad,
     827             :               EventNameType_None,
     828             :               eBasicEventClass)
     829           3 : NON_IDL_EVENT(SVGUnload,
     830             :               eSVGUnload,
     831             :               EventNameType_None,
     832             :               eBasicEventClass)
     833           3 : NON_IDL_EVENT(SVGResize,
     834             :               eSVGResize,
     835             :               EventNameType_None,
     836             :               eBasicEventClass)
     837           3 : NON_IDL_EVENT(SVGScroll,
     838             :               eSVGScroll,
     839             :               EventNameType_None,
     840             :               eBasicEventClass)
     841             : 
     842             : // Only map the ID to the real event name when MESSAGE_TO_EVENT is defined.
     843             : #ifndef MESSAGE_TO_EVENT
     844             : NON_IDL_EVENT(begin,
     845             :               eSMILBeginEvent,
     846             :               EventNameType_SMIL,
     847             :               eBasicEventClass)
     848             : #endif
     849           6 : NON_IDL_EVENT(beginEvent,
     850             :               eSMILBeginEvent,
     851             :               EventNameType_None,
     852             :               eSMILTimeEventClass)
     853             : // Only map the ID to the real event name when MESSAGE_TO_EVENT is defined.
     854             : #ifndef MESSAGE_TO_EVENT
     855             : NON_IDL_EVENT(end,
     856             :               eSMILEndEvent,
     857             :               EventNameType_SMIL,
     858             :               eBasicEventClass)
     859             : #endif
     860           6 : NON_IDL_EVENT(endEvent,
     861             :               eSMILEndEvent,
     862             :               EventNameType_None,
     863             :               eSMILTimeEventClass)
     864             : // Only map the ID to the real event name when MESSAGE_TO_EVENT is defined.
     865             : #ifndef MESSAGE_TO_EVENT
     866             : NON_IDL_EVENT(repeat,
     867             :               eSMILRepeatEvent,
     868             :               EventNameType_SMIL,
     869             :               eBasicEventClass)
     870             : #endif
     871           6 : NON_IDL_EVENT(repeatEvent,
     872             :               eSMILRepeatEvent,
     873             :               EventNameType_None,
     874             :               eSMILTimeEventClass)
     875             : 
     876           3 : NON_IDL_EVENT(MozAfterPaint,
     877             :               eAfterPaint,
     878             :               EventNameType_None,
     879             :               eBasicEventClass)
     880             : 
     881           3 : NON_IDL_EVENT(MozScrolledAreaChanged,
     882             :               eScrolledAreaChanged,
     883             :               EventNameType_None,
     884             :               eScrollAreaEventClass)
     885             : 
     886           3 : NON_IDL_EVENT(gamepadbuttondown,
     887             :               eGamepadButtonDown,
     888             :               EventNameType_None,
     889             :               eBasicEventClass)
     890           3 : NON_IDL_EVENT(gamepadbuttonup,
     891             :               eGamepadButtonUp,
     892             :               EventNameType_None,
     893             :               eBasicEventClass)
     894           3 : NON_IDL_EVENT(gamepadaxismove,
     895             :               eGamepadAxisMove,
     896             :               EventNameType_None,
     897             :               eBasicEventClass)
     898           3 : NON_IDL_EVENT(gamepadconnected,
     899             :               eGamepadConnected,
     900             :               EventNameType_None,
     901             :               eBasicEventClass)
     902           3 : NON_IDL_EVENT(gamepaddisconnected,
     903             :               eGamepadDisconnected,
     904             :               EventNameType_None,
     905             :               eBasicEventClass)
     906             : 
     907             : // Simple gesture events
     908           3 : NON_IDL_EVENT(MozSwipeGestureMayStart,
     909             :               eSwipeGestureMayStart,
     910             :               EventNameType_None,
     911             :               eSimpleGestureEventClass)
     912           3 : NON_IDL_EVENT(MozSwipeGestureStart,
     913             :               eSwipeGestureStart,
     914             :               EventNameType_None,
     915             :               eSimpleGestureEventClass)
     916           3 : NON_IDL_EVENT(MozSwipeGestureUpdate,
     917             :               eSwipeGestureUpdate,
     918             :               EventNameType_None,
     919             :               eSimpleGestureEventClass)
     920           3 : NON_IDL_EVENT(MozSwipeGestureEnd,
     921             :               eSwipeGestureEnd,
     922             :               EventNameType_None,
     923             :               eSimpleGestureEventClass)
     924           3 : NON_IDL_EVENT(MozSwipeGesture,
     925             :               eSwipeGesture,
     926             :               EventNameType_None,
     927             :               eSimpleGestureEventClass)
     928           3 : NON_IDL_EVENT(MozMagnifyGestureStart,
     929             :               eMagnifyGestureStart,
     930             :               EventNameType_None,
     931             :               eSimpleGestureEventClass)
     932           3 : NON_IDL_EVENT(MozMagnifyGestureUpdate,
     933             :               eMagnifyGestureUpdate,
     934             :               EventNameType_None,
     935             :               eSimpleGestureEventClass)
     936           3 : NON_IDL_EVENT(MozMagnifyGesture,
     937             :               eMagnifyGesture,
     938             :               EventNameType_None,
     939             :               eSimpleGestureEventClass)
     940           3 : NON_IDL_EVENT(MozRotateGestureStart,
     941             :               eRotateGestureStart,
     942             :               EventNameType_None,
     943             :               eSimpleGestureEventClass)
     944           3 : NON_IDL_EVENT(MozRotateGestureUpdate,
     945             :               eRotateGestureUpdate,
     946             :               EventNameType_None,
     947             :               eSimpleGestureEventClass)
     948           3 : NON_IDL_EVENT(MozRotateGesture,
     949             :               eRotateGesture,
     950             :               EventNameType_None,
     951             :               eSimpleGestureEventClass)
     952           3 : NON_IDL_EVENT(MozTapGesture,
     953             :               eTapGesture,
     954             :               EventNameType_None,
     955             :               eSimpleGestureEventClass)
     956           3 : NON_IDL_EVENT(MozPressTapGesture,
     957             :               ePressTapGesture,
     958             :               EventNameType_None,
     959             :               eSimpleGestureEventClass)
     960           3 : NON_IDL_EVENT(MozEdgeUIStarted,
     961             :               eEdgeUIStarted,
     962             :               EventNameType_None,
     963             :               eSimpleGestureEventClass)
     964           3 : NON_IDL_EVENT(MozEdgeUICanceled,
     965             :               eEdgeUICanceled,
     966             :               EventNameType_None,
     967             :               eSimpleGestureEventClass)
     968           3 : NON_IDL_EVENT(MozEdgeUICompleted,
     969             :               eEdgeUICompleted,
     970             :               EventNameType_None,
     971             :               eSimpleGestureEventClass)
     972             : 
     973             : // CSS Transition & Animation events:
     974           3 : EVENT(transitionstart,
     975             :       eTransitionStart,
     976             :       EventNameType_All,
     977             :       eTransitionEventClass)
     978           3 : EVENT(transitionrun,
     979             :       eTransitionRun,
     980             :       EventNameType_All,
     981             :       eTransitionEventClass)
     982           3 : EVENT(transitionend,
     983             :       eTransitionEnd,
     984             :       EventNameType_All,
     985             :       eTransitionEventClass)
     986           3 : EVENT(transitioncancel,
     987             :       eTransitionCancel,
     988             :       EventNameType_All,
     989             :       eTransitionEventClass)
     990           3 : EVENT(animationstart,
     991             :       eAnimationStart,
     992             :       EventNameType_All,
     993             :       eAnimationEventClass)
     994           3 : EVENT(animationend,
     995             :       eAnimationEnd,
     996             :       EventNameType_All,
     997             :       eAnimationEventClass)
     998           3 : EVENT(animationiteration,
     999             :       eAnimationIteration,
    1000             :       EventNameType_All,
    1001             :       eAnimationEventClass)
    1002           3 : EVENT(animationcancel,
    1003             :       eAnimationCancel,
    1004             :       EventNameType_All,
    1005             :       eAnimationEventClass)
    1006             : 
    1007             : // Webkit-prefixed versions of Transition & Animation events, for web compat:
    1008           6 : EVENT(webkitAnimationEnd,
    1009             :       eWebkitAnimationEnd,
    1010             :       EventNameType_All,
    1011             :       eAnimationEventClass)
    1012           6 : EVENT(webkitAnimationIteration,
    1013             :       eWebkitAnimationIteration,
    1014             :       EventNameType_All,
    1015             :       eAnimationEventClass)
    1016           6 : EVENT(webkitAnimationStart,
    1017             :       eWebkitAnimationStart,
    1018             :       EventNameType_All,
    1019             :       eAnimationEventClass)
    1020           6 : EVENT(webkitTransitionEnd,
    1021             :       eWebkitTransitionEnd,
    1022             :       EventNameType_All,
    1023             :       eTransitionEventClass)
    1024             : #ifndef MESSAGE_TO_EVENT
    1025           0 : EVENT(webkitanimationend,
    1026             :       eWebkitAnimationEnd,
    1027             :       EventNameType_All,
    1028             :       eAnimationEventClass)
    1029           0 : EVENT(webkitanimationiteration,
    1030             :       eWebkitAnimationIteration,
    1031             :       EventNameType_All,
    1032             :       eAnimationEventClass)
    1033           0 : EVENT(webkitanimationstart,
    1034             :       eWebkitAnimationStart,
    1035             :       EventNameType_All,
    1036             :       eAnimationEventClass)
    1037           0 : EVENT(webkittransitionend,
    1038             :       eWebkitTransitionEnd,
    1039             :       EventNameType_All,
    1040             :       eTransitionEventClass)
    1041             : #endif
    1042             : 
    1043           3 : NON_IDL_EVENT(audioprocess,
    1044             :               eAudioProcess,
    1045             :               EventNameType_None,
    1046             :               eBasicEventClass)
    1047             : 
    1048           3 : NON_IDL_EVENT(complete,
    1049             :               eAudioComplete,
    1050             :               EventNameType_None,
    1051             :               eBasicEventClass)
    1052             : 
    1053             : #ifdef DEFINED_FORWARDED_EVENT
    1054             : #undef DEFINED_FORWARDED_EVENT
    1055             : #undef FORWARDED_EVENT
    1056             : #endif /* DEFINED_FORWARDED_EVENT */
    1057             : 
    1058             : #ifdef DEFINED_WINDOW_EVENT
    1059             : #undef DEFINED_WINDOW_EVENT
    1060             : #undef WINDOW_EVENT
    1061             : #endif /* DEFINED_WINDOW_EVENT */
    1062             : 
    1063             : #ifdef DEFINED_WINDOW_ONLY_EVENT
    1064             : #undef DEFINED_WINDOW_ONLY_EVENT
    1065             : #undef WINDOW_ONLY_EVENT
    1066             : #endif /* DEFINED_WINDOW_ONLY_EVENT */
    1067             : 
    1068             : #ifdef DEFINED_TOUCH_EVENT
    1069             : #undef DEFINED_TOUCH_EVENT
    1070             : #undef TOUCH_EVENT
    1071             : #endif /* DEFINED_TOUCH_EVENT */
    1072             : 
    1073             : #ifdef DEFINED_DOCUMENT_ONLY_EVENT
    1074             : #undef DEFINED_DOCUMENT_ONLY_EVENT
    1075             : #undef DOCUMENT_ONLY_EVENT
    1076             : #endif /* DEFINED_DOCUMENT_ONLY_EVENT */
    1077             : 
    1078             : #ifdef DEFINED_NON_IDL_EVENT
    1079             : #undef DEFINED_NON_IDL_EVENT
    1080             : #undef NON_IDL_EVENT
    1081             : #endif /* DEFINED_NON_IDL_EVENT */
    1082             : 
    1083             : #ifdef DEFINED_ERROR_EVENT
    1084             : #undef DEFINED_ERROR_EVENT
    1085             : #undef ERROR_EVENT
    1086             : #endif /* DEFINED_ERROR_EVENT */
    1087             : 
    1088             : #ifdef DEFINED_BEFOREUNLOAD_EVENT
    1089             : #undef DEFINED_BEFOREUNLOAD_EVENT
    1090             : #undef BEFOREUNLOAD_EVENT
    1091             : #endif /* BEFOREUNLOAD_EVENT */
    1092             : 
    1093             : #ifdef MESSAGE_TO_EVENT
    1094             : #undef EVENT
    1095             : #undef WINDOW_ONLY_EVENT
    1096             : #undef TOUCH_EVENT
    1097             : #undef DOCUMENT_ONLY_EVENT
    1098             : #undef NON_IDL_EVENT
    1099             : #endif /* MESSAGE_TO_EVENT */

Generated by: LCOV version 1.13