Change bindings generation to make Exposed annotation aware of members/partial interfaces

This commit is contained in:
sreeise 2019-05-28 03:23:47 -04:00
parent 2b84348372
commit 871239a3e3
25 changed files with 151 additions and 78 deletions

View file

@ -9,7 +9,7 @@
[
ExceptionClass,
Exposed=(Window,Worker),
Exposed=(Window,Worker,Worklet,DissimilarOriginWindow),
Constructor(optional DOMString message="", optional DOMString name="Error")
]
interface DOMException {

View file

@ -14,7 +14,8 @@
// way to enforce security policy.
// https://html.spec.whatwg.org/multipage/#location
[Unforgeable, NoInterfaceObject] interface DissimilarOriginLocation {
[Exposed=(Window,DissimilarOriginWindow), Unforgeable, NoInterfaceObject]
interface DissimilarOriginLocation {
[Throws] attribute USVString href;
[Throws] void assign(USVString url);
[Throws] void replace(USVString url);

View file

@ -13,7 +13,7 @@
// way to enforce security policy.
// https://html.spec.whatwg.org/multipage/#window
[Global, NoInterfaceObject]
[Global, Exposed=(Window,DissimilarOriginWindow), NoInterfaceObject]
interface DissimilarOriginWindow : GlobalScope {
[Unforgeable] readonly attribute WindowProxy window;
[BinaryName="Self_", Replaceable] readonly attribute WindowProxy self;

View file

@ -5,7 +5,7 @@
* https://dom.spec.whatwg.org/#interface-eventtarget
*/
[Constructor, Exposed=(Window,Worker,Worklet)]
[Constructor, Exposed=(Window,Worker,Worklet,DissimilarOriginWindow)]
interface EventTarget {
void addEventListener(
DOMString type,

View file

@ -5,6 +5,6 @@
// This interface is entirely internal to Servo, and should not be accessible to
// web pages.
[Exposed=(Window,Worker,Worklet),
[Exposed=(Window,Worker,Worklet,DissimilarOriginWindow),
Inline]
interface GlobalScope : EventTarget {};

View file

@ -556,6 +556,19 @@ interface TestBinding {
GlobalScope entryGlobal();
GlobalScope incumbentGlobal();
[Exposed=(Window)]
readonly attribute boolean semiExposedBoolFromInterface;
};
[Exposed=(Window)]
partial interface TestBinding {
readonly attribute boolean boolFromSemiExposedPartialInterface;
};
partial interface TestBinding {
[Exposed=(Window)]
readonly attribute boolean semiExposedBoolFromPartialInterface;
};
callback SimpleCallback = void(any value);

View file

@ -3,5 +3,5 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#the-windowproxy-exotic-object
[NoInterfaceObject]
[Exposed=(Window,DissimilarOriginWindow), NoInterfaceObject]
interface WindowProxy {};