Merge pull request #2816 from Ms2ger/bindings.conf

Cleanup Bindings.conf.
This commit is contained in:
Josh Matthews 2014-07-13 10:21:37 -04:00
commit 093d8e3216
4 changed files with 20 additions and 114 deletions

View file

@ -15,122 +15,13 @@
DOMInterfaces = {
'Attr': {},
'AudioBuffer': {},
'AttrList': {},
'Blob': {},
'CanvasRenderingContext2D': {},
'CharacterData': {},
'ClientRect': {},
'ClientRectList': {},
'Comment': {},
'Console': {},
'CustomEvent': {},
'Document': {},
'DocumentFragment': {},
'DocumentType': {},
'DOMException': {},
'DOMImplementation': {},
'DOMParser': {},
'DOMTokenList': {},
'Element': {},
'Event': {},
'EventHandler': {},
'EventListener': {
'nativeType': 'EventListenerBinding::EventListener',
},
'EventTarget': {},
'File': {},
'FormData': {},
'HTMLAnchorElement': {},
'HTMLAppletElement': {},
'HTMLAreaElement': {},
'HTMLAudioElement': {},
'HTMLButtonElement': {},
'HTMLBaseElement': {},
'HTMLBodyElement': {},
'HTMLBRElement': {},
'HTMLCanvasElement': {},
'HTMLCollection': {},
'HTMLDataElement': {},
'HTMLDivElement': {},
'HTMLDataListElement': {},
'HTMLDirectoryElement': {},
'HTMLDListElement': {},
'HTMLElement': {},
'HTMLEmbedElement': {},
'HTMLFieldSetElement': {},
'HTMLFontElement': {},
'HTMLFormElement': {},
'HTMLFrameElement': {},
'HTMLFrameSetElement': {},
'HTMLHeadElement': {},
'HTMLHeadingElement': {},
'HTMLHtmlElement': {},
'HTMLHRElement': {},
'HTMLIFrameElement': {},
'HTMLImageElement': {},
'HTMLInputElement': {},
'HTMLLabelElement': {},
'HTMLLegendElement': {},
'HTMLLIElement': {},
'HTMLLinkElement': {},
'HTMLMapElement': {},
'HTMLMediaElement': {},
'HTMLMetaElement': {},
'HTMLMeterElement': {},
'HTMLModElement': {},
'HTMLObjectElement': {},
'HTMLOListElement': {},
'HTMLOptGroupElement': {},
'HTMLOptionElement': {},
'HTMLOutputElement': {},
'HTMLParagraphElement': {},
'HTMLParamElement': {},
'HTMLPreElement': {},
'HTMLProgressElement': {},
'HTMLQuoteElement': {},
'HTMLScriptElement': {},
'HTMLSelectElement': {},
'HTMLSourceElement': {},
'HTMLSpanElement': {},
'HTMLStyleElement': {},
'HTMLTableCaptionElement': {},
'HTMLTableElement': {},
'HTMLTableCellElement': {},
'HTMLTableDataCellElement': {},
'HTMLTableHeaderCellElement': {},
'HTMLTableColElement': {},
'HTMLTableRowElement': {},
'HTMLTableSectionElement': {},
'HTMLTemplateElement': {},
'HTMLTextAreaElement': {},
'HTMLTimeElement': {},
'HTMLTitleElement': {},
'HTMLTrackElement': {},
'HTMLUListElement': {},
'HTMLVideoElement': {},
'HTMLUnknownElement': {},
'Location': {},
'MouseEvent': {},
'Navigator': {},
'Node': {},
'NodeList': {},
'Performance': {},
'PerformanceTiming': {},
'ProcessingInstruction': {},
'ProgressEvent': {},
'Text': {},
'UIEvent': {},
'URLSearchParams': {},
'ValidityState': {},
'Window': {
'createGlobal': True,
'outerObjectHook': 'Some(bindings::utils::outerize_global)',
},
'XMLHttpRequest': {},
'XMLHttpRequestEventTarget': {},
'XMLHttpRequestUpload': {},
#FIXME(jdm): This should be 'register': False, but then we don't generate enum types
'TestBinding': {},

View file

@ -2,6 +2,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from WebIDL import IDLInterface
autogenerated_comment = "/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */\n"
class Configuration:
@ -22,11 +24,23 @@ class Configuration:
self.interfaces = {}
self.maxProtoChainLength = 0;
for thing in parseData:
if not thing.isInterface(): continue
# Some toplevel things are sadly types, and those have an
# isInterface that doesn't mean the same thing as IDLObject's
# isInterface()...
if not isinstance(thing, IDLInterface):
continue
iface = thing
if iface.identifier.name not in config: continue
self.interfaces[iface.identifier.name] = iface
entry = config[iface.identifier.name]
if iface.identifier.name not in config:
# Completely skip consequential interfaces with no descriptor
# if they have no interface object because chances are we
# don't need to do anything interesting with them.
if iface.isConsequential() and not iface.hasInterfaceObject():
continue
entry = {}
else:
entry = config[iface.identifier.name]
if not isinstance(entry, list):
assert isinstance(entry, dict)
entry = [entry]

View file

@ -35,10 +35,10 @@ interface WindowEventHandlers {
// whether an ErrorEvent was fired. We don't do that, and until we do we'll
// need to distinguish between onerror on Window or on nodes.
[NoInterfaceObject]
/*[NoInterfaceObject]
interface OnErrorEventHandlerForNodes {
attribute EventHandler onerror;
};
};*/
[NoInterfaceObject]
interface OnErrorEventHandlerForWindow {

View file

@ -60,6 +60,7 @@ Window implements GlobalEventHandlers;
Window implements WindowEventHandlers;
// http://www.whatwg.org/html/#windowtimers
[NoInterfaceObject/*, Exposed=Window,Worker*/]
interface WindowTimers {
//long setTimeout(Function handler, optional long timeout = 0, any... arguments);
//long setTimeout(DOMString handler, optional long timeout = 0, any... arguments);