2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04: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/. */
|
2008-01-09 01:36:46 +03:00
|
|
|
|
|
|
|
#include "nsContentCreatorFunctions.h"
|
|
|
|
#include "nsGkAtoms.h"
|
2019-09-13 19:27:54 +03:00
|
|
|
#include "mozilla/dom/MathMLElement.h"
|
2008-01-09 01:36:46 +03:00
|
|
|
|
2013-12-03 18:40:11 +04:00
|
|
|
using namespace mozilla::dom;
|
|
|
|
|
2008-01-09 01:36:46 +03:00
|
|
|
// MathML Element Factory (declared in nsContentCreatorFunctions.h)
|
2014-06-20 06:01:40 +04:00
|
|
|
nsresult NS_NewMathMLElement(
|
|
|
|
Element** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo) {
|
2020-03-17 17:53:25 +03:00
|
|
|
RefPtr<mozilla::dom::NodeInfo> nodeInfo(aNodeInfo);
|
|
|
|
auto* nim = nodeInfo->NodeInfoManager();
|
|
|
|
NS_ADDREF(*aResult = new (nim) MathMLElement(nodeInfo.forget()));
|
2008-01-09 01:36:46 +03:00
|
|
|
return NS_OK;
|
|
|
|
}
|