зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 8fa0cbe4a54d (bug 817194) for build failures
This commit is contained in:
Родитель
fd6266fd98
Коммит
a4e9089af7
|
@ -526,11 +526,11 @@ nsDOMMutationObserver::TakeRecords(
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsDOMMutationObserver::GetObservingInfo(nsTArray<Nullable<MutationObservingInfo> >& aResult)
|
nsDOMMutationObserver::GetObservingInfo(nsTArray<Nullable<MutationObservingInfoInitializer> >& aResult)
|
||||||
{
|
{
|
||||||
aResult.SetCapacity(mReceivers.Count());
|
aResult.SetCapacity(mReceivers.Count());
|
||||||
for (int32_t i = 0; i < mReceivers.Count(); ++i) {
|
for (int32_t i = 0; i < mReceivers.Count(); ++i) {
|
||||||
MutationObservingInfo& info = aResult.AppendElement()->SetValue();
|
MutationObservingInfoInitializer& info = aResult.AppendElement()->SetValue();
|
||||||
nsMutationReceiver* mr = mReceivers[i];
|
nsMutationReceiver* mr = mReceivers[i];
|
||||||
info.mChildList = mr->ChildList();
|
info.mChildList = mr->ChildList();
|
||||||
info.mAttributes = mr->Attributes();
|
info.mAttributes = mr->Attributes();
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "nsIDocument.h"
|
#include "nsIDocument.h"
|
||||||
|
|
||||||
class nsDOMMutationObserver;
|
class nsDOMMutationObserver;
|
||||||
using mozilla::dom::MutationObservingInfo;
|
using mozilla::dom::MutationObservingInfoInitializer;
|
||||||
|
|
||||||
class nsDOMMutationRecord : public nsISupports,
|
class nsDOMMutationRecord : public nsISupports,
|
||||||
public nsWrapperCache
|
public nsWrapperCache
|
||||||
|
@ -379,7 +379,7 @@ public:
|
||||||
|
|
||||||
void HandleMutation();
|
void HandleMutation();
|
||||||
|
|
||||||
void GetObservingInfo(nsTArray<Nullable<MutationObservingInfo> >& aResult);
|
void GetObservingInfo(nsTArray<Nullable<MutationObservingInfoInitializer> >& aResult);
|
||||||
|
|
||||||
mozilla::dom::MutationCallback* MutationCallback() { return mCallback; }
|
mozilla::dom::MutationCallback* MutationCallback() { return mCallback; }
|
||||||
|
|
||||||
|
|
|
@ -911,7 +911,7 @@ WebGLContext::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
WebGLContext::GetContextAttributes(Nullable<dom::WebGLContextAttributes> &retval)
|
WebGLContext::GetContextAttributes(Nullable<dom::WebGLContextAttributesInitializer> &retval)
|
||||||
{
|
{
|
||||||
retval.SetNull();
|
retval.SetNull();
|
||||||
if (IsContextLost())
|
if (IsContextLost())
|
||||||
|
|
|
@ -76,6 +76,7 @@ namespace dom {
|
||||||
class ImageData;
|
class ImageData;
|
||||||
|
|
||||||
struct WebGLContextAttributes;
|
struct WebGLContextAttributes;
|
||||||
|
struct WebGLContextAttributesInitializer;
|
||||||
template<typename> struct Nullable;
|
template<typename> struct Nullable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,7 +258,7 @@ public:
|
||||||
GLsizei DrawingBufferWidth() const { return IsContextLost() ? 0 : mWidth; }
|
GLsizei DrawingBufferWidth() const { return IsContextLost() ? 0 : mWidth; }
|
||||||
GLsizei DrawingBufferHeight() const { return IsContextLost() ? 0 : mHeight; }
|
GLsizei DrawingBufferHeight() const { return IsContextLost() ? 0 : mHeight; }
|
||||||
|
|
||||||
void GetContextAttributes(dom::Nullable<dom::WebGLContextAttributes>& retval);
|
void GetContextAttributes(dom::Nullable<dom::WebGLContextAttributesInitializer>& retval);
|
||||||
bool IsContextLost() const { return mContextStatus != ContextNotLost; }
|
bool IsContextLost() const { return mContextStatus != ContextNotLost; }
|
||||||
void GetSupportedExtensions(JSContext *cx, dom::Nullable< nsTArray<nsString> > &retval);
|
void GetSupportedExtensions(JSContext *cx, dom::Nullable< nsTArray<nsString> > &retval);
|
||||||
JSObject* GetExtension(JSContext* cx, const nsAString& aName, ErrorResult& rv);
|
JSObject* GetExtension(JSContext* cx, const nsAString& aName, ErrorResult& rv);
|
||||||
|
|
|
@ -492,7 +492,7 @@ MediaRecorder::CreateAndDispatchBlobEvent(Session *aSession)
|
||||||
return NS_ERROR_DOM_SECURITY_ERR;
|
return NS_ERROR_DOM_SECURITY_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
BlobEventInit init;
|
BlobEventInitInitializer init;
|
||||||
init.mBubbles = false;
|
init.mBubbles = false;
|
||||||
init.mCancelable = false;
|
init.mCancelable = false;
|
||||||
init.mData = aSession->GetEncodedData();
|
init.mData = aSession->GetEncodedData();
|
||||||
|
|
|
@ -713,7 +713,7 @@ SpeechRecognition::Start(ErrorResult& aRv)
|
||||||
NS_ENSURE_SUCCESS_VOID(rv);
|
NS_ENSURE_SUCCESS_VOID(rv);
|
||||||
|
|
||||||
AutoSafeJSContext cx;
|
AutoSafeJSContext cx;
|
||||||
MediaStreamConstraints constraints;
|
MediaStreamConstraintsInitializer constraints;
|
||||||
constraints.mAudio.SetAsBoolean() = true;
|
constraints.mAudio.SetAsBoolean() = true;
|
||||||
|
|
||||||
if (!mTestConfig.mFakeFSMEvents) {
|
if (!mTestConfig.mFakeFSMEvents) {
|
||||||
|
|
|
@ -4999,7 +4999,7 @@ nsGlobalWindow::DispatchResizeEvent(const nsIntSize& aSize)
|
||||||
|
|
||||||
AutoSafeJSContext cx;
|
AutoSafeJSContext cx;
|
||||||
JSAutoCompartment ac(cx, mJSObject);
|
JSAutoCompartment ac(cx, mJSObject);
|
||||||
DOMWindowResizeEventDetail detail;
|
DOMWindowResizeEventDetailInitializer detail;
|
||||||
detail.mWidth = aSize.width;
|
detail.mWidth = aSize.width;
|
||||||
detail.mHeight = aSize.height;
|
detail.mHeight = aSize.height;
|
||||||
JS::Rooted<JS::Value> detailValue(cx);
|
JS::Rooted<JS::Value> detailValue(cx);
|
||||||
|
|
|
@ -3544,13 +3544,9 @@ for (uint32_t i = 0; i < length; ++i) {
|
||||||
assert not isOptional
|
assert not isOptional
|
||||||
|
|
||||||
typeName = CGDictionary.makeDictionaryName(type.inner)
|
typeName = CGDictionary.makeDictionaryName(type.inner)
|
||||||
if not isMember:
|
actualTypeName = typeName
|
||||||
# Since we're not a member and not nullable or optional, no one will
|
|
||||||
# see our real type, so we can do the fast version of the dictionary
|
|
||||||
# that doesn't pre-initialize members.
|
|
||||||
typeName = "detail::Fast" + typeName
|
|
||||||
|
|
||||||
declType = CGGeneric(typeName)
|
declType = CGGeneric(actualTypeName)
|
||||||
|
|
||||||
# We do manual default value handling here, because we
|
# We do manual default value handling here, because we
|
||||||
# actually do want a jsval, and we only handle null anyway
|
# actually do want a jsval, and we only handle null anyway
|
||||||
|
@ -4428,7 +4424,8 @@ def getRetvalDeclarationForType(returnType, descriptorProvider,
|
||||||
return result, True, rooter, None
|
return result, True, rooter, None
|
||||||
if returnType.isDictionary():
|
if returnType.isDictionary():
|
||||||
nullable = returnType.nullable()
|
nullable = returnType.nullable()
|
||||||
dictName = CGDictionary.makeDictionaryName(returnType.unroll().inner)
|
dictName = (CGDictionary.makeDictionaryName(returnType.unroll().inner) +
|
||||||
|
"Initializer")
|
||||||
result = CGGeneric(dictName)
|
result = CGGeneric(dictName)
|
||||||
if not isMember and typeNeedsRooting(returnType):
|
if not isMember and typeNeedsRooting(returnType):
|
||||||
if nullable:
|
if nullable:
|
||||||
|
@ -8382,20 +8379,7 @@ if (""",
|
||||||
visibility="public",
|
visibility="public",
|
||||||
body=self.getMemberInitializer(m))
|
body=self.getMemberInitializer(m))
|
||||||
for m in self.memberInfo]
|
for m in self.memberInfo]
|
||||||
ctors = [
|
ctors = [ClassConstructor([], bodyInHeader=True, visibility="public")]
|
||||||
ClassConstructor(
|
|
||||||
[],
|
|
||||||
visibility="public",
|
|
||||||
body=(
|
|
||||||
"// Safe to pass a null context if we pass a null value\n"
|
|
||||||
"Init(nullptr, JS::NullHandleValue);")),
|
|
||||||
ClassConstructor(
|
|
||||||
[Argument("int", "")],
|
|
||||||
visibility="protected",
|
|
||||||
explicit=True,
|
|
||||||
bodyInHeader=True,
|
|
||||||
body='// Do nothing here; this is used by our "Fast" subclass')
|
|
||||||
]
|
|
||||||
methods = []
|
methods = []
|
||||||
|
|
||||||
if self.needToInitIds:
|
if self.needToInitIds:
|
||||||
|
@ -8429,23 +8413,17 @@ if (""",
|
||||||
disallowCopyConstruction=disallowCopyConstruction)
|
disallowCopyConstruction=disallowCopyConstruction)
|
||||||
|
|
||||||
|
|
||||||
fastDictionaryCtor = ClassConstructor(
|
initializerCtor = ClassConstructor([],
|
||||||
[],
|
|
||||||
visibility="public",
|
visibility="public",
|
||||||
bodyInHeader=True,
|
body=(
|
||||||
baseConstructors=["%s(42)" % selfName],
|
"// Safe to pass a null context if we pass a null value\n"
|
||||||
body="// Doesn't matter what int we pass to the parent constructor"
|
"Init(nullptr, JS::NullHandleValue);"))
|
||||||
)
|
initializerStruct = CGClass(selfName + "Initializer",
|
||||||
|
|
||||||
fastStruct = CGClass("Fast" + selfName,
|
|
||||||
bases=[ClassBase(selfName)],
|
bases=[ClassBase(selfName)],
|
||||||
constructors=[fastDictionaryCtor],
|
constructors=[initializerCtor],
|
||||||
isStruct=True)
|
isStruct=True)
|
||||||
|
|
||||||
return CGList([struct,
|
return CGList([struct, initializerStruct])
|
||||||
CGNamespace.build(['detail'],
|
|
||||||
fastStruct)],
|
|
||||||
"\n")
|
|
||||||
|
|
||||||
def deps(self):
|
def deps(self):
|
||||||
return self.dictionary.getDeps()
|
return self.dictionary.getDeps()
|
||||||
|
|
|
@ -587,7 +587,7 @@ public:
|
||||||
// Dictionary tests
|
// Dictionary tests
|
||||||
void PassDictionary(JSContext*, const Dict&);
|
void PassDictionary(JSContext*, const Dict&);
|
||||||
void ReceiveDictionary(JSContext*, Dict&);
|
void ReceiveDictionary(JSContext*, Dict&);
|
||||||
void ReceiveNullableDictionary(JSContext*, Nullable<Dict>&);
|
void ReceiveNullableDictionary(JSContext*, Nullable<DictInitializer>&);
|
||||||
void PassOtherDictionary(const GrandparentDict&);
|
void PassOtherDictionary(const GrandparentDict&);
|
||||||
void PassSequenceOfDictionaries(JSContext*, const Sequence<Dict>&);
|
void PassSequenceOfDictionaries(JSContext*, const Sequence<Dict>&);
|
||||||
void PassDictionaryOrLong(JSContext*, const Dict&);
|
void PassDictionaryOrLong(JSContext*, const Dict&);
|
||||||
|
|
|
@ -134,7 +134,7 @@ BrowserElementParent::DispatchOpenWindowEvent(Element* aOpenerFrameElement,
|
||||||
// aFeatures.
|
// aFeatures.
|
||||||
|
|
||||||
// Create the event's detail object.
|
// Create the event's detail object.
|
||||||
OpenWindowEventDetail detail;
|
OpenWindowEventDetailInitializer detail;
|
||||||
detail.mUrl = aURL;
|
detail.mUrl = aURL;
|
||||||
detail.mName = aName;
|
detail.mName = aName;
|
||||||
detail.mFeatures = aFeatures;
|
detail.mFeatures = aFeatures;
|
||||||
|
@ -307,7 +307,7 @@ NS_IMETHODIMP DispatchAsyncScrollEventRunnable::Run()
|
||||||
NS_ENSURE_TRUE(globalObject, NS_ERROR_UNEXPECTED);
|
NS_ENSURE_TRUE(globalObject, NS_ERROR_UNEXPECTED);
|
||||||
|
|
||||||
// Create the event's detail object.
|
// Create the event's detail object.
|
||||||
AsyncScrollEventDetail detail;
|
AsyncScrollEventDetailInitializer detail;
|
||||||
detail.mLeft = mContentRect.x;
|
detail.mLeft = mContentRect.x;
|
||||||
detail.mTop = mContentRect.y;
|
detail.mTop = mContentRect.y;
|
||||||
detail.mWidth = mContentRect.width;
|
detail.mWidth = mContentRect.width;
|
||||||
|
|
|
@ -244,7 +244,7 @@ GamepadService::FireButtonEvent(EventTarget* aTarget,
|
||||||
{
|
{
|
||||||
nsString name = aValue == 1.0L ? NS_LITERAL_STRING("gamepadbuttondown") :
|
nsString name = aValue == 1.0L ? NS_LITERAL_STRING("gamepadbuttondown") :
|
||||||
NS_LITERAL_STRING("gamepadbuttonup");
|
NS_LITERAL_STRING("gamepadbuttonup");
|
||||||
GamepadButtonEventInit init;
|
GamepadButtonEventInitInitializer init;
|
||||||
init.mBubbles = false;
|
init.mBubbles = false;
|
||||||
init.mCancelable = false;
|
init.mCancelable = false;
|
||||||
init.mGamepad = aGamepad;
|
init.mGamepad = aGamepad;
|
||||||
|
@ -307,7 +307,7 @@ GamepadService::FireAxisMoveEvent(EventTarget* aTarget,
|
||||||
uint32_t aAxis,
|
uint32_t aAxis,
|
||||||
double aValue)
|
double aValue)
|
||||||
{
|
{
|
||||||
GamepadAxisMoveEventInit init;
|
GamepadAxisMoveEventInitInitializer init;
|
||||||
init.mBubbles = false;
|
init.mBubbles = false;
|
||||||
init.mCancelable = false;
|
init.mCancelable = false;
|
||||||
init.mGamepad = aGamepad;
|
init.mGamepad = aGamepad;
|
||||||
|
@ -388,7 +388,7 @@ GamepadService::FireConnectionEvent(EventTarget* aTarget,
|
||||||
{
|
{
|
||||||
nsString name = aConnected ? NS_LITERAL_STRING("gamepadconnected") :
|
nsString name = aConnected ? NS_LITERAL_STRING("gamepadconnected") :
|
||||||
NS_LITERAL_STRING("gamepaddisconnected");
|
NS_LITERAL_STRING("gamepaddisconnected");
|
||||||
GamepadEventInit init;
|
GamepadEventInitInitializer init;
|
||||||
init.mBubbles = false;
|
init.mBubbles = false;
|
||||||
init.mCancelable = false;
|
init.mCancelable = false;
|
||||||
init.mGamepad = aGamepad;
|
init.mGamepad = aGamepad;
|
||||||
|
|
|
@ -239,7 +239,7 @@ void
|
||||||
nsDeviceSensors::FireDOMLightEvent(mozilla::dom::EventTarget* aTarget,
|
nsDeviceSensors::FireDOMLightEvent(mozilla::dom::EventTarget* aTarget,
|
||||||
double aValue)
|
double aValue)
|
||||||
{
|
{
|
||||||
DeviceLightEventInit init;
|
DeviceLightEventInitInitializer init;
|
||||||
init.mBubbles = true;
|
init.mBubbles = true;
|
||||||
init.mCancelable = false;
|
init.mCancelable = false;
|
||||||
init.mValue = aValue;
|
init.mValue = aValue;
|
||||||
|
@ -258,7 +258,7 @@ nsDeviceSensors::FireDOMProximityEvent(mozilla::dom::EventTarget* aTarget,
|
||||||
double aMin,
|
double aMin,
|
||||||
double aMax)
|
double aMax)
|
||||||
{
|
{
|
||||||
DeviceProximityEventInit init;
|
DeviceProximityEventInitInitializer init;
|
||||||
init.mBubbles = true;
|
init.mBubbles = true;
|
||||||
init.mCancelable = false;
|
init.mCancelable = false;
|
||||||
init.mValue = aValue;
|
init.mValue = aValue;
|
||||||
|
@ -289,7 +289,7 @@ void
|
||||||
nsDeviceSensors::FireDOMUserProximityEvent(mozilla::dom::EventTarget* aTarget,
|
nsDeviceSensors::FireDOMUserProximityEvent(mozilla::dom::EventTarget* aTarget,
|
||||||
bool aNear)
|
bool aNear)
|
||||||
{
|
{
|
||||||
UserProximityEventInit init;
|
UserProximityEventInitInitializer init;
|
||||||
init.mBubbles = true;
|
init.mBubbles = true;
|
||||||
init.mCancelable = false;
|
init.mCancelable = false;
|
||||||
init.mNear = aNear;
|
init.mNear = aNear;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче