Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDL: remove [PrimaryGlobal] #8585

Merged
merged 1 commit into from
Dec 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions FileAPI/idlharness.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ <h1>File API automated IDL tests</h1>
request.onload = function() {
var idls = request.responseText;

idl_array.add_untested_idls("[PrimaryGlobal] interface Window { };");

idl_array.add_untested_idls("[Exposed=(Window,Worker)] interface ArrayBuffer {};");
idl_array.add_untested_idls("interface URL {};");
idl_array.add_untested_idls("[Exposed=(Window,Worker)] interface EventTarget {};");
Expand Down
2 changes: 1 addition & 1 deletion IndexedDB/interfaces.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h1>IndexedDB IDL tests</h1>
var idls = request.responseText;

// https://html.spec.whatwg.org/multipage/browsers.html#window
idlArray.add_untested_idls("[PrimaryGlobal] interface Window { };");
idlArray.add_untested_idls("[Global=Window, Exposed=Window] interface Window { };");

// https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin
idlArray.add_untested_idls(`[NoInterfaceObject, Exposed=(Window,Worker)]
Expand Down
5 changes: 0 additions & 5 deletions WebCryptoAPI/idlharness.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ <h1 class="instructions">Description</h1>
request.onload = function() {
var idls = request.responseText;

idl_array.add_untested_idls("[PrimaryGlobal] interface Window { };");

idl_array.add_untested_idls("interface ArrayBuffer {};");
idl_array.add_untested_idls("interface ArrayBufferView {};");

idl_array.add_idls(idls);

idl_array.add_objects({"Crypto":["crypto"], "SubtleCrypto":["crypto.subtle"]});
Expand Down
5 changes: 0 additions & 5 deletions WebCryptoAPI/idlharness.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ <h1 class="instructions">Description</h1>
request.onload = function() {
var idls = request.responseText;

idl_array.add_untested_idls("[PrimaryGlobal] interface Window { };");

idl_array.add_untested_idls("interface ArrayBuffer {};");
idl_array.add_untested_idls("interface ArrayBufferView {};");

idl_array.add_idls(idls);

idl_array.add_objects({"Crypto":["crypto"], "SubtleCrypto":["crypto.subtle"]});
Expand Down
2 changes: 0 additions & 2 deletions encrypted-media/idlharness.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ <h1 class="instructions">Description</h1>
.then( function( idls ) {

var idl_array = new IdlArray();
idl_array.add_untested_idls("[PrimaryGlobal] interface Window {};");
idl_array.add_untested_idls("interface Navigator {};");
idl_array.add_untested_idls("interface ArrayBuffer {};");
idl_array.add_untested_idls("interface HTMLMediaElement {};");
idl_array.add_untested_idls("interface Event {};");
idl_array.add_untested_idls("interface EventTarget {};");
Expand Down
2 changes: 1 addition & 1 deletion html/webappapis/animation-frames/idlharness.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h1>idlharness test</h1>
<p>This test validates the WebIDL included in the Timing control for script-based animations specification.</p>

<pre id='untested_idl' style='display:none'>
[PrimaryGlobal]
[Global=Window, Exposed=Window]
interface Window {
};
</pre>
Expand Down
4 changes: 3 additions & 1 deletion interfaces/html.idl
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,9 @@ dictionary DragEventInit : MouseEventInit {
DataTransfer? dataTransfer = null;
};

[PrimaryGlobal, LegacyUnenumerableNamedProperties]
[Global=Window,
Exposed=Window,
LegacyUnenumerableNamedProperties]
interface Window : EventTarget {
// the current browsing context
[Unforgeable] readonly attribute WindowProxy window;
Expand Down
2 changes: 1 addition & 1 deletion media-capabilities/idlharness.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<body>
<h1>Media Session IDL tests</h1>
<pre id='untested_idl' style='display:none'>
[PrimaryGlobal]
[Global=Window, Exposed=Window]
interface Window {
};
interface Worker {
Expand Down
2 changes: 1 addition & 1 deletion mediasession/idlharness.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<h1>Media Session IDL tests</h1>

<pre id='untested_idl' style='display:none'>
[PrimaryGlobal]
[Global=Window, Exposed=Global]
interface Window {
};

Expand Down
2 changes: 1 addition & 1 deletion pointerevents/extension/idlharness.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script src="/resources/idlharness.js"></script>

<pre id='untested_idl' style='display:none'>
[PrimaryGlobal]
[Global=Window, Exposed=Window]
interface Window {
};

Expand Down
2 changes: 1 addition & 1 deletion pointerevents/idlharness.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script src="/resources/idlharness.js"></script>

<pre id='untested_idl' style='display:none'>
[PrimaryGlobal]
[Global=Window, Exposed=Window]
interface Window {
};

Expand Down
2 changes: 1 addition & 1 deletion proximity/idlharness.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div id="log"></div>

<pre id="untested_idl">
[PrimaryGlobal]
[Global=Window, Exposed=Window]
interface Window {
};

Expand Down
2 changes: 1 addition & 1 deletion requestidlecallback/idlharness.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script src="/resources/idlharness.js"></script>

<pre id='untested_idl' style='display:none'>
[PrimaryGlobal]
[Global=Window, Exposed=Window]
interface Window {
};
</pre>
Expand Down
11 changes: 5 additions & 6 deletions resources/idlharness.js
Original file line number Diff line number Diff line change
Expand Up @@ -936,8 +936,7 @@ IdlInterface.prototype.is_global = function()
//@{
{
return this.extAttrs.some(function(attribute) {
return attribute.name === "Global" ||
attribute.name === "PrimaryGlobal";
return attribute.name === "Global";
});
};
//@}
Expand Down Expand Up @@ -1356,7 +1355,7 @@ IdlInterface.prototype.test_self = function()
// "The interface prototype object for a given interface A must have an
// internal [[Prototype]] property whose value is returned from the
// following steps:
// "If A is declared with the [Global] or [PrimaryGlobal] extended
// "If A is declared with the [Global] extended
// attribute, and A supports named properties, then return the named
// properties object for A, as defined in §3.6.4 Named properties
// object.
Expand Down Expand Up @@ -1434,7 +1433,7 @@ IdlInterface.prototype.test_self = function()
}
}.bind(this), this.name + " interface: existence and properties of interface prototype object");

// "If the interface is declared with the [Global] or [PrimaryGlobal]
// "If the interface is declared with the [Global]
// extended attribute, or the interface is in the set of inherited
// interfaces for any other interface that is declared with one of these
// attributes, then the interface prototype object must be an immutable
Expand Down Expand Up @@ -1780,7 +1779,7 @@ IdlInterface.prototype.test_member_operation = function(member)
"interface object missing static operation");
memberHolderObject = self[this.name];
// "* Otherwise, [...] if the interface was declared with the [Global]
// or [PrimaryGlobal] extended attribute, then the property exists
// extended attribute, then the property exists
// on every object that implements the interface."
} else if (this.is_global()) {
assert_own_property(self, member.name,
Expand Down Expand Up @@ -2128,7 +2127,7 @@ IdlInterface.prototype.test_primary_interface_of = function(desc, obj, exception
}

// "The internal [[SetPrototypeOf]] method of every platform object that
// implements an interface with the [Global] or [PrimaryGlobal] extended
// implements an interface with the [Global] extended
// attribute must execute the same algorithm as is defined for the
// [[SetPrototypeOf]] internal method of an immutable prototype exotic
// object."
Expand Down
2 changes: 1 addition & 1 deletion svg/interfaces.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
interface ProcessingInstruction : Node {};
interface Element : Node {};
interface HTMLElement : Element {};
[PrimaryGlobal] interface Window {};
[Global=Window, Exposed=Window] interface Window {};

// Just need to know that DOMStringMap exists; its details are tested elsewhere.
interface DOMStringMap { };
Expand Down
2 changes: 1 addition & 1 deletion webstorage/idlharness.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h1>Web Storage IDL tests</h1>
<div id="log"></div>

<pre id='untested_idl' style='display:none'>
[PrimaryGlobal]
[Global=Window, Exposed=Window]
interface Window {
};

Expand Down
2 changes: 1 addition & 1 deletion webvr/idlharness.html
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ <h1 class="instructions">Description</h1>
<script>
setup( () => {
var idl_array = new IdlArray();
idl_array.add_untested_idls("[PrimaryGlobal] interface Window {};");
idl_array.add_untested_idls("[Global=Window, Exposed=Window] interface Window {};");
idl_array.add_untested_idls("interface Navigator {};");
idl_array.add_untested_idls("interface Event {};");
idl_array.add_untested_idls("interface EventTarget {};");
Expand Down