mirror of
https://github.com/servo/servo.git
synced 2025-07-31 11:10:22 +01:00
Update WebIDL.py (#32495)
* Update WebIDL.py * Update WebIDL.py * Add builtin-array.patch * Fix CodegenRust.py and Configuration.py * Fix missing downcasts * mach fmt * Update check and comment to explain why we need this check * Update Global of DissimilarOriginWindow.webidl
This commit is contained in:
parent
19067366df
commit
8eed3b442b
77 changed files with 1658 additions and 793 deletions
|
@ -76,7 +76,7 @@ class Configuration:
|
|||
for key, val in filters.items():
|
||||
if key == 'webIDLFile':
|
||||
def getter(x):
|
||||
return x.interface.filename()
|
||||
return x.interface.location.filename
|
||||
elif key == 'hasInterfaceObject':
|
||||
def getter(x):
|
||||
return x.interface.hasInterfaceObject()
|
||||
|
@ -108,10 +108,10 @@ class Configuration:
|
|||
return curr
|
||||
|
||||
def getEnums(self, webIDLFile):
|
||||
return [e for e in self.enums if e.filename() == webIDLFile]
|
||||
return [e for e in self.enums if e.filename == webIDLFile]
|
||||
|
||||
def getTypedefs(self, webIDLFile):
|
||||
return [e for e in self.typedefs if e.filename() == webIDLFile]
|
||||
return [e for e in self.typedefs if e.filename == webIDLFile]
|
||||
|
||||
@staticmethod
|
||||
def _filterForFile(items, webIDLFile=""):
|
||||
|
@ -119,7 +119,7 @@ class Configuration:
|
|||
if not webIDLFile:
|
||||
return items
|
||||
|
||||
return [x for x in items if x.filename() == webIDLFile]
|
||||
return [x for x in items if x.filename == webIDLFile]
|
||||
|
||||
def getDictionaries(self, webIDLFile=""):
|
||||
return self._filterForFile(self.dictionaries, webIDLFile=webIDLFile)
|
||||
|
@ -471,7 +471,7 @@ def MakeNativeName(name):
|
|||
|
||||
|
||||
def getIdlFileName(object):
|
||||
return os.path.basename(object.location.filename()).split('.webidl')[0]
|
||||
return os.path.basename(object.location.filename).split('.webidl')[0]
|
||||
|
||||
|
||||
def getModuleFromObject(object):
|
||||
|
|
|
@ -28,11 +28,10 @@ use crate::dom::bindings::codegen::Bindings::TestBindingBinding::{
|
|||
use crate::dom::bindings::codegen::UnionTypes;
|
||||
use crate::dom::bindings::codegen::UnionTypes::{
|
||||
BlobOrBlobSequence, BlobOrBoolean, BlobOrString, BlobOrUnsignedLong, ByteStringOrLong,
|
||||
ByteStringSequenceOrLong, ByteStringSequenceOrLongOrString, DocumentOrTestTypedef,
|
||||
EventOrString, EventOrUSVString, HTMLElementOrLong, HTMLElementOrUnsignedLongOrStringOrBoolean,
|
||||
LongOrLongSequenceSequence, LongSequenceOrBoolean, LongSequenceOrTestTypedef, StringOrBoolean,
|
||||
StringOrLongSequence, StringOrStringSequence, StringOrUnsignedLong,
|
||||
StringSequenceOrUnsignedLong, UnsignedLongOrBoolean,
|
||||
ByteStringSequenceOrLong, ByteStringSequenceOrLongOrString, EventOrString, EventOrUSVString,
|
||||
HTMLElementOrLong, HTMLElementOrUnsignedLongOrStringOrBoolean, LongOrLongSequenceSequence,
|
||||
LongSequenceOrBoolean, StringOrBoolean, StringOrLongSequence, StringOrStringSequence,
|
||||
StringOrUnsignedLong, StringSequenceOrUnsignedLong, UnsignedLongOrBoolean,
|
||||
};
|
||||
use crate::dom::bindings::error::{Error, Fallible};
|
||||
use crate::dom::bindings::num::Finite;
|
||||
|
@ -655,8 +654,8 @@ impl TestBindingMethods for TestBinding {
|
|||
fn PassUnion9(&self, _: UnionTypes::TestDictionaryOrLong) {}
|
||||
fn PassUnion10(&self, _: SafeJSContext, _: UnionTypes::StringOrObject) {}
|
||||
fn PassUnion11(&self, _: UnionTypes::ArrayBufferOrArrayBufferView) {}
|
||||
fn PassUnionWithTypedef(&self, _: DocumentOrTestTypedef) {}
|
||||
fn PassUnionWithTypedef2(&self, _: LongSequenceOrTestTypedef) {}
|
||||
fn PassUnionWithTypedef(&self, _: UnionTypes::DocumentOrStringOrURLOrBlob) {}
|
||||
fn PassUnionWithTypedef2(&self, _: UnionTypes::LongSequenceOrStringOrURLOrBlob) {}
|
||||
fn PassAny(&self, _: SafeJSContext, _: HandleValue) {}
|
||||
fn PassObject(&self, _: SafeJSContext, _: *mut JSObject) {}
|
||||
fn PassCallbackFunction(&self, _: Rc<Function>) {}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// way to enforce security policy.
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#window
|
||||
[Global, Exposed=(Window,DissimilarOriginWindow), LegacyNoInterfaceObject]
|
||||
[Global=DissimilarOriginWindow, Exposed=(Window,DissimilarOriginWindow), LegacyNoInterfaceObject]
|
||||
interface DissimilarOriginWindow : GlobalScope {
|
||||
[LegacyUnforgeable] readonly attribute WindowProxy window;
|
||||
[BinaryName="Self_", Replaceable] readonly attribute WindowProxy self;
|
||||
|
|
|
@ -46,7 +46,7 @@ use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
|||
use crate::dom::bindings::codegen::Bindings::XMLHttpRequestBinding::{
|
||||
XMLHttpRequestMethods, XMLHttpRequestResponseType,
|
||||
};
|
||||
use crate::dom::bindings::codegen::UnionTypes::DocumentOrXMLHttpRequestBodyInit;
|
||||
use crate::dom::bindings::codegen::UnionTypes::DocumentOrBlobOrArrayBufferViewOrArrayBufferOrFormDataOrStringOrURLSearchParams as DocumentOrXMLHttpRequestBodyInit;
|
||||
use crate::dom::bindings::conversions::ToJSValConvertible;
|
||||
use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue