author | Boris Zbarsky <bzbarsky@mit.edu> |
Wed, 06 Feb 2013 09:42:16 +0000 | |
changeset 120971 | 85e3ebb56fb32bfb1470c3602bd07e6ba3bf8847 |
parent 120970 | cd0fca4f35d00542fdc01183c6ac382b6eef45a3 |
child 120972 | a8bfa0b091b5efce7825a8dab3129bd048844719 |
push id | 22516 |
push user | bzbarsky@mozilla.com |
push date | Wed, 06 Feb 2013 09:57:08 +0000 |
treeherder | mozilla-inbound@88601eca5f69 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | peterv |
bugs | 836822 |
milestone | 21.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
content/mathml/content/src/nsMathMLElement.cpp | file | annotate | diff | comparison | revisions | |
content/mathml/content/src/nsMathMLElement.h | file | annotate | diff | comparison | revisions |
--- a/content/mathml/content/src/nsMathMLElement.cpp +++ b/content/mathml/content/src/nsMathMLElement.cpp @@ -16,16 +16,18 @@ #include "nsIDocument.h" #include "nsEventStates.h" #include "nsIPresShell.h" #include "nsPresContext.h" #include "mozAutoDocUpdate.h" #include "nsIScriptError.h" #include "nsContentUtils.h" +#include "mozilla/dom/ElementBinding.h" + using namespace mozilla; using namespace mozilla::dom; //---------------------------------------------------------------------- // nsISupports methods: DOMCI_NODE_DATA(MathMLElement, nsMathMLElement) @@ -936,8 +938,14 @@ nsMathMLElement::UnsetAttr(int32_t aName aNameSpaceID == kNameSpaceID_XLink)) { // Note: just because we removed a single href attr doesn't mean there's no href, // since there are 2 possible namespaces. Link::ResetLinkState(!!aNotify, Link::ElementHasHref()); } return rv; } + +JSObject* +nsMathMLElement::WrapNode(JSContext *aCx, JSObject *aScope, bool *aTriedToWrap) +{ + return ElementBinding::Wrap(aCx, aScope, this, aTriedToWrap); +}
--- a/content/mathml/content/src/nsMathMLElement.h +++ b/content/mathml/content/src/nsMathMLElement.h @@ -22,17 +22,19 @@ class nsMathMLElement : public nsMathMLE public nsIDOMElement, public nsILink, public mozilla::dom::Link { public: nsMathMLElement(already_AddRefed<nsINodeInfo> aNodeInfo) : nsMathMLElementBase(aNodeInfo), Link(this), mIncrementScriptLevel(false) - {} + { + SetIsDOMBinding(); + } // Implementation of nsISupports is inherited from nsMathMLElementBase NS_DECL_ISUPPORTS_INHERITED // Forward implementations of parent interfaces of nsMathMLElement to // our base class NS_FORWARD_NSIDOMNODE_TO_NSINODE NS_FORWARD_NSIDOMELEMENT_TO_GENERIC @@ -99,13 +101,18 @@ public: nsIAtom* aPrefix, const nsAString& aValue, bool aNotify); virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute, bool aNotify); virtual nsXPCClassInfo* GetClassInfo(); virtual nsIDOMNode* AsDOMNode() { return this; } + +protected: + virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope, + bool *aTriedToWrap) MOZ_OVERRIDE; + private: bool mIncrementScriptLevel; }; #endif // nsMathMLElement_h