2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nsXMLElement.h"
|
2012-11-22 03:09:57 -08:00
|
|
|
#include "mozilla/dom/ElementBinding.h"
|
2013-10-02 13:09:18 -07:00
|
|
|
#include "mozilla/dom/ElementInlines.h"
|
2011-08-11 06:29:50 -07:00
|
|
|
#include "nsContentUtils.h" // nsAutoScriptBlocker
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-11-14 14:10:08 -08:00
|
|
|
using namespace mozilla::dom;
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
nsresult
|
2013-12-03 06:40:11 -08:00
|
|
|
NS_NewXMLElement(Element** aInstancePtrResult,
|
2014-06-19 19:01:40 -07:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
2008-02-02 15:41:24 -08:00
|
|
|
nsXMLElement* it = new nsXMLElement(aNodeInfo);
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_ADDREF(*aInstancePtrResult = it);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2014-04-27 00:06:00 -07:00
|
|
|
NS_IMPL_ISUPPORTS_INHERITED(nsXMLElement, Element,
|
|
|
|
nsIDOMNode, nsIDOMElement)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-11-22 03:09:57 -08:00
|
|
|
JSObject*
|
2014-04-08 15:27:17 -07:00
|
|
|
nsXMLElement::WrapNode(JSContext *aCx)
|
2012-11-22 03:09:57 -08:00
|
|
|
{
|
Bug 991742 part 6. Remove the "aScope" argument of binding Wrap() methods. r=bholley
This patch was mostly generated with this command:
find . -name "*.h" -o -name "*.cpp" | xargs sed -e 's/Binding::Wrap(aCx, aScope, this/Binding::Wrap(aCx, this/' -e 's/Binding_workers::Wrap(aCx, aScope, this/Binding_workers::Wrap(aCx, this/' -e 's/Binding::Wrap(cx, scope, this/Binding::Wrap(cx, this/' -i ""
plus a few manual fixes to dom/bindings/Codegen.py, js/xpconnect/src/event_impl_gen.py, and a few C++ files that were not caught in the search-and-replace above.
2014-04-08 15:27:17 -07:00
|
|
|
return ElementBinding::Wrap(aCx, this);
|
2012-11-22 03:09:57 -08:00
|
|
|
}
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_IMPL_ELEMENT_CLONE(nsXMLElement)
|