mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 64a19bc0e198 (bug 922159) for compilation failures on a CLOSED TREE
This commit is contained in:
parent
1632a33fb7
commit
bf1cce39c0
@ -3933,7 +3933,7 @@ class CGArgumentConverter(CGThing):
|
||||
sequenceWrapLevel = 0
|
||||
|
||||
def getWrapTemplateForType(type, descriptorProvider, result, successCode,
|
||||
returnsNewObject, exceptionCode, typedArraysAreStructs):
|
||||
isCreator, exceptionCode, typedArraysAreStructs):
|
||||
"""
|
||||
Reflect a C++ value stored in "result", of IDL type "type" into JS. The
|
||||
"successCode" is the code to run once we have successfully done the
|
||||
@ -4020,7 +4020,7 @@ def getWrapTemplateForType(type, descriptorProvider, result, successCode,
|
||||
# Nullable sequences are Nullable< nsTArray<T> >
|
||||
(recTemplate, recInfall) = getWrapTemplateForType(type.inner, descriptorProvider,
|
||||
"%s.Value()" % result, successCode,
|
||||
returnsNewObject, exceptionCode,
|
||||
isCreator, exceptionCode,
|
||||
typedArraysAreStructs)
|
||||
return ("""
|
||||
if (%s.IsNull()) {
|
||||
@ -4042,7 +4042,7 @@ if (%s.IsNull()) {
|
||||
'successCode': "break;",
|
||||
'jsvalRef': "tmp",
|
||||
'jsvalHandle': "&tmp",
|
||||
'returnsNewObject': returnsNewObject,
|
||||
'isCreator': isCreator,
|
||||
'exceptionCode': exceptionCode,
|
||||
'obj': "returnArray"
|
||||
}
|
||||
@ -4089,8 +4089,8 @@ if (!returnArray) {
|
||||
assert descriptor.nativeOwnership != 'owned'
|
||||
wrapMethod = "WrapNewBindingObject"
|
||||
else:
|
||||
if not returnsNewObject:
|
||||
raise MethodNotNewObjectError(descriptor.interface.identifier.name)
|
||||
if not isCreator:
|
||||
raise MethodNotCreatorError(descriptor.interface.identifier.name)
|
||||
if descriptor.nativeOwnership == 'owned':
|
||||
wrapMethod = "WrapNewBindingNonWrapperCachedOwnedObject"
|
||||
else:
|
||||
@ -4203,7 +4203,7 @@ if (!returnArray) {
|
||||
if type.nullable():
|
||||
(recTemplate, recInfal) = getWrapTemplateForType(type.inner, descriptorProvider,
|
||||
"%s.Value()" % result, successCode,
|
||||
returnsNewObject, exceptionCode,
|
||||
isCreator, exceptionCode,
|
||||
typedArraysAreStructs)
|
||||
return ("if (%s.IsNull()) {\n" % result +
|
||||
CGIndenter(CGGeneric(setValue("JSVAL_NULL"))).define() + "\n" +
|
||||
@ -4276,9 +4276,8 @@ def wrapForType(type, descriptorProvider, templateValues):
|
||||
more of the conversion template will be
|
||||
executed (e.g. by doing a 'return' or 'break'
|
||||
as appropriate).
|
||||
* 'returnsNewObject' (optional): If true, we're wrapping for the return
|
||||
value of a [NewObject] method. Assumed
|
||||
false if not set.
|
||||
* 'isCreator' (optional): If true, we're wrapping for the return value of
|
||||
a [Creator] method. Assumed false if not set.
|
||||
* 'exceptionCode' (optional): Code to run when a JS exception is thrown.
|
||||
The default is "return false;". The code
|
||||
passed here must return.
|
||||
@ -4286,7 +4285,7 @@ def wrapForType(type, descriptorProvider, templateValues):
|
||||
wrap = getWrapTemplateForType(type, descriptorProvider,
|
||||
templateValues.get('result', 'result'),
|
||||
templateValues.get('successCode', None),
|
||||
templateValues.get('returnsNewObject', False),
|
||||
templateValues.get('isCreator', False),
|
||||
templateValues.get('exceptionCode',
|
||||
"return false;"),
|
||||
templateValues.get('typedArraysAreStructs',
|
||||
@ -4298,8 +4297,8 @@ def wrapForType(type, descriptorProvider, templateValues):
|
||||
def infallibleForMember(member, type, descriptorProvider):
|
||||
"""
|
||||
Determine the fallibility of changing a C++ value of IDL type "type" into
|
||||
JS for the given attribute. Apart from returnsNewObject, all the defaults
|
||||
are used, since the fallbility does not change based on the boolean values,
|
||||
JS for the given attribute. Apart from isCreator, all the defaults are used,
|
||||
since the fallbility does not change based on the boolean values,
|
||||
and the template will be discarded.
|
||||
|
||||
CURRENT ASSUMPTIONS:
|
||||
@ -4307,7 +4306,7 @@ def infallibleForMember(member, type, descriptorProvider):
|
||||
failure conditions.
|
||||
"""
|
||||
return getWrapTemplateForType(type, descriptorProvider, 'result', None,\
|
||||
memberReturnsNewObject(member), "return false;",
|
||||
memberIsCreator(member), "return false;",
|
||||
False)[1]
|
||||
|
||||
def leafTypeNeedsCx(type, retVal):
|
||||
@ -4585,7 +4584,7 @@ def getUnionMemberName(type):
|
||||
return str(type)
|
||||
return type.name
|
||||
|
||||
class MethodNotNewObjectError(Exception):
|
||||
class MethodNotCreatorError(Exception):
|
||||
def __init__(self, typename):
|
||||
self.typename = typename
|
||||
|
||||
@ -4859,11 +4858,11 @@ if (!${obj}) {
|
||||
return not 'infallible' in self.extendedAttributes
|
||||
|
||||
def wrap_return_value(self):
|
||||
returnsNewObject = memberReturnsNewObject(self.idlNode)
|
||||
if returnsNewObject:
|
||||
isCreator = memberIsCreator(self.idlNode)
|
||||
if isCreator:
|
||||
# We better be returning addrefed things!
|
||||
assert(isResultAlreadyAddRefed(self.extendedAttributes) or
|
||||
# NewObject can return raw pointers to owned objects
|
||||
# Creators can return raw pointers to owned objects
|
||||
(self.returnType.isGeckoInterface() and
|
||||
self.descriptor.getDescriptor(self.returnType.unroll().inner.identifier.name).nativeOwnership == 'owned') or
|
||||
# Workers use raw pointers for new-object return
|
||||
@ -4872,13 +4871,13 @@ if (!${obj}) {
|
||||
|
||||
resultTemplateValues = { 'jsvalRef': 'args.rval()',
|
||||
'jsvalHandle': 'args.rval()',
|
||||
'returnsNewObject': returnsNewObject}
|
||||
'isCreator': isCreator}
|
||||
try:
|
||||
return wrapForType(self.returnType, self.descriptor,
|
||||
resultTemplateValues)
|
||||
except MethodNotNewObjectError, err:
|
||||
assert not returnsNewObject
|
||||
raise TypeError("%s being returned from non-NewObject method or property %s.%s" %
|
||||
except MethodNotCreatorError, err:
|
||||
assert not isCreator
|
||||
raise TypeError("%s being returned from non-creator method or property %s.%s" %
|
||||
(err.typename,
|
||||
self.descriptor.interface.identifier.name,
|
||||
self.idlNode.identifier.name))
|
||||
@ -5795,8 +5794,8 @@ if (!v.isObject()) {
|
||||
|
||||
return JS_SetProperty(cx, &v.toObject(), "%s", args[0]);""" % (attrName, self.descriptor.interface.identifier.name, attrName, forwardToAttrName))).define()
|
||||
|
||||
def memberReturnsNewObject(member):
|
||||
return member.getExtendedAttribute("NewObject") is not None
|
||||
def memberIsCreator(member):
|
||||
return member.getExtendedAttribute("Creator") is not None
|
||||
|
||||
class CGMemberJITInfo(CGThing):
|
||||
"""
|
||||
@ -8539,7 +8538,7 @@ if (""",
|
||||
"break;" % propDef),
|
||||
'jsvalRef': "temp",
|
||||
'jsvalHandle': "&temp",
|
||||
'returnsNewObject': False,
|
||||
'isCreator': False,
|
||||
'obj': "parentObject",
|
||||
'typedArraysAreStructs': True
|
||||
})
|
||||
@ -9135,7 +9134,7 @@ class CGNativeMember(ClassMethod):
|
||||
holder = "nsRefPtr"
|
||||
else:
|
||||
holder = "already_AddRefed"
|
||||
if memberReturnsNewObject(self.member):
|
||||
if memberIsCreator(self.member):
|
||||
warning = ""
|
||||
else:
|
||||
warning = "// Mark this as resultNotAddRefed to return raw pointers\n"
|
||||
@ -10100,10 +10099,10 @@ class FakeMember():
|
||||
def isMethod(self):
|
||||
return False
|
||||
def getExtendedAttribute(self, name):
|
||||
# Claim to be a [NewObject] so we can avoid the "mark this
|
||||
# Claim to be a [Creator] so we can avoid the "mark this
|
||||
# resultNotAddRefed" comments CGNativeMember codegen would
|
||||
# otherwise stick in.
|
||||
if name == "NewObject":
|
||||
if name == "Creator":
|
||||
return True
|
||||
return None
|
||||
|
||||
@ -10259,7 +10258,7 @@ class CallbackMember(CGNativeMember):
|
||||
# really... It's OK to use CallbackPreserveColor because
|
||||
# CallSetup already handled the unmark-gray bits for us.
|
||||
'obj' : 'CallbackPreserveColor()',
|
||||
'returnsNewObject': False,
|
||||
'isCreator': False,
|
||||
'exceptionCode' : self.exceptionCode
|
||||
})
|
||||
if arg.variadic:
|
||||
|
@ -924,12 +924,12 @@ class IDLInterface(IDLObjectWithScope):
|
||||
|
||||
method = IDLMethod(self.location, methodIdentifier, retType,
|
||||
args, static=True)
|
||||
# Constructors are always NewObject and are always
|
||||
# Constructors are always Creators and are always
|
||||
# assumed to be able to throw (since there's no way to
|
||||
# indicate otherwise) and never have any other
|
||||
# extended attributes.
|
||||
method.addExtendedAttributes(
|
||||
[IDLExtendedAttribute(self.location, ("NewObject",)),
|
||||
[IDLExtendedAttribute(self.location, ("Creator",)),
|
||||
IDLExtendedAttribute(self.location, ("Throws",))])
|
||||
|
||||
|
||||
@ -2760,7 +2760,7 @@ class IDLAttribute(IDLInterfaceMember):
|
||||
identifier == "SameObject" or
|
||||
identifier == "Constant" or
|
||||
identifier == "Func" or
|
||||
identifier == "NewObject"):
|
||||
identifier == "Creator"):
|
||||
# Known attributes that we don't need to do anything with here
|
||||
pass
|
||||
else:
|
||||
@ -3308,7 +3308,7 @@ class IDLMethod(IDLInterfaceMember, IDLScope):
|
||||
"restricted float type arguments",
|
||||
[attr.location, self.location])
|
||||
elif (identifier == "Throws" or
|
||||
identifier == "NewObject" or
|
||||
identifier == "Creator" or
|
||||
identifier == "ChromeOnly" or
|
||||
identifier == "Pref" or
|
||||
identifier == "Func" or
|
||||
|
@ -233,17 +233,17 @@ interface TestInterface {
|
||||
void passOptionalSelfWithDefault(optional TestInterface? arg = null);
|
||||
|
||||
// Non-wrapper-cache interface types
|
||||
[NewObject]
|
||||
[Creator]
|
||||
TestNonWrapperCacheInterface receiveNonWrapperCacheInterface();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
TestNonWrapperCacheInterface? receiveNullableNonWrapperCacheInterface();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
sequence<TestNonWrapperCacheInterface> receiveNonWrapperCacheInterfaceSequence();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
sequence<TestNonWrapperCacheInterface?> receiveNullableNonWrapperCacheInterfaceSequence();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
sequence<TestNonWrapperCacheInterface>? receiveNonWrapperCacheInterfaceNullableSequence();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
sequence<TestNonWrapperCacheInterface?>? receiveNullableNonWrapperCacheInterfaceNullableSequence();
|
||||
|
||||
// Non-castable interface types
|
||||
|
@ -129,17 +129,17 @@ interface TestExampleInterface {
|
||||
void passOptionalSelfWithDefault(optional TestInterface? arg = null);
|
||||
|
||||
// Non-wrapper-cache interface types
|
||||
[NewObject]
|
||||
[Creator]
|
||||
TestNonWrapperCacheInterface receiveNonWrapperCacheInterface();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
TestNonWrapperCacheInterface? receiveNullableNonWrapperCacheInterface();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
sequence<TestNonWrapperCacheInterface> receiveNonWrapperCacheInterfaceSequence();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
sequence<TestNonWrapperCacheInterface?> receiveNullableNonWrapperCacheInterfaceSequence();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
sequence<TestNonWrapperCacheInterface>? receiveNonWrapperCacheInterfaceNullableSequence();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
sequence<TestNonWrapperCacheInterface?>? receiveNullableNonWrapperCacheInterfaceNullableSequence();
|
||||
|
||||
// Non-castable interface types
|
||||
|
@ -145,18 +145,18 @@ interface TestJSImplInterface {
|
||||
void passOptionalSelfWithDefault(optional TestJSImplInterface? arg = null);
|
||||
|
||||
// Non-wrapper-cache interface types
|
||||
[NewObject]
|
||||
[Creator]
|
||||
TestNonWrapperCacheInterface receiveNonWrapperCacheInterface();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
TestNonWrapperCacheInterface? receiveNullableNonWrapperCacheInterface();
|
||||
|
||||
[NewObject]
|
||||
[Creator]
|
||||
sequence<TestNonWrapperCacheInterface> receiveNonWrapperCacheInterfaceSequence();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
sequence<TestNonWrapperCacheInterface?> receiveNullableNonWrapperCacheInterfaceSequence();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
sequence<TestNonWrapperCacheInterface>? receiveNonWrapperCacheInterfaceNullableSequence();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
sequence<TestNonWrapperCacheInterface?>? receiveNullableNonWrapperCacheInterfaceNullableSequence();
|
||||
|
||||
// Non-castable interface types
|
||||
|
@ -21,7 +21,7 @@ interface AudioContext : EventTarget {
|
||||
readonly attribute double currentTime;
|
||||
readonly attribute AudioListener listener;
|
||||
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
AudioBuffer createBuffer(unsigned long numberOfChannels, unsigned long length, float sampleRate);
|
||||
|
||||
void decodeAudioData(ArrayBuffer audioData,
|
||||
@ -29,47 +29,47 @@ interface AudioContext : EventTarget {
|
||||
optional DecodeErrorCallback errorCallback);
|
||||
|
||||
// AudioNode creation
|
||||
[NewObject]
|
||||
[Creator]
|
||||
AudioBufferSourceNode createBufferSource();
|
||||
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
MediaStreamAudioDestinationNode createMediaStreamDestination();
|
||||
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0,
|
||||
optional unsigned long numberOfInputChannels = 2,
|
||||
optional unsigned long numberOfOutputChannels = 2);
|
||||
|
||||
[NewObject]
|
||||
[Creator]
|
||||
AnalyserNode createAnalyser();
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
GainNode createGain();
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DelayNode createDelay(optional double maxDelayTime = 1);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
BiquadFilterNode createBiquadFilter();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
WaveShaperNode createWaveShaper();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
PannerNode createPanner();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
ConvolverNode createConvolver();
|
||||
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
ChannelSplitterNode createChannelSplitter(optional unsigned long numberOfOutputs = 6);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
ChannelMergerNode createChannelMerger(optional unsigned long numberOfInputs = 6);
|
||||
|
||||
[NewObject]
|
||||
[Creator]
|
||||
DynamicsCompressorNode createDynamicsCompressor();
|
||||
|
||||
[NewObject]
|
||||
[Creator]
|
||||
OscillatorNode createOscillator();
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
PeriodicWave createPeriodicWave(Float32Array real, Float32Array imag);
|
||||
|
||||
};
|
||||
@ -80,19 +80,19 @@ interface AudioContext : EventTarget {
|
||||
*/
|
||||
[PrefControlled]
|
||||
partial interface AudioContext {
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
AudioBuffer? createBuffer(ArrayBuffer buffer, boolean mixToMono);
|
||||
|
||||
// Same as createGain()
|
||||
[NewObject,Pref="media.webaudio.legacy.AudioContext"]
|
||||
[Creator,Pref="media.webaudio.legacy.AudioContext"]
|
||||
GainNode createGainNode();
|
||||
|
||||
// Same as createDelay()
|
||||
[NewObject, Throws, Pref="media.webaudio.legacy.AudioContext"]
|
||||
[Creator, Throws, Pref="media.webaudio.legacy.AudioContext"]
|
||||
DelayNode createDelayNode(optional double maxDelayTime = 1);
|
||||
|
||||
// Same as createScriptProcessor()
|
||||
[NewObject, Throws, Pref="media.webaudio.legacy.AudioContext"]
|
||||
[Creator, Throws, Pref="media.webaudio.legacy.AudioContext"]
|
||||
ScriptProcessorNode createJavaScriptNode(optional unsigned long bufferSize = 0,
|
||||
optional unsigned long numberOfInputChannels = 2,
|
||||
optional unsigned long numberOfOutputChannels = 2);
|
||||
|
@ -65,29 +65,29 @@ interface BluetoothAdapter : EventTarget {
|
||||
// Fired when remote devices query current media play status
|
||||
attribute EventHandler onrequestmediaplaystatus;
|
||||
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest setName(DOMString name);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest setDiscoverable(boolean discoverable);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest setDiscoverableTimeout(unsigned long timeout);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest startDiscovery();
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest stopDiscovery();
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest pair(BluetoothDevice device);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest unpair(BluetoothDevice device);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest getPairedDevices();
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest getConnectedDevices(unsigned short serviceUuid);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest setPinCode(DOMString deviceAddress, DOMString pinCode);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest setPasskey(DOMString deviceAddress, unsigned long passkey);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest setPairingConfirmation(DOMString deviceAddress, boolean confirmation);
|
||||
|
||||
/**
|
||||
@ -107,26 +107,26 @@ interface BluetoothAdapter : EventTarget {
|
||||
* @param device Remote device
|
||||
* @param profile 2-octets service UUID. This is optional.
|
||||
*/
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest connect(BluetoothDevice device, optional unsigned short serviceUuid);
|
||||
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest disconnect(BluetoothDevice device, optional unsigned short serviceUuid);
|
||||
|
||||
// One device can only send one file at a time
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest sendFile(DOMString deviceAddress, Blob blob);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest stopSendingFile(DOMString deviceAddress);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest confirmReceivingFile(DOMString deviceAddress, boolean confirmation);
|
||||
|
||||
// Connect/Disconnect SCO (audio) connection
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest connectSco();
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest disconnectSco();
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest isScoConnected();
|
||||
|
||||
/**
|
||||
@ -147,8 +147,8 @@ interface BluetoothAdapter : EventTarget {
|
||||
DOMRequest toggleCalls();
|
||||
|
||||
// AVRCP 1.3 methods
|
||||
[NewObject,Throws]
|
||||
[Creator,Throws]
|
||||
DOMRequest sendMediaMetaData(optional MediaMetaData mediaMetaData);
|
||||
[NewObject,Throws]
|
||||
[Creator,Throws]
|
||||
DOMRequest sendMediaPlayStatus(optional MediaPlayStatus mediaPlayStatus);
|
||||
};
|
||||
|
@ -13,6 +13,6 @@ interface BluetoothManager : EventTarget {
|
||||
|
||||
[Throws]
|
||||
boolean isConnected(unsigned short aProfile);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
DOMRequest? getDefaultAdapter();
|
||||
};
|
||||
|
@ -48,11 +48,11 @@ interface CanvasRenderingContext2D {
|
||||
// colors and styles (see also the CanvasDrawingStyles interface)
|
||||
attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black)
|
||||
attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
|
||||
[NewObject]
|
||||
[Creator]
|
||||
CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
CanvasPattern createPattern((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, [TreatNullAs=EmptyString] DOMString repetition);
|
||||
|
||||
// shadows
|
||||
@ -96,7 +96,7 @@ interface CanvasRenderingContext2D {
|
||||
void fillText(DOMString text, double x, double y, optional double maxWidth);
|
||||
[Throws, LenientFloat]
|
||||
void strokeText(DOMString text, double x, double y, optional double maxWidth);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
TextMetrics measureText(DOMString text);
|
||||
|
||||
// drawing images
|
||||
@ -112,11 +112,11 @@ interface CanvasRenderingContext2D {
|
||||
// NOT IMPLEMENTED void addHitRegion(HitRegionOptions options);
|
||||
|
||||
// pixel manipulation
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
ImageData createImageData(double sw, double sh);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
ImageData createImageData(ImageData imagedata);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
ImageData getImageData(double sx, double sy, double sw, double sh);
|
||||
[Throws]
|
||||
void putImageData(ImageData imagedata, double dx, double dy);
|
||||
|
@ -23,19 +23,19 @@ enum SupportedType {
|
||||
Constructor(Principal? prin, optional URI? documentURI = null,
|
||||
optional URI? baseURI = null)]
|
||||
interface DOMParser {
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
Document parseFromString(DOMString str, SupportedType type);
|
||||
|
||||
// Mozilla-specific stuff
|
||||
// Throws if the passed-in length is greater than the actual sequence length
|
||||
[NewObject, Throws, ChromeOnly]
|
||||
[Creator, Throws, ChromeOnly]
|
||||
Document parseFromBuffer(sequence<octet> buf, unsigned long bufLen,
|
||||
SupportedType type);
|
||||
// Throws if the passed-in length is greater than the actual typed array length
|
||||
[NewObject, Throws, ChromeOnly]
|
||||
[Creator, Throws, ChromeOnly]
|
||||
Document parseFromBuffer(Uint8Array buf, unsigned long bufLen,
|
||||
SupportedType type);
|
||||
[NewObject, Throws, ChromeOnly]
|
||||
[Creator, Throws, ChromeOnly]
|
||||
Document parseFromStream(InputStream stream, DOMString? charset,
|
||||
long contentLength, SupportedType type);
|
||||
[Throws, ChromeOnly]
|
||||
|
@ -9,7 +9,7 @@ interface MozObserver;
|
||||
[HeaderFile="mozilla/dom/DesktopNotification.h"]
|
||||
interface DesktopNotificationCenter
|
||||
{
|
||||
[NewObject]
|
||||
[Creator]
|
||||
DesktopNotification createNotification(DOMString title,
|
||||
DOMString description,
|
||||
optional DOMString iconURL = "");
|
||||
|
@ -40,17 +40,17 @@ interface Document : Node {
|
||||
HTMLCollection getElementsByClassName(DOMString classNames);
|
||||
Element? getElementById(DOMString elementId);
|
||||
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
Element createElement(DOMString localName);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
Element createElementNS(DOMString? namespace, DOMString qualifiedName);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
DocumentFragment createDocumentFragment();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
Text createTextNode(DOMString data);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
Comment createComment(DOMString data);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data);
|
||||
|
||||
[Throws]
|
||||
@ -58,16 +58,16 @@ interface Document : Node {
|
||||
[Throws]
|
||||
Node adoptNode(Node node);
|
||||
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
Event createEvent(DOMString interface);
|
||||
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
Range createRange();
|
||||
|
||||
// NodeFilter.SHOW_ALL = 0xFFFFFFFF
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
|
||||
|
||||
// NEW
|
||||
@ -77,11 +77,11 @@ interface Document : Node {
|
||||
|
||||
// These are not in the spec, but leave them for now for backwards compat.
|
||||
// So sort of like Gecko extensions
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
CDATASection createCDATASection(DOMString data);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
Attr createAttribute(DOMString name);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
Attr createAttributeNS(DOMString? namespace, DOMString name);
|
||||
readonly attribute DOMString? inputEncoding;
|
||||
};
|
||||
@ -290,7 +290,7 @@ partial interface Document {
|
||||
// nsIDOMDocumentTouch
|
||||
// XXXbz I can't find the sane spec for this stuff, so just cribbing
|
||||
// from our xpidl for now.
|
||||
[NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
||||
[Creator, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
||||
Touch createTouch(optional Window? view = null,
|
||||
optional EventTarget? target = null,
|
||||
optional long identifier = 0,
|
||||
@ -308,14 +308,14 @@ partial interface Document {
|
||||
// distinguishing arguments yet. Once this hack is removed. we can also
|
||||
// remove the corresponding overload on nsIDocument, since Touch... and
|
||||
// sequence<Touch> look the same in the C++.
|
||||
[NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
||||
[Creator, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
||||
TouchList createTouchList(Touch touch, Touch... touches);
|
||||
// XXXbz and another hack for the fact that we can't usefully have optional
|
||||
// distinguishing arguments but need a working zero-arg form of
|
||||
// createTouchList().
|
||||
[NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
||||
[Creator, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
||||
TouchList createTouchList();
|
||||
[NewObject, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
||||
[Creator, Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
||||
TouchList createTouchList(sequence<Touch> touches);
|
||||
|
||||
[ChromeOnly]
|
||||
|
@ -30,7 +30,7 @@ interface HTMLMediaElement : HTMLElement {
|
||||
readonly attribute unsigned short networkState;
|
||||
[SetterThrows]
|
||||
attribute DOMString preload;
|
||||
[NewObject]
|
||||
[Creator]
|
||||
readonly attribute TimeRanges buffered;
|
||||
void load();
|
||||
DOMString canPlayType(DOMString type);
|
||||
@ -55,9 +55,9 @@ interface HTMLMediaElement : HTMLElement {
|
||||
attribute double defaultPlaybackRate;
|
||||
[SetterThrows]
|
||||
attribute double playbackRate;
|
||||
[NewObject]
|
||||
[Creator]
|
||||
readonly attribute TimeRanges played;
|
||||
[NewObject]
|
||||
[Creator]
|
||||
readonly attribute TimeRanges seekable;
|
||||
readonly attribute boolean ended;
|
||||
[SetterThrows]
|
||||
|
@ -48,6 +48,6 @@ partial interface HTMLVideoElement {
|
||||
|
||||
// https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#idl-def-HTMLVideoElement
|
||||
partial interface HTMLVideoElement {
|
||||
[Pref="media.mediasource.enabled", NewObject]
|
||||
[Pref="media.mediasource.enabled", Creator]
|
||||
VideoPlaybackQuality getVideoPlaybackQuality();
|
||||
};
|
||||
|
@ -18,12 +18,12 @@ interface IDBKeyRange {
|
||||
readonly attribute boolean lowerOpen;
|
||||
[Constant]
|
||||
readonly attribute boolean upperOpen;
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
static IDBKeyRange only (any value);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
static IDBKeyRange lowerBound (any lower, optional boolean open = false);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
static IDBKeyRange upperBound (any upper, optional boolean open = false);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
static IDBKeyRange bound (any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false);
|
||||
};
|
||||
|
@ -28,7 +28,7 @@ interface MediaSource : EventTarget {
|
||||
readonly attribute MediaSourceReadyState readyState;
|
||||
[SetterThrows]
|
||||
attribute unrestricted double duration;
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
SourceBuffer addSourceBuffer(DOMString type);
|
||||
[Throws]
|
||||
void removeSourceBuffer(SourceBuffer sourceBuffer);
|
||||
|
@ -111,7 +111,7 @@ Navigator implements NavigatorBattery;
|
||||
// https://wiki.mozilla.org/WebAPI/DataStore
|
||||
[NoInterfaceObject]
|
||||
interface NavigatorDataStore {
|
||||
[Throws, NewObject, Pref="dom.datastore.enabled"]
|
||||
[Throws, Creator, Pref="dom.datastore.enabled"]
|
||||
Promise getDataStores(DOMString name);
|
||||
};
|
||||
Navigator implements NavigatorDataStore;
|
||||
|
@ -22,15 +22,15 @@ interface Promise {
|
||||
// the proto of a promise object or someone screws up and manages to create a
|
||||
// Promise object in this scope without having resolved the interface object
|
||||
// first.
|
||||
[NewObject, Throws, Func="mozilla::dom::Promise::EnabledForScope"]
|
||||
[Creator, Throws, Func="mozilla::dom::Promise::EnabledForScope"]
|
||||
static Promise resolve(any value); // same as any(value)
|
||||
[NewObject, Throws, Func="mozilla::dom::Promise::EnabledForScope"]
|
||||
[Creator, Throws, Func="mozilla::dom::Promise::EnabledForScope"]
|
||||
static Promise reject(any value);
|
||||
|
||||
[NewObject]
|
||||
[Creator]
|
||||
Promise then([TreatUndefinedAs=Missing] optional AnyCallback fulfillCallback,
|
||||
[TreatUndefinedAs=Missing] optional AnyCallback rejectCallback);
|
||||
|
||||
[NewObject]
|
||||
[Creator]
|
||||
Promise catch([TreatUndefinedAs=Missing] optional AnyCallback rejectCallback);
|
||||
};
|
||||
|
@ -16,7 +16,7 @@ interface SVGGraphicsElement : SVGElement {
|
||||
readonly attribute SVGElement? nearestViewportElement;
|
||||
readonly attribute SVGElement? farthestViewportElement;
|
||||
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
SVGRect getBBox();
|
||||
// Not implemented
|
||||
// SVGRect getStrokeBBox();
|
||||
|
@ -25,27 +25,27 @@ interface SVGMatrix {
|
||||
[SetterThrows]
|
||||
attribute float f;
|
||||
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGMatrix multiply(SVGMatrix secondMatrix);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
SVGMatrix inverse();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGMatrix translate(float x, float y);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGMatrix scale(float scaleFactor);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGMatrix scaleNonUniform(float scaleFactorX, float scaleFactorY);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGMatrix rotate(float angle);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
SVGMatrix rotateFromVector(float x, float y);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGMatrix flipX();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGMatrix flipY();
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
SVGMatrix skewX(float angle);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
SVGMatrix skewY(float angle);
|
||||
};
|
||||
|
||||
|
@ -15,46 +15,46 @@ interface SVGPathElement : SVGGraphicsElement {
|
||||
|
||||
[Throws]
|
||||
float getTotalLength();
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
SVGPoint getPointAtLength(float distance);
|
||||
unsigned long getPathSegAtLength(float distance);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegClosePath createSVGPathSegClosePath();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(float x, float y);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegMovetoRel createSVGPathSegMovetoRel(float x, float y);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegLinetoAbs createSVGPathSegLinetoAbs(float x, float y);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegLinetoRel createSVGPathSegLinetoRel(float x, float y);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs(float x, float y, float x1, float y1, float x2, float y2);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel(float x, float y, float x1, float y1, float x2, float y2);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs(float x, float y, float x1, float y1);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel(float x, float y, float x1, float y1);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegArcAbs createSVGPathSegArcAbs(float x, float y, float r1, float r2, float angle, boolean largeArcFlag, boolean sweepFlag);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegArcRel createSVGPathSegArcRel(float x, float y, float r1, float r2, float angle, boolean largeArcFlag, boolean sweepFlag);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs(float x);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel(float x);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs(float y);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel(float y);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs(float x, float y, float x2, float y2);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel(float x, float y, float x2, float y2);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs(float x, float y);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel(float x, float y);
|
||||
};
|
||||
|
||||
|
@ -17,7 +17,7 @@ interface SVGPoint {
|
||||
[SetterThrows]
|
||||
attribute float y;
|
||||
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPoint matrixTransform(SVGMatrix matrix);
|
||||
};
|
||||
|
||||
|
@ -43,21 +43,21 @@ interface SVGSVGElement : SVGGraphicsElement {
|
||||
// boolean checkIntersection(SVGElement element, SVGRect rect);
|
||||
// boolean checkEnclosure(SVGElement element, SVGRect rect);
|
||||
void deselectAll();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGNumber createSVGNumber();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGLength createSVGLength();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGAngle createSVGAngle();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGPoint createSVGPoint();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGMatrix createSVGMatrix();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGRect createSVGRect();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGTransform createSVGTransform();
|
||||
[NewObject]
|
||||
[Creator]
|
||||
SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix);
|
||||
[Throws]
|
||||
Element? getElementById(DOMString elementId);
|
||||
|
@ -28,7 +28,7 @@ interface SVGTextContentElement : SVGGraphicsElement {
|
||||
SVGPoint getStartPositionOfChar(unsigned long charnum);
|
||||
[Throws]
|
||||
SVGPoint getEndPositionOfChar(unsigned long charnum);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
SVGRect getExtentOfChar(unsigned long charnum);
|
||||
[Throws]
|
||||
float getRotationOfChar(unsigned long charnum);
|
||||
|
@ -20,7 +20,7 @@ interface SourceBuffer : EventTarget {
|
||||
[SetterThrows]
|
||||
attribute SourceBufferAppendMode mode;
|
||||
readonly attribute boolean updating;
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
readonly attribute TimeRanges buffered;
|
||||
[SetterThrows]
|
||||
attribute double timestampOffset;
|
||||
|
@ -589,9 +589,9 @@ interface WebGLRenderingContext {
|
||||
|
||||
void generateMipmap(GLenum target);
|
||||
|
||||
[NewObject]
|
||||
[Creator]
|
||||
WebGLActiveInfo? getActiveAttrib(WebGLProgram? program, GLuint index);
|
||||
[NewObject]
|
||||
[Creator]
|
||||
WebGLActiveInfo? getActiveUniform(WebGLProgram? program, GLuint index);
|
||||
|
||||
sequence<WebGLShader>? getAttachedShaders(WebGLProgram? program);
|
||||
@ -612,7 +612,7 @@ interface WebGLRenderingContext {
|
||||
any getRenderbufferParameter(GLenum target, GLenum pname);
|
||||
any getShaderParameter(WebGLShader? shader, GLenum pname);
|
||||
|
||||
[NewObject]
|
||||
[Creator]
|
||||
WebGLShaderPrecisionFormat? getShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype);
|
||||
|
||||
DOMString? getShaderInfoLog(WebGLShader? shader);
|
||||
@ -624,7 +624,7 @@ interface WebGLRenderingContext {
|
||||
[Throws]
|
||||
any getUniform(WebGLProgram? program, WebGLUniformLocation? location);
|
||||
|
||||
[NewObject]
|
||||
[Creator]
|
||||
WebGLUniformLocation? getUniformLocation(WebGLProgram? program, DOMString name);
|
||||
|
||||
[Throws]
|
||||
|
@ -11,10 +11,10 @@ interface XPathResult;
|
||||
[Constructor]
|
||||
interface XPathEvaluator {
|
||||
// Based on nsIDOMXPathEvaluator
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
XPathExpression createExpression(DOMString expression,
|
||||
XPathNSResolver? resolver);
|
||||
[NewObject, Throws]
|
||||
[Creator, Throws]
|
||||
XPathNSResolver createNSResolver(Node? nodeResolver);
|
||||
[Throws]
|
||||
XPathResult evaluate(DOMString expression, Node? contextNode,
|
||||
|
Loading…
Reference in New Issue
Block a user