File tree 3 files changed +22
-2
lines changed
3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 25
25
// interface XULControllers;
26
26
27
27
// http:// www.whatwg.org/ specs/ web- apps/ current- work/
28
- [PrimaryGlobal, LegacyUnenumerableNamedProperties, NeedResolve]
28
+ [Global=Window ,
29
+ Exposed=Window ,
30
+ LegacyUnenumerableNamedProperties]
29
31
/* sealed*/ interface Window : EventTarget {
30
32
// the current browsing context
31
33
[Unforgeable, Constant, StoreInSlot,
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ pub(crate) struct InterfaceData {
32
32
/// Whether only partial interfaces were encountered
33
33
pub ( crate ) partial : bool ,
34
34
pub ( crate ) operations : BTreeMap < OperationId , OperationData > ,
35
+ pub ( crate ) global : bool ,
35
36
}
36
37
37
38
#[ derive( PartialEq , Eq , PartialOrd , Ord ) ]
@@ -185,6 +186,7 @@ impl FirstPass<()> for webidl::ast::NonPartialInterface {
185
186
InterfaceData {
186
187
partial : false ,
187
188
operations : Default :: default ( ) ,
189
+ global : false ,
188
190
} ,
189
191
) ;
190
192
@@ -213,6 +215,7 @@ impl FirstPass<()> for webidl::ast::PartialInterface {
213
215
InterfaceData {
214
216
partial : true ,
215
217
operations : Default :: default ( ) ,
218
+ global : false ,
216
219
} ,
217
220
) ;
218
221
@@ -269,6 +272,17 @@ impl<'b> FirstPass<&'b str> for webidl::ast::ExtendedAttribute {
269
272
& rhs_arguments,
270
273
)
271
274
} ,
275
+ webidl:: ast:: ExtendedAttribute :: Identifier (
276
+ webidl:: ast:: IdentifierExtendedAttribute { lhs, .. }
277
+ )
278
+ | webidl:: ast:: ExtendedAttribute :: IdentifierList (
279
+ webidl:: ast:: IdentifierListExtendedAttribute { lhs, .. }
280
+ )
281
+ if lhs == "Global" =>
282
+ {
283
+ record. interfaces . get_mut ( self_name) . unwrap ( ) . global = true ;
284
+ Ok ( ( ) )
285
+ }
272
286
_ => Ok ( ( ) )
273
287
}
274
288
}
Original file line number Diff line number Diff line change @@ -656,7 +656,11 @@ impl<'a> FirstPassRecord<'a> {
656
656
. map ( |arg| ( & * arg. name , & * arg. type_ , arg. variadic ) ) ,
657
657
ret,
658
658
kind,
659
- false ,
659
+ self
660
+ . interfaces
661
+ . get ( self_name)
662
+ . map ( |interface_data| interface_data. global )
663
+ . unwrap_or ( false ) ,
660
664
catch,
661
665
doc_comment,
662
666
)
You can’t perform that action at this time.
0 commit comments