mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1009645 - Address additional comments. r=bz
--HG-- extra : rebase_source : c6befdd143ad15751182af10f80b03c2f23eea4d
This commit is contained in:
parent
b362b82c84
commit
66ea77e992
@ -1538,7 +1538,7 @@ Navigator::GetFeature(const nsAString& aName)
|
||||
|
||||
NS_NAMED_LITERAL_STRING(apiWindowPrefix, "api.window.");
|
||||
if (StringBeginsWith(aName, apiWindowPrefix)) {
|
||||
const nsAString& featureName = Substring(aName, apiWindowPrefix.Length(), aName.Length()-apiWindowPrefix.Length());
|
||||
const nsAString& featureName = Substring(aName, apiWindowPrefix.Length());
|
||||
if (IsFeatureDetectible(featureName)) {
|
||||
p->MaybeResolve(true);
|
||||
} else {
|
||||
|
@ -569,14 +569,20 @@ class IDLInterface(IDLObjectWithScope):
|
||||
assert not parent or isinstance(parent, IDLInterface)
|
||||
|
||||
if self.getExtendedAttribute("FeatureDetectible"):
|
||||
if self.getExtendedAttribute("NoInterfaceObject"):
|
||||
raise WebIDLError("[FeatureDetectible] not allowed on interface "
|
||||
" with [NoInterfaceObject]",
|
||||
if not (self.getExtendedAttribute("Func") or
|
||||
self.getExtendedAttribute("AvailableIn") or
|
||||
self.getExtendedAttribute("CheckPermissions")):
|
||||
raise WebIDLError("[FeatureDetectible] is only allowed in combination "
|
||||
"with [Func], [AvailableIn] or [CheckPermissions]",
|
||||
[self.location])
|
||||
if self.getExtendedAttribute("Pref"):
|
||||
raise WebIDLError("[FeatureDetectible] must not be specified "
|
||||
"in combination with [Pref]",
|
||||
[self.location])
|
||||
if not self.hasInterfaceObject():
|
||||
raise WebIDLError("[FeatureDetectible] not allowed on interface "
|
||||
"with [NoInterfaceObject]",
|
||||
[self.location])
|
||||
|
||||
self.parent = parent
|
||||
|
||||
@ -2905,9 +2911,9 @@ class IDLAttribute(IDLInterfaceMember):
|
||||
if not (self.getExtendedAttribute("Func") or
|
||||
self.getExtendedAttribute("AvailableIn") or
|
||||
self.getExtendedAttribute("CheckPermissions")):
|
||||
raise WebIDLError("[%s] is only allowed in combination with [Func], "
|
||||
"[AvailableIn] or [CheckPermissions]" % identifier,
|
||||
[attr.location, self.location])
|
||||
raise WebIDLError("[FeatureDetectible] is only allowed in combination "
|
||||
"with [Func], [AvailableIn] or [CheckPermissions]",
|
||||
[self.location])
|
||||
if self.getExtendedAttribute("Pref"):
|
||||
raise WebIDLError("[FeatureDetectible] must not be specified "
|
||||
"in combination with [Pref]",
|
||||
@ -3031,13 +3037,6 @@ class IDLAttribute(IDLInterfaceMember):
|
||||
raise WebIDLError("[LenientThis] is not allowed in combination "
|
||||
"with [%s]" % identifier,
|
||||
[attr.location, self.location])
|
||||
elif identifier == "FeatureDetectible":
|
||||
if not (self.getExtendedAttribute("Func") or
|
||||
self.getExtendedAttribute("AvailableIn") or
|
||||
self.getExtendedAttribute("CheckPermissions")):
|
||||
raise WebIDLError("[%s] is only allowed in combination with [Func], "
|
||||
"[AvailableIn] or [CheckPermissions]" % identifier,
|
||||
[attr.location, self.location])
|
||||
elif (identifier == "Pref" or
|
||||
identifier == "SetterThrows" or
|
||||
identifier == "Pure" or
|
||||
@ -3050,7 +3049,8 @@ class IDLAttribute(IDLInterfaceMember):
|
||||
identifier == "Frozen" or
|
||||
identifier == "AvailableIn" or
|
||||
identifier == "NewObject" or
|
||||
identifier == "CheckPermissions"):
|
||||
identifier == "CheckPermissions" or
|
||||
identifier == "FeatureDetectible"):
|
||||
# Known attributes that we don't need to do anything with here
|
||||
pass
|
||||
else:
|
||||
@ -3462,8 +3462,8 @@ class IDLMethod(IDLInterfaceMember, IDLScope):
|
||||
[self.location])
|
||||
if self.getExtendedAttribute("Pref"):
|
||||
raise WebIDLError("[FeatureDetectible] must not be specified "
|
||||
"in combination with [Pref]",
|
||||
[self.location])
|
||||
"in combination with [Pref]",
|
||||
[self.location])
|
||||
|
||||
overloadWithPromiseReturnType = None
|
||||
overloadWithoutPromiseReturnType = None
|
||||
|
Loading…
Reference in New Issue
Block a user