Bug 675405 part 1. Create a header that defines the various event names in HTML5. r=smaug
authorBoris Zbarsky <bzbarsky@mit.edu>
Sun, 07 Aug 2011 22:26:52 -0400
changeset 73969 e2f2476215cd7b5780d66a74d93a57241300b9e8
parent 73968 9954f0235bc83ce3d0ea4c70e05f6998c8e892b4
child 73970 28a12583603ba6b8d6dc65662b98c19f7201095c
push id1039
push userbzbarsky@mozilla.com
push dateMon, 08 Aug 2011 02:36:57 +0000
treeherdermozilla-inbound@840e9e5c5059 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs675405
milestone8.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 675405 part 1. Create a header that defines the various event names in HTML5. r=smaug
content/events/public/Makefile.in
content/events/public/nsEventNameList.h
--- a/content/events/public/Makefile.in
+++ b/content/events/public/Makefile.in
@@ -48,16 +48,17 @@ XPIDL_MODULE	= content_events
 EXPORTS		= \
 		nsMutationEvent.h \
 		nsIPrivateDOMEvent.h \
 		nsIPrivateTextEvent.h \
 		nsIPrivateTextRange.h \
 		nsPLDOMEvent.h \
 		nsEventDispatcher.h \
 		nsEventStates.h \
+		nsEventNameList.h \
 		$(NULL)
 
 XPIDLSRCS	= \
 		nsIEventListenerService.idl \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
new file mode 100644
--- /dev/null
+++ b/content/events/public/nsEventNameList.h
@@ -0,0 +1,160 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is the Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Boris Zbarsky <bzbarsky@mit.edu>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * 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 ***** */
+
+/*
+ * This file contains the list of event names that are exposed via IDL
+ * on various objects.  It is designed to be used as inline input to
+ * various consumers through the magic of C preprocessing.
+ *
+ * Each entry is the name of an event.
+ *
+ * Event names that are exposed as content attributes on HTML elements
+ * and as IDL attributes on Elements, Documents and Windows and have
+ * no forwarding behavior should be enclosed in the EVENT macro.
+ *
+ * Event names that are exposed as content attributes on HTML elements
+ * and as IDL attributes on Elements, Documents and Windows and are
+ * forwarded from <body> and <frameset> to the Window should be
+ * enclosed in the FORWARDED_EVENT macro.  If this macro is not
+ * defined, it will be defined to be equivalent to EVENT.
+ *
+ * Event names that are exposed as content and IDL attributes on
+ * <body> and <frameset>, which forward them to the Window, and are
+ * exposed as IDL attributes on the Window should be enclosed in the
+ * WINDOW_EVENT macro.  If this macro is not defined, it will be
+ * defined to the empty string.
+ */
+
+#ifdef DEFINED_FORWARDED_EVENT
+#error "Don't define DEFINED_FORWARDED_EVENT"
+#endif /* DEFINED_FORWARDED_EVENT */
+
+#ifndef FORWARDED_EVENT
+#define FORWARDED_EVENT(_name) EVENT(_name)
+#define DEFINED_FORWARDED_EVENT
+#endif /* FORWARDED_EVENT */
+
+#ifdef DEFINED_WINDOW_EVENT
+#error "Don't define DEFINED_WINDOW_EVENT"
+#endif /* DEFINED_WINDOW_EVENT */
+
+#ifndef WINDOW_EVENT
+#define WINDOW_EVENT(_name)
+#define DEFINED_WINDOW_EVENT
+#endif /* WINDOW_EVENT */
+
+EVENT(abort)
+EVENT(canplay)
+EVENT(canplaythrough)
+EVENT(change)
+EVENT(click)
+EVENT(contextmenu)
+EVENT(cuechange)
+EVENT(dblclick)
+EVENT(drag)
+EVENT(dragend)
+EVENT(dragenter)
+EVENT(dragleave)
+EVENT(dragover)
+EVENT(dragstart)
+EVENT(drop)
+EVENT(durationchange)
+EVENT(emptied)
+EVENT(ended)
+EVENT(input)
+EVENT(invalid)
+EVENT(keydown)
+EVENT(keypress)
+EVENT(keyup)
+EVENT(loadeddata)
+EVENT(loadedmetadata)
+EVENT(loadstart)
+EVENT(mousedown)
+EVENT(mousemove)
+EVENT(mouseout)
+EVENT(mouseover)
+EVENT(mouseup)
+EVENT(mousewheel)
+EVENT(pause)
+EVENT(play)
+EVENT(playing)
+EVENT(progress)
+EVENT(ratechange)
+EVENT(readystatechange)
+EVENT(reset)
+EVENT(seeked)
+EVENT(seeking)
+EVENT(select)
+EVENT(show)
+EVENT(stalled)
+EVENT(submit)
+EVENT(suspend)
+EVENT(timeupdate)
+EVENT(volumechange)
+EVENT(waiting)
+
+FORWARDED_EVENT(blur)
+FORWARDED_EVENT(error)
+FORWARDED_EVENT(focus)
+FORWARDED_EVENT(load)
+FORWARDED_EVENT(scroll)
+
+WINDOW_EVENT(afterprint)
+WINDOW_EVENT(beforeprint)
+WINDOW_EVENT(beforeunload)
+WINDOW_EVENT(hashchange)
+WINDOW_EVENT(message)
+WINDOW_EVENT(offline)
+WINDOW_EVENT(online)
+WINDOW_EVENT(pagehide)
+WINDOW_EVENT(pageshow)
+WINDOW_EVENT(popstate)
+WINDOW_EVENT(redo)
+WINDOW_EVENT(resize)
+WINDOW_EVENT(storage)
+WINDOW_EVENT(undo)
+WINDOW_EVENT(unload)
+
+#ifdef DEFINED_FORWARDED_EVENT
+#undef DEFINED_FORWARDED_EVENT
+#undef FORWARDED_EVENT
+#endif /* DEFINED_FORWARDED_EVENT */
+
+#ifdef DEFINED_WINDOW_EVENT
+#undef DEFINED_WINDOW_EVENT
+#undef WINDOW_EVENT
+#endif /* DEFINED_WINDOW_EVENT */