Bug 1631581 - Part 4: Rename Unforgeable to LegacyUnforgeable r=edgar

Differential Revision: https://phabricator.services.mozilla.com/D111212
This commit is contained in:
Kagami Sascha Rosylight 2021-04-11 03:13:32 +00:00
parent d8adb037f5
commit 20a3a7aaff
14 changed files with 128 additions and 111 deletions

View File

@ -735,13 +735,15 @@ bool DefinePrefable(JSContext* cx, JS::Handle<JSObject*> obj,
return true;
}
bool DefineUnforgeableMethods(JSContext* cx, JS::Handle<JSObject*> obj,
const Prefable<const JSFunctionSpec>* props) {
bool DefineLegacyUnforgeableMethods(
JSContext* cx, JS::Handle<JSObject*> obj,
const Prefable<const JSFunctionSpec>* props) {
return DefinePrefable(cx, obj, props);
}
bool DefineUnforgeableAttributes(JSContext* cx, JS::Handle<JSObject*> obj,
const Prefable<const JSPropertySpec>* props) {
bool DefineLegacyUnforgeableAttributes(
JSContext* cx, JS::Handle<JSObject*> obj,
const Prefable<const JSPropertySpec>* props) {
return DefinePrefable(cx, obj, props);
}

View File

@ -755,16 +755,18 @@ bool DefineProperties(JSContext* cx, JS::Handle<JSObject*> obj,
const NativeProperties* chromeOnlyProperties);
/*
* Define the unforgeable methods on an object.
* Define the legacy unforgeable methods on an object.
*/
bool DefineUnforgeableMethods(JSContext* cx, JS::Handle<JSObject*> obj,
const Prefable<const JSFunctionSpec>* props);
bool DefineLegacyUnforgeableMethods(
JSContext* cx, JS::Handle<JSObject*> obj,
const Prefable<const JSFunctionSpec>* props);
/*
* Define the unforgeable attributes on an object.
* Define the legacy unforgeable attributes on an object.
*/
bool DefineUnforgeableAttributes(JSContext* cx, JS::Handle<JSObject*> obj,
const Prefable<const JSPropertySpec>* props);
bool DefineLegacyUnforgeableAttributes(
JSContext* cx, JS::Handle<JSObject*> obj,
const Prefable<const JSPropertySpec>* props);
#define HAS_MEMBER_TYPEDEFS \
private: \

View File

@ -34,7 +34,7 @@ from Configuration import (
getTypesFromCallback,
getAllTypes,
Descriptor,
MemberIsUnforgeable,
MemberIsLegacyUnforgeable,
iteratorNativeType,
)
@ -859,7 +859,10 @@ class CGPrototypeJSClass(CGThing):
slotCount = "DOM_INTERFACE_PROTO_SLOTS_BASE"
# Globals handle unforgeables directly in Wrap() instead of
# via a holder.
if self.descriptor.hasUnforgeableMembers and not self.descriptor.isGlobal():
if (
self.descriptor.hasLegacyUnforgeableMembers
and not self.descriptor.isGlobal()
):
slotCount += (
" + 1 /* slot for the JSObject holding the unforgeable properties */"
)
@ -2762,7 +2765,7 @@ class MethodDefiner(PropertyDefiner):
for m in descriptor.interface.members
if m.isMethod()
and m.isStatic() == static
and MemberIsUnforgeable(m, descriptor) == unforgeable
and MemberIsLegacyUnforgeable(m, descriptor) == unforgeable
and (
not crossOriginOnly or m.getExtendedAttribute("CrossOriginCallable")
)
@ -2880,7 +2883,7 @@ class MethodDefiner(PropertyDefiner):
if not static:
stringifier = descriptor.operations["Stringifier"]
if stringifier and unforgeable == MemberIsUnforgeable(
if stringifier and unforgeable == MemberIsLegacyUnforgeable(
stringifier, descriptor
):
toStringDesc = {
@ -2896,7 +2899,9 @@ class MethodDefiner(PropertyDefiner):
self.chrome.append(toStringDesc)
else:
self.regular.append(toStringDesc)
if unforgeable and descriptor.interface.getExtendedAttribute("Unforgeable"):
if unforgeable and descriptor.interface.getExtendedAttribute(
"LegacyUnforgeable"
):
# Synthesize our valueOf method
self.regular.append(
{
@ -3045,7 +3050,7 @@ class AttrDefiner(PropertyDefiner):
for m in descriptor.interface.members
if m.isAttr()
and m.isStatic() == static
and MemberIsUnforgeable(m, descriptor) == unforgeable
and MemberIsLegacyUnforgeable(m, descriptor) == unforgeable
and (
not crossOriginOnly
or m.getExtendedAttribute("CrossOriginReadable")
@ -3836,7 +3841,10 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
# Globals handle unforgeables directly in Wrap() instead of
# via a holder.
if self.descriptor.hasUnforgeableMembers and not self.descriptor.isGlobal():
if (
self.descriptor.hasLegacyUnforgeableMembers
and not self.descriptor.isGlobal()
):
assert needInterfacePrototypeObject
# We want to use the same JSClass and prototype as the object we'll
@ -4362,7 +4370,7 @@ def InitUnforgeablePropertiesOnHolder(
defineUnforgeableAttrs = fill(
"""
if (!DefineUnforgeableAttributes(aCx, ${holderName}, %s)) {
if (!DefineLegacyUnforgeableAttributes(aCx, ${holderName}, %s)) {
$*{failureCode}
}
""",
@ -4371,7 +4379,7 @@ def InitUnforgeablePropertiesOnHolder(
)
defineUnforgeableMethods = fill(
"""
if (!DefineUnforgeableMethods(aCx, ${holderName}, %s)) {
if (!DefineLegacyUnforgeableMethods(aCx, ${holderName}, %s)) {
$*{failureCode}
}
""",
@ -4394,7 +4402,7 @@ def InitUnforgeablePropertiesOnHolder(
)
)
if descriptor.interface.getExtendedAttribute("Unforgeable"):
if descriptor.interface.getExtendedAttribute("LegacyUnforgeable"):
# We do our undefined toPrimitive here, not as a regular property
# because we don't have a concept of value props anywhere in IDL.
unforgeables.append(
@ -4425,7 +4433,7 @@ def CopyUnforgeablePropertiesToInstance(descriptor, failureCode):
"""
assert not descriptor.isGlobal()
if not descriptor.hasUnforgeableMembers:
if not descriptor.hasLegacyUnforgeableMembers:
return ""
copyCode = [
@ -4790,7 +4798,7 @@ class CGWrapGlobalMethod(CGAbstractMethod):
"""
)
if self.descriptor.hasUnforgeableMembers:
if self.descriptor.hasLegacyUnforgeableMembers:
unforgeable = InitUnforgeablePropertiesOnHolder(
self.descriptor, self.properties, failureCode, "aReflector"
).define()
@ -14672,7 +14680,7 @@ class CGDOMJSProxyHandler_defineProperty(ClassMethod):
JSContext* cx = cx_;
"""
)
if self.descriptor.hasUnforgeableMembers:
if self.descriptor.hasLegacyUnforgeableMembers:
raise TypeError(
"Can't handle a named setter on an interface "
"that has unforgeables. Figure out how that "
@ -14741,7 +14749,7 @@ def getDeleterBody(descriptor, type, foundVar=None):
if deleter:
assert type == "Named"
assert foundVar is not None
if descriptor.hasUnforgeableMembers:
if descriptor.hasLegacyUnforgeableMembers:
raise TypeError(
"Can't handle a deleter on an interface "
"that has unforgeables. Figure out how "
@ -15424,7 +15432,7 @@ class CGDOMJSProxyHandler_setCustom(ClassMethod):
+ ": "
+ "Can't cope with [OverrideBuiltins] and an indexed getter"
)
if self.descriptor.hasUnforgeableMembers:
if self.descriptor.hasLegacyUnforgeableMembers:
raise ValueError(
"In interface "
+ self.descriptor.name

View File

@ -314,7 +314,7 @@ def methodReturnsJSObject(method):
return False
def MemberIsUnforgeable(member, descriptor):
def MemberIsLegacyUnforgeable(member, descriptor):
# Note: "or" and "and" return either their LHS or RHS, not
# necessarily booleans. Make sure to return a boolean from this
# method, because callers will compare its return value to
@ -323,8 +323,8 @@ def MemberIsUnforgeable(member, descriptor):
(member.isAttr() or member.isMethod())
and not member.isStatic()
and (
member.isUnforgeable()
or descriptor.interface.getExtendedAttribute("Unforgeable")
member.isLegacyUnforgeable()
or descriptor.interface.getExtendedAttribute("LegacyUnforgeable")
)
)
@ -428,8 +428,8 @@ class Descriptor(DescriptorProvider):
)
self.concrete = desc.get("concrete", concreteDefault)
self.hasUnforgeableMembers = self.concrete and any(
MemberIsUnforgeable(m, self) for m in self.interface.members
self.hasLegacyUnforgeableMembers = self.concrete and any(
MemberIsLegacyUnforgeable(m, self) for m in self.interface.members
)
self.operations = {
"IndexedGetter": None,

View File

@ -1220,17 +1220,17 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
],
)
# Deal with interfaces marked [Unforgeable], now that we have our full
# Deal with interfaces marked [LegacyUnforgeable], now that we have our full
# member list, except unforgeables pulled in from parents. We want to
# do this before we set "originatingInterface" on our unforgeable
# members.
if self.getExtendedAttribute("Unforgeable"):
if self.getExtendedAttribute("LegacyUnforgeable"):
# Check that the interface already has all the things the
# spec would otherwise require us to synthesize and is
# missing the ones we plan to synthesize.
if not any(m.isMethod() and m.isStringifier() for m in self.members):
raise WebIDLError(
"Unforgeable interface %s does not have a "
"LegacyUnforgeable interface %s does not have a "
"stringifier" % self.identifier.name,
[self.location],
)
@ -1238,7 +1238,7 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
for m in self.members:
if m.identifier.name == "toJSON":
raise WebIDLError(
"Unforgeable interface %s has a "
"LegacyUnforgeable interface %s has a "
"toJSON so we won't be able to add "
"one ourselves" % self.identifier.name,
[self.location, m.location],
@ -1246,7 +1246,7 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
if m.identifier.name == "valueOf" and not m.isStatic():
raise WebIDLError(
"Unforgeable interface %s has a valueOf "
"LegacyUnforgeable interface %s has a valueOf "
"member so we won't be able to add one "
"ourselves" % self.identifier.name,
[self.location, m.location],
@ -1255,7 +1255,7 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
for member in self.members:
if (
(member.isAttr() or member.isMethod())
and member.isUnforgeable()
and member.isLegacyUnforgeable()
and not hasattr(member, "originatingInterface")
):
member.originatingInterface = self
@ -1305,7 +1305,7 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
self._ownMembersInSlots += 1
if self.parent:
# Make sure we don't shadow any of the [Unforgeable] attributes on our
# Make sure we don't shadow any of the [LegacyUnforgeable] attributes on our
# ancestor interfaces. We don't have to worry about mixins here, because
# those have already been imported into the relevant .members lists. And
# we don't have to worry about anything other than our parent, because it
@ -1314,7 +1314,8 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
for unforgeableMember in (
member
for member in self.parent.members
if (member.isAttr() or member.isMethod()) and member.isUnforgeable()
if (member.isAttr() or member.isMethod())
and member.isLegacyUnforgeable()
):
shadows = [
m
@ -1326,7 +1327,7 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
if len(shadows) != 0:
locs = [unforgeableMember.location] + [s.location for s in shadows]
raise WebIDLError(
"Interface %s shadows [Unforgeable] "
"Interface %s shadows [LegacyUnforgeable] "
"members of %s"
% (self.identifier.name, ancestor.identifier.name),
locs,
@ -1465,7 +1466,7 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
)
# We also don't support inheriting from unforgeable interfaces.
if self.getExtendedAttribute("Unforgeable") and self.hasChildInterfaces():
if self.getExtendedAttribute("LegacyUnforgeable") and self.hasChildInterfaces():
locations = [self.location] + list(
i.location for i in self.interfacesBasedOnSelf if i.parent == self
)
@ -1578,9 +1579,10 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
"identifierless operation",
[member.location],
)
if member.isUnforgeable():
if member.isLegacyUnforgeable():
raise WebIDLError(
"[Alias] must not be used on an " "[Unforgeable] operation",
"[Alias] must not be used on an "
"[LegacyUnforgeable] operation",
[member.location],
)
@ -1927,7 +1929,7 @@ class IDLInterface(IDLInterfaceOrNamespace):
identifier == "NeedResolve"
or identifier == "OverrideBuiltins"
or identifier == "ChromeOnly"
or identifier == "Unforgeable"
or identifier == "LegacyUnforgeable"
or identifier == "LegacyEventInit"
or identifier == "ProbablyShortLivingWrapper"
or identifier == "LegacyUnenumerableNamedProperties"
@ -4971,7 +4973,7 @@ class IDLAttribute(IDLInterfaceMember):
self.inherit = inherit
self._static = static
self.legacyLenientThis = False
self._unforgeable = False
self._legacyUnforgeable = False
self.stringifier = stringifier
self.slotIndices = None
assert maplikeOrSetlike is None or isinstance(
@ -5224,13 +5226,13 @@ class IDLAttribute(IDLInterfaceMember):
[attr.location, self.location],
)
self.legacyLenientThis = True
elif identifier == "Unforgeable":
elif identifier == "LegacyUnforgeable":
if self.isStatic():
raise WebIDLError(
"[Unforgeable] is only allowed on non-static " "attributes",
"[LegacyUnforgeable] is only allowed on non-static " "attributes",
[attr.location, self.location],
)
self._unforgeable = True
self._legacyUnforgeable = True
elif identifier == "SameObject" and not self.readonly:
raise WebIDLError(
"[SameObject] only allowed on readonly attributes",
@ -5468,8 +5470,8 @@ class IDLAttribute(IDLInterfaceMember):
"""
return self.maplikeOrSetlike is not None
def isUnforgeable(self):
return self._unforgeable
def isLegacyUnforgeable(self):
return self._legacyUnforgeable
def _getDependentObjects(self):
return set([self.type])
@ -5843,7 +5845,7 @@ class IDLMethod(IDLInterfaceMember, IDLScope):
self._htmlConstructor = False
self.underlyingAttr = underlyingAttr
self._specialType = specialType
self._unforgeable = False
self._legacyUnforgeable = False
self.dependsOn = "Everything"
self.affects = "Everything"
self.aliases = []
@ -6288,13 +6290,13 @@ class IDLMethod(IDLInterfaceMember, IDLScope):
"Methods must not be flagged as " "[%s]" % identifier,
[attr.location, self.location],
)
elif identifier == "Unforgeable":
elif identifier == "LegacyUnforgeable":
if self.isStatic():
raise WebIDLError(
"[Unforgeable] is only allowed on non-static " "methods",
"[LegacyUnforgeable] is only allowed on non-static " "methods",
[attr.location, self.location],
)
self._unforgeable = True
self._legacyUnforgeable = True
elif identifier == "SameObject":
raise WebIDLError(
"Methods must not be flagged as [SameObject]",
@ -6436,8 +6438,8 @@ class IDLMethod(IDLInterfaceMember, IDLScope):
def returnsPromise(self):
return self._overloads[0].returnType.isPromise()
def isUnforgeable(self):
return self._unforgeable
def isLegacyUnforgeable(self):
return self._legacyUnforgeable
def _getDependentObjects(self):
deps = set()

View File

@ -6,7 +6,7 @@ def WebIDLTest(parser, harness):
"""
[LegacyNoInterfaceObject]
interface TestExtendedAttr {
[Unforgeable] readonly attribute byte b;
[LegacyUnforgeable] readonly attribute byte b;
};
"""
)

View File

@ -711,7 +711,7 @@ def WebIDLTest(parser, harness):
"Inheritance of unforgeable attribute collision with child maplike/setlike",
"""
interface Foo1 {
[Unforgeable]
[LegacyUnforgeable]
attribute double size;
};
interface Foo2 : Foo1 {
@ -724,7 +724,7 @@ def WebIDLTest(parser, harness):
"Inheritance of multi-level unforgeable attribute collision with child maplike/setlike",
"""
interface Foo1 {
[Unforgeable]
[LegacyUnforgeable]
attribute double size;
};
interface Foo2 : Foo1 {

View File

@ -4,26 +4,7 @@ def WebIDLTest(parser, harness):
interface Child : Parent {
};
interface Parent {
[Unforgeable] readonly attribute long foo;
};
"""
)
results = parser.finish()
harness.check(
len(results),
2,
"Should be able to inherit from an interface with " "[Unforgeable] properties.",
)
parser = parser.reset()
parser.parse(
"""
interface Child : Parent {
const short foo = 10;
};
interface Parent {
[Unforgeable] readonly attribute long foo;
[LegacyUnforgeable] readonly attribute long foo;
};
"""
)
@ -33,7 +14,27 @@ def WebIDLTest(parser, harness):
len(results),
2,
"Should be able to inherit from an interface with "
"[Unforgeable] properties even if we have a constant with "
"[LegacyUnforgeable] properties.",
)
parser = parser.reset()
parser.parse(
"""
interface Child : Parent {
const short foo = 10;
};
interface Parent {
[LegacyUnforgeable] readonly attribute long foo;
};
"""
)
results = parser.finish()
harness.check(
len(results),
2,
"Should be able to inherit from an interface with "
"[LegacyUnforgeable] properties even if we have a constant with "
"the same name.",
)
@ -44,7 +45,7 @@ def WebIDLTest(parser, harness):
static attribute short foo;
};
interface Parent {
[Unforgeable] readonly attribute long foo;
[LegacyUnforgeable] readonly attribute long foo;
};
"""
)
@ -54,7 +55,7 @@ def WebIDLTest(parser, harness):
len(results),
2,
"Should be able to inherit from an interface with "
"[Unforgeable] properties even if we have a static attribute "
"[LegacyUnforgeable] properties even if we have a static attribute "
"with the same name.",
)
@ -65,7 +66,7 @@ def WebIDLTest(parser, harness):
static void foo();
};
interface Parent {
[Unforgeable] readonly attribute long foo;
[LegacyUnforgeable] readonly attribute long foo;
};
"""
)
@ -75,7 +76,7 @@ def WebIDLTest(parser, harness):
len(results),
2,
"Should be able to inherit from an interface with "
"[Unforgeable] properties even if we have a static operation "
"[LegacyUnforgeable] properties even if we have a static operation "
"with the same name.",
)
@ -88,7 +89,7 @@ def WebIDLTest(parser, harness):
void foo();
};
interface Parent {
[Unforgeable] readonly attribute long foo;
[LegacyUnforgeable] readonly attribute long foo;
};
"""
)
@ -111,7 +112,7 @@ def WebIDLTest(parser, harness):
void foo();
};
interface Parent {
[Unforgeable] void foo();
[LegacyUnforgeable] void foo();
};
"""
)
@ -134,7 +135,7 @@ def WebIDLTest(parser, harness):
attribute short foo;
};
interface Parent {
[Unforgeable] readonly attribute long foo;
[LegacyUnforgeable] readonly attribute long foo;
};
"""
)
@ -157,7 +158,7 @@ def WebIDLTest(parser, harness):
attribute short foo;
};
interface Parent {
[Unforgeable] void foo();
[LegacyUnforgeable] void foo();
};
"""
)
@ -178,7 +179,7 @@ def WebIDLTest(parser, harness):
};
interface Parent {};
interface mixin Mixin {
[Unforgeable] readonly attribute long foo;
[LegacyUnforgeable] readonly attribute long foo;
};
Parent includes Mixin;
"""
@ -189,7 +190,7 @@ def WebIDLTest(parser, harness):
len(results),
4,
"Should be able to inherit from an interface with a "
"mixin with [Unforgeable] properties.",
"mixin with [LegacyUnforgeable] properties.",
)
parser = parser.reset()
@ -202,7 +203,7 @@ def WebIDLTest(parser, harness):
};
interface Parent {};
interface mixin Mixin {
[Unforgeable] readonly attribute long foo;
[LegacyUnforgeable] readonly attribute long foo;
};
Parent includes Mixin;
"""
@ -228,7 +229,7 @@ def WebIDLTest(parser, harness):
interface Parent : GrandParent {};
interface GrandParent {};
interface mixin Mixin {
[Unforgeable] readonly attribute long foo;
[LegacyUnforgeable] readonly attribute long foo;
};
GrandParent includes Mixin;
interface mixin ChildMixin {
@ -258,7 +259,7 @@ def WebIDLTest(parser, harness):
interface Parent : GrandParent {};
interface GrandParent {};
interface mixin Mixin {
[Unforgeable] void foo();
[LegacyUnforgeable] void foo();
};
GrandParent includes Mixin;
interface mixin ChildMixin {
@ -282,13 +283,15 @@ def WebIDLTest(parser, harness):
parser.parse(
"""
interface iface {
[Unforgeable] attribute long foo;
[LegacyUnforgeable] attribute long foo;
};
"""
)
results = parser.finish()
harness.check(len(results), 1, "Should allow writable [Unforgeable] attribute.")
harness.check(
len(results), 1, "Should allow writable [LegacyUnforgeable] attribute."
)
parser = parser.reset()
threw = False
@ -296,7 +299,7 @@ def WebIDLTest(parser, harness):
parser.parse(
"""
interface iface {
[Unforgeable] static readonly attribute long foo;
[LegacyUnforgeable] static readonly attribute long foo;
};
"""
)
@ -305,4 +308,4 @@ def WebIDLTest(parser, harness):
except:
threw = True
harness.ok(threw, "Should have thrown for static [Unforgeable] attribute.")
harness.ok(threw, "Should have thrown for static [LegacyUnforgeable] attribute.")

View File

@ -983,10 +983,10 @@ interface TestInterface {
// Miscellania
[LegacyLenientThis] attribute long attrWithLenientThis;
[Unforgeable] readonly attribute long unforgeableAttr;
[Unforgeable, ChromeOnly] readonly attribute long unforgeableAttr2;
[Unforgeable] long unforgeableMethod();
[Unforgeable, ChromeOnly] long unforgeableMethod2();
[LegacyUnforgeable] readonly attribute long unforgeableAttr;
[LegacyUnforgeable, ChromeOnly] readonly attribute long unforgeableAttr2;
[LegacyUnforgeable] long unforgeableMethod();
[LegacyUnforgeable, ChromeOnly] long unforgeableMethod2();
stringifier;
void passRenamedInterface(TestRenamedInterface arg);
[PutForwards=writableByte] readonly attribute TestInterface putForwardsAttr;

View File

@ -779,10 +779,10 @@ interface TestExampleInterface {
// Miscellania
[LegacyLenientThis] attribute long attrWithLenientThis;
[Unforgeable] readonly attribute long unforgeableAttr;
[Unforgeable, ChromeOnly] readonly attribute long unforgeableAttr2;
[Unforgeable] long unforgeableMethod();
[Unforgeable, ChromeOnly] long unforgeableMethod2();
[LegacyUnforgeable] readonly attribute long unforgeableAttr;
[LegacyUnforgeable, ChromeOnly] readonly attribute long unforgeableAttr2;
[LegacyUnforgeable] long unforgeableMethod();
[LegacyUnforgeable, ChromeOnly] long unforgeableMethod2();
stringifier;
void passRenamedInterface(TestRenamedInterface arg);
[PutForwards=writableByte] readonly attribute TestExampleInterface putForwardsAttr;

View File

@ -123,7 +123,7 @@ interface Document : Node {
// https://html.spec.whatwg.org/multipage/dom.html#the-document-object
partial interface Document {
[PutForwards=href, Unforgeable] readonly attribute Location? location;
[PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
[SetterThrows] attribute DOMString domain;
readonly attribute DOMString referrer;
[Throws] attribute DOMString cookie;

View File

@ -50,7 +50,7 @@ interface Event {
[Pure]
readonly attribute boolean composed;
[Unforgeable, Pure]
[LegacyUnforgeable, Pure]
readonly attribute boolean isTrusted;
[Pure]
readonly attribute DOMHighResTimeStamp timeStamp;

View File

@ -11,7 +11,7 @@
* and create derivative works of this document.
*/
[Unforgeable,
[LegacyUnforgeable,
Exposed=Window]
interface Location {
[Throws, CrossOriginWritable, NeedsSubjectPrincipal]

View File

@ -205,13 +205,13 @@ typedef OfflineResourceList ApplicationCache;
WritableStream)]
/*sealed*/ interface Window : EventTarget {
// the current browsing context
[Unforgeable, Constant, StoreInSlot,
[LegacyUnforgeable, Constant, StoreInSlot,
CrossOriginReadable] readonly attribute WindowProxy window;
[Replaceable, Constant, StoreInSlot,
CrossOriginReadable] readonly attribute WindowProxy self;
[Unforgeable, StoreInSlot, Pure] readonly attribute Document? document;
[LegacyUnforgeable, StoreInSlot, Pure] readonly attribute Document? document;
[Throws] attribute DOMString name;
[PutForwards=href, Unforgeable, CrossOriginReadable,
[PutForwards=href, LegacyUnforgeable, CrossOriginReadable,
CrossOriginWritable] readonly attribute Location location;
[Throws] readonly attribute History history;
readonly attribute CustomElementRegistry customElements;
@ -233,7 +233,7 @@ typedef OfflineResourceList ApplicationCache;
[Replaceable, Throws, CrossOriginReadable] readonly attribute WindowProxy frames;
[Replaceable, CrossOriginReadable] readonly attribute unsigned long length;
//[Unforgeable, Throws, CrossOriginReadable] readonly attribute WindowProxy top;
[Unforgeable, Throws, CrossOriginReadable] readonly attribute WindowProxy? top;
[LegacyUnforgeable, Throws, CrossOriginReadable] readonly attribute WindowProxy? top;
[Throws, CrossOriginReadable] attribute any opener;
//[Throws] readonly attribute WindowProxy parent;
[Replaceable, Throws, CrossOriginReadable] readonly attribute WindowProxy? parent;