mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Add KeyboardEvent stub.
This commit is contained in:
parent
1c64dabb15
commit
bb7074698a
9 changed files with 122 additions and 24 deletions
|
@ -4280,7 +4280,7 @@ class CGDictionary(CGThing):
|
|||
d = self.dictionary
|
||||
if d.parent:
|
||||
inheritance = " pub parent: %s::%s<'a, 'b>,\n" % (self.makeModuleName(d.parent),
|
||||
self.makeClassName(d.parent))
|
||||
self.makeClassName(d.parent))
|
||||
else:
|
||||
inheritance = ""
|
||||
memberDecls = [" pub %s: %s," %
|
||||
|
@ -4347,12 +4347,7 @@ class CGDictionary(CGThing):
|
|||
|
||||
@staticmethod
|
||||
def makeModuleName(dictionary):
|
||||
name = dictionary.identifier.name
|
||||
if name.endswith('Init'):
|
||||
return toBindingNamespace(name.replace('Init', ''))
|
||||
#XXXjdm This breaks on the test webidl files, sigh.
|
||||
#raise TypeError("No idea how to find this dictionary's definition: " + name)
|
||||
return "/* uh oh */ %s" % name
|
||||
return dictionary.module()
|
||||
|
||||
def getMemberType(self, memberInfo):
|
||||
member, (_, _, declType, _) = memberInfo
|
||||
|
@ -4535,7 +4530,7 @@ class CGBindingRoot(CGThing):
|
|||
'dom::bindings::utils::{DOMJSClass, JSCLASS_DOM_GLOBAL}',
|
||||
'dom::bindings::utils::{FindEnumStringIndex, GetArrayIndexFromId}',
|
||||
'dom::bindings::utils::{GetPropertyOnPrototype, GetProtoOrIfaceArray}',
|
||||
'dom::bindings::utils::{HasPropertyOnPrototype, IntVal}',
|
||||
'dom::bindings::utils::{HasPropertyOnPrototype, IntVal, UintVal}',
|
||||
'dom::bindings::utils::{Reflectable}',
|
||||
'dom::bindings::utils::{squirrel_away_unique}',
|
||||
'dom::bindings::utils::{ThrowingConstructor, unwrap, unwrap_jsmanaged}',
|
||||
|
@ -5430,7 +5425,8 @@ class GlobalGenRoots():
|
|||
def Bindings(config):
|
||||
|
||||
descriptors = (set(d.name + "Binding" for d in config.getDescriptors(register=True)) |
|
||||
set(d.unroll().module() for d in config.callbacks))
|
||||
set(d.unroll().module() for d in config.callbacks) |
|
||||
set(d.module() for d in config.getDictionaries()))
|
||||
curr = CGList([CGGeneric("pub mod %s;\n" % name) for name in sorted(descriptors)])
|
||||
curr = CGWrapper(curr, pre=AUTOGENERATED_WARNING_COMMENT)
|
||||
return curr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue