Bug 770945 - Simple media events shouldn't be cancelable. r=roc

This commit is contained in:
Matthew Gregan 2012-08-14 15:26:43 +12:00
parent 92be2d7a74
commit d3a4cc2185
4 changed files with 5 additions and 10 deletions

View File

@ -101,8 +101,6 @@ nsDOMNotifyAudioAvailableEvent::GetTime(float *aRetVal)
NS_IMETHODIMP
nsDOMNotifyAudioAvailableEvent::InitAudioAvailableEvent(const nsAString& aType,
bool aCanBubble,
bool aCancelable,
float* aFrameBuffer,
PRUint32 aFrameBufferLength,
float aTime,
@ -112,7 +110,7 @@ nsDOMNotifyAudioAvailableEvent::InitAudioAvailableEvent(const nsAString& aType,
// that if we exit due to some error, the memory will be freed. Otherwise,
// the framebuffer's memory will be freed when this event is destroyed.
nsAutoArrayPtr<float> frameBuffer(aFrameBuffer);
nsresult rv = nsDOMEvent::InitEvent(aType, aCanBubble, aCancelable);
nsresult rv = nsDOMEvent::InitEvent(aType, false, false);
NS_ENSURE_SUCCESS(rv, rv);
mFrameBuffer = frameBuffer.forget();

View File

@ -213,7 +213,7 @@ public:
mSource,
NS_LITERAL_STRING("error"),
false,
true);
false);
}
};
@ -3069,7 +3069,7 @@ nsresult nsHTMLMediaElement::DispatchAudioAvailableEvent(float* aFrameBuffer,
NS_ENSURE_SUCCESS(rv, rv);
rv = audioavailableEvent->InitAudioAvailableEvent(NS_LITERAL_STRING("MozAudioAvailable"),
true, true, frameBuffer.forget(), aFrameBufferLength,
frameBuffer.forget(), aFrameBufferLength,
aTime, mAllowAudioData);
NS_ENSURE_SUCCESS(rv, rv);
@ -3093,7 +3093,7 @@ nsresult nsHTMLMediaElement::DispatchEvent(const nsAString& aName)
static_cast<nsIContent*>(this),
aName,
false,
true);
false);
}
nsresult nsHTMLMediaElement::DispatchAsyncEvent(const nsAString& aName)

View File

@ -42,7 +42,6 @@ function FinishedLoads() {
}
function loadError(evt) {
// Prevent mochitest's onerror handler catching the 'error' event on bubble.
var v = evt.target;
is(v._loadError, false, "Shouldn't receive multiple error events for " + v.src);
v._loadError = true;

View File

@ -7,7 +7,7 @@
#include "nsIDOMEvent.idl"
#include "nsIVariant.idl"
[scriptable, builtinclass, uuid(34139b4f-ac78-4372-98d3-12d6dcf478ef)]
[scriptable, builtinclass, uuid(03957748-6878-4bb5-9c34-2c509a17ca5f)]
interface nsIDOMNotifyAudioAvailableEvent : nsIDOMEvent
{
[implicit_jscontext]
@ -16,8 +16,6 @@ interface nsIDOMNotifyAudioAvailableEvent : nsIDOMEvent
readonly attribute float time;
void initAudioAvailableEvent(in DOMString typeArg,
in boolean canBubbleArg,
in boolean cancelableArg,
[array, size_is(frameBufferLength)] in float frameBufferPtr,
in unsigned long frameBufferLength,
in float time,