mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Generate code for NoInterfaceObject interfaces in InterfaceTypes and InheritTypes.
There is no reason for those interfaces to be excluded.
This commit is contained in:
parent
c8b8550cfb
commit
f11e7ee0a9
1 changed files with 2 additions and 8 deletions
|
@ -5128,13 +5128,7 @@ class GlobalGenRoots():
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def InterfaceTypes(config):
|
def InterfaceTypes(config):
|
||||||
|
descriptors = [d.name for d in config.getDescriptors(register=True, isCallback=False)]
|
||||||
def pathToType(descriptor):
|
|
||||||
if descriptor.interface.isCallback():
|
|
||||||
return "dom::bindings::codegen::Bindings::%sBinding" % descriptor.name
|
|
||||||
return "dom::%s" % descriptor.name.lower()
|
|
||||||
|
|
||||||
descriptors = [d.name for d in config.getDescriptors(register=True, hasInterfaceObject=True)]
|
|
||||||
curr = CGList([CGGeneric("pub use dom::%s::%s;\n" % (name.lower(), name)) for name in descriptors])
|
curr = CGList([CGGeneric("pub use dom::%s::%s;\n" % (name.lower(), name)) for name in descriptors])
|
||||||
curr = CGWrapper(curr, pre=AUTOGENERATED_WARNING_COMMENT)
|
curr = CGWrapper(curr, pre=AUTOGENERATED_WARNING_COMMENT)
|
||||||
return curr
|
return curr
|
||||||
|
@ -5151,7 +5145,7 @@ class GlobalGenRoots():
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def InheritTypes(config):
|
def InheritTypes(config):
|
||||||
|
|
||||||
descriptors = config.getDescriptors(register=True, hasInterfaceObject=True)
|
descriptors = config.getDescriptors(register=True, isCallback=False)
|
||||||
allprotos = [CGGeneric("#![allow(unused_imports)]\n"),
|
allprotos = [CGGeneric("#![allow(unused_imports)]\n"),
|
||||||
CGGeneric("use dom::types::*;\n"),
|
CGGeneric("use dom::types::*;\n"),
|
||||||
CGGeneric("use dom::bindings::js::{JS, JSRef, Temporary};\n"),
|
CGGeneric("use dom::bindings::js::{JS, JSRef, Temporary};\n"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue