mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove all our local patches to the WebIDL parser
All the tweaks we need can just be made through Configuration.py, and [Abstract] is being submitted upstream by Ms2ger.
This commit is contained in:
parent
432087c0ea
commit
06947965b1
6 changed files with 56 additions and 89 deletions
|
@ -526,8 +526,46 @@ class IDLExposureMixins():
|
|||
|
||||
class IDLExternalInterface(IDLObjectWithIdentifier, IDLExposureMixins):
|
||||
def __init__(self, location, parentScope, identifier):
|
||||
raise WebIDLError("Servo does not support external interfaces.",
|
||||
[self.location])
|
||||
assert isinstance(identifier, IDLUnresolvedIdentifier)
|
||||
assert isinstance(parentScope, IDLScope)
|
||||
self.parent = None
|
||||
IDLObjectWithIdentifier.__init__(self, location, parentScope, identifier)
|
||||
IDLExposureMixins.__init__(self, location)
|
||||
IDLObjectWithIdentifier.resolve(self, parentScope)
|
||||
|
||||
def finish(self, scope):
|
||||
IDLExposureMixins.finish(self, scope)
|
||||
pass
|
||||
|
||||
def validate(self):
|
||||
pass
|
||||
|
||||
def isExternal(self):
|
||||
return True
|
||||
|
||||
def isInterface(self):
|
||||
return True
|
||||
|
||||
def isConsequential(self):
|
||||
return False
|
||||
|
||||
def addExtendedAttributes(self, attrs):
|
||||
assert len(attrs) == 0
|
||||
|
||||
def resolve(self, parentScope):
|
||||
pass
|
||||
|
||||
def getJSImplementation(self):
|
||||
return None
|
||||
|
||||
def isJSImplemented(self):
|
||||
return False
|
||||
|
||||
def getNavigatorProperty(self):
|
||||
return None
|
||||
|
||||
def _getDependentObjects(self):
|
||||
return set()
|
||||
|
||||
|
||||
class IDLPartialInterface(IDLObject):
|
||||
|
@ -1643,9 +1681,6 @@ class IDLDictionary(IDLObjectWithScope):
|
|||
self.identifier.name,
|
||||
[member.location] + locations)
|
||||
|
||||
def module(self):
|
||||
return self.location.filename().split('/')[-1].split('.webidl')[0] + 'Binding'
|
||||
|
||||
def addExtendedAttributes(self, attrs):
|
||||
assert len(attrs) == 0
|
||||
|
||||
|
@ -4157,9 +4192,6 @@ class IDLCallback(IDLObjectWithScope):
|
|||
self._treatNonCallableAsNull = False
|
||||
self._treatNonObjectAsNull = False
|
||||
|
||||
def module(self):
|
||||
return self.location.filename().split('/')[-1].split('.webidl')[0] + 'Binding'
|
||||
|
||||
def isCallback(self):
|
||||
return True
|
||||
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
--- WebIDL.py
|
||||
+++ WebIDL.py
|
||||
@@ -505,46 +505,8 @@ class IDLExposureMixins():
|
||||
|
||||
class IDLExternalInterface(IDLObjectWithIdentifier, IDLExposureMixins):
|
||||
def __init__(self, location, parentScope, identifier):
|
||||
- assert isinstance(identifier, IDLUnresolvedIdentifier)
|
||||
- assert isinstance(parentScope, IDLScope)
|
||||
- self.parent = None
|
||||
- IDLObjectWithIdentifier.__init__(self, location, parentScope, identifier)
|
||||
- IDLExposureMixins.__init__(self, location)
|
||||
- IDLObjectWithIdentifier.resolve(self, parentScope)
|
||||
-
|
||||
- def finish(self, scope):
|
||||
- IDLExposureMixins.finish(self, scope)
|
||||
- pass
|
||||
-
|
||||
- def validate(self):
|
||||
- pass
|
||||
-
|
||||
- def isExternal(self):
|
||||
- return True
|
||||
-
|
||||
- def isInterface(self):
|
||||
- return True
|
||||
-
|
||||
- def isConsequential(self):
|
||||
- return False
|
||||
-
|
||||
- def addExtendedAttributes(self, attrs):
|
||||
- assert len(attrs) == 0
|
||||
-
|
||||
- def resolve(self, parentScope):
|
||||
- pass
|
||||
-
|
||||
- def getJSImplementation(self):
|
||||
- return None
|
||||
-
|
||||
- def isJSImplemented(self):
|
||||
- return False
|
||||
-
|
||||
- def getNavigatorProperty(self):
|
||||
- return None
|
||||
-
|
||||
- def _getDependentObjects(self):
|
||||
- return set()
|
||||
+ raise WebIDLError("Servo does not support external interfaces.",
|
||||
+ [self.location])
|
||||
|
||||
class IDLPartialInterface(IDLObject):
|
||||
def __init__(self, location, name, members, nonPartialInterface):
|
|
@ -1,22 +0,0 @@
|
|||
--- WebIDL.py
|
||||
+++ WebIDL.py
|
||||
@@ -1506,6 +1506,9 @@ class IDLDictionary(IDLObjectWithScope):
|
||||
self.identifier.name,
|
||||
[member.location] + locations)
|
||||
|
||||
+ def module(self):
|
||||
+ return self.location.filename().split('/')[-1].split('.webidl')[0] + 'Binding'
|
||||
+
|
||||
def addExtendedAttributes(self, attrs):
|
||||
assert len(attrs) == 0
|
||||
|
||||
@@ -3574,6 +3577,9 @@ class IDLCallbackType(IDLType, IDLObjectWithScope):
|
||||
self._treatNonCallableAsNull = False
|
||||
self._treatNonObjectAsNull = False
|
||||
|
||||
+ def module(self):
|
||||
+ return self.location.filename().split('/')[-1].split('.webidl')[0] + 'Binding'
|
||||
+
|
||||
def isCallback(self):
|
||||
return True
|
||||
|
|
@ -1,4 +1,2 @@
|
|||
wget https://mxr.mozilla.org/mozilla-central/source/dom/bindings/parser/WebIDL.py?raw=1 -O WebIDL.py
|
||||
patch < external.patch
|
||||
patch < module.patch
|
||||
patch < abstract.patch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue