Bug 836822. Convert MathML elements to WebIDL. r=peterv

This commit is contained in:
Boris Zbarsky 2013-02-06 09:42:16 +00:00
parent 9d1c0210e4
commit 25330ef7c5
2 changed files with 16 additions and 1 deletions

View File

@ -21,6 +21,8 @@
#include "nsIScriptError.h"
#include "nsContentUtils.h"
#include "mozilla/dom/ElementBinding.h"
using namespace mozilla;
using namespace mozilla::dom;
@ -941,3 +943,9 @@ nsMathMLElement::UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttr,
return rv;
}
JSObject*
nsMathMLElement::WrapNode(JSContext *aCx, JSObject *aScope, bool *aTriedToWrap)
{
return ElementBinding::Wrap(aCx, aScope, this, aTriedToWrap);
}

View File

@ -27,7 +27,9 @@ public:
nsMathMLElement(already_AddRefed<nsINodeInfo> aNodeInfo)
: nsMathMLElementBase(aNodeInfo), Link(this),
mIncrementScriptLevel(false)
{}
{
SetIsDOMBinding();
}
// Implementation of nsISupports is inherited from nsMathMLElementBase
NS_DECL_ISUPPORTS_INHERITED
@ -104,6 +106,11 @@ public:
virtual nsXPCClassInfo* GetClassInfo();
virtual nsIDOMNode* AsDOMNode() { return this; }
protected:
virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope,
bool *aTriedToWrap) MOZ_OVERRIDE;
private:
bool mIncrementScriptLevel;
};