diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-09-26 13:17:12 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-09-26 13:17:12 +0200 |
commit | 107b92cc62d07a48a13f9a7934268fdabf806793 (patch) | |
tree | a89a40a7e886bfca58169430ff9a34da26a034a8 /components/script/dom/bindings/codegen/parser/bytestring.patch | |
parent | 4c084cefa3ea373d73aed225bdf3952f4f346d62 (diff) | |
download | servo-107b92cc62d07a48a13f9a7934268fdabf806793.tar.gz servo-107b92cc62d07a48a13f9a7934268fdabf806793.zip |
Update the WebIDL parser
Diffstat (limited to 'components/script/dom/bindings/codegen/parser/bytestring.patch')
-rw-r--r-- | components/script/dom/bindings/codegen/parser/bytestring.patch | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/components/script/dom/bindings/codegen/parser/bytestring.patch b/components/script/dom/bindings/codegen/parser/bytestring.patch deleted file mode 100644 index 823f14cf996..00000000000 --- a/components/script/dom/bindings/codegen/parser/bytestring.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- WebIDL.py -+++ WebIDL.py -@@ -3391,6 +3391,11 @@ class IDLValue(IDLObject): - # extra normalization step. - assert self.type.isDOMString() - return self -+ elif self.type.isString() and type.isByteString(): -+ # Allow ByteStrings to use default value just like -+ # DOMString. No coercion is required here. -+ assert self.type.isDOMString() -+ return self - raise WebIDLError("Cannot coerce type %s to type %s." % - (self.type, type), [location]) - -@@ -5759,6 +5764,14 @@ class Parser(Tokenizer): - booleanType = BuiltinTypes[IDLBuiltinType.Types.boolean] - p[0] = IDLValue(location, booleanType, p[1]) - -+ def p_ConstValueByteString(self, p): -+ """ -+ ConstValue : BYTESTRING -+ """ -+ location = self.getLocation(p, 1) -+ bytestringType = BuiltinTypes[IDLBuiltinType.Types.bytestring] -+ p[0] = IDLValue(location, bytestringType, p[1]) -+ - def p_ConstValueInteger(self, p): - """ - ConstValue : INTEGER |