diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-07-12 04:35:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-12 04:35:53 -0700 |
commit | 6d59be17bedbf9a96915b854df8ae8a0cd371831 (patch) | |
tree | 76317c8a90b278b87fc4538c2191a856b1a31102 /components/script/dom/bindings/codegen/parser | |
parent | f0c3543f53ac37dbd14741fba3678fdbd01343cc (diff) | |
parent | 306f4232f087a276c39357b4ee517d9539456e31 (diff) | |
download | servo-6d59be17bedbf9a96915b854df8ae8a0cd371831.tar.gz servo-6d59be17bedbf9a96915b854df8ae8a0cd371831.zip |
Auto merge of #12353 - Ms2ger:expose, r=jdm
Implement [Exposed].
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12353)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/codegen/parser')
3 files changed, 29 insertions, 12 deletions
diff --git a/components/script/dom/bindings/codegen/parser/WebIDL.py b/components/script/dom/bindings/codegen/parser/WebIDL.py index 5795f9db767..acedc38ae5d 100644 --- a/components/script/dom/bindings/codegen/parser/WebIDL.py +++ b/components/script/dom/bindings/codegen/parser/WebIDL.py @@ -1239,12 +1239,6 @@ class IDLInterface(IDLObjectWithScope, IDLExposureMixins): alias, [member.location, m.location]) - if (self.getExtendedAttribute("Pref") and - self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])): - raise WebIDLError("[Pref] used on an interface that is not %s-only" % - self.parentScope.primaryGlobalName, - [self.location]) - for attribute in ["CheckAnyPermissions", "CheckAllPermissions"]: if (self.getExtendedAttribute(attribute) and self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])): @@ -3459,12 +3453,6 @@ class IDLInterfaceMember(IDLObjectWithIdentifier, IDLExposureMixins): IDLExposureMixins.finish(self, scope) def validate(self): - if (self.getExtendedAttribute("Pref") and - self.exposureSet != set([self._globalScope.primaryGlobalName])): - raise WebIDLError("[Pref] used on an interface member that is not " - "%s-only" % self._globalScope.primaryGlobalName, - [self.location]) - for attribute in ["CheckAnyPermissions", "CheckAllPermissions"]: if (self.getExtendedAttribute(attribute) and self.exposureSet != set([self._globalScope.primaryGlobalName])): diff --git a/components/script/dom/bindings/codegen/parser/pref-main-thread.patch b/components/script/dom/bindings/codegen/parser/pref-main-thread.patch new file mode 100644 index 00000000000..4e4f8945f60 --- /dev/null +++ b/components/script/dom/bindings/codegen/parser/pref-main-thread.patch @@ -0,0 +1,28 @@ +--- WebIDL.py ++++ WebIDL.py +@@ -1239,12 +1239,6 @@ class IDLInterface(IDLObjectWithScope, IDLExposureMixins): + alias, + [member.location, m.location]) + +- if (self.getExtendedAttribute("Pref") and +- self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])): +- raise WebIDLError("[Pref] used on an interface that is not %s-only" % +- self.parentScope.primaryGlobalName, +- [self.location]) +- + for attribute in ["CheckAnyPermissions", "CheckAllPermissions"]: + if (self.getExtendedAttribute(attribute) and + self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])): +@@ -3459,12 +3453,6 @@ class IDLInterfaceMember(IDLObjectWithIdentifier, IDLExposureMixins): + IDLExposureMixins.finish(self, scope) + + def validate(self): +- if (self.getExtendedAttribute("Pref") and +- self.exposureSet != set([self._globalScope.primaryGlobalName])): +- raise WebIDLError("[Pref] used on an interface member that is not " +- "%s-only" % self._globalScope.primaryGlobalName, +- [self.location]) +- + for attribute in ["CheckAnyPermissions", "CheckAllPermissions"]: + if (self.getExtendedAttribute(attribute) and + self.exposureSet != set([self._globalScope.primaryGlobalName])): diff --git a/components/script/dom/bindings/codegen/parser/update.sh b/components/script/dom/bindings/codegen/parser/update.sh index 43f873beb67..ac4be6c73fd 100755 --- a/components/script/dom/bindings/codegen/parser/update.sh +++ b/components/script/dom/bindings/codegen/parser/update.sh @@ -1,6 +1,7 @@ wget https://mxr.mozilla.org/mozilla-central/source/dom/bindings/parser/WebIDL.py?raw=1 -O WebIDL.py patch < abstract.patch patch < debug.patch +patch < pref-main-thread.patch wget https://hg.mozilla.org/mozilla-central/archive/tip.tar.gz/dom/bindings/parser/tests/ -O tests.tar.gz rm -r tests |