Bug 1579602 - Rename nsMathMLElement to dom::MathMLElement. r=bzbarsky

This commit renames nsMathMLElement/nsMathMLElementFactory classes into
MathMLElement/MathMLElementFactory and moves the former into the mozilla::dom
namespace. This is a preliminary step to introduce MathML DOM (bug 1579602).
Code behavior is not changed.

Differential Revision: https://phabricator.services.mozilla.com/D45128

--HG--
rename : dom/mathml/nsMathMLElement.cpp => dom/mathml/MathMLElement.cpp
rename : dom/mathml/nsMathMLElement.h => dom/mathml/MathMLElement.h
rename : dom/mathml/nsMathMLElementFactory.cpp => dom/mathml/MathMLElementFactory.cpp
extra : moz-landing-system : lando
This commit is contained in:
Frederic Wang 2019-09-13 16:27:54 +00:00
Родитель f14598bb77
Коммит 8957655bf3
13 изменённых файлов: 103 добавлений и 95 удалений

Просмотреть файл

@ -4,7 +4,8 @@
* 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/. */
#include "nsMathMLElement.h"
#include "mozilla/dom/MathMLElement.h"
#include "base/compiler_specific.h"
#include "mozilla/dom/BindContext.h"
#include "mozilla/ArrayUtils.h"
@ -35,7 +36,7 @@ using namespace mozilla::dom;
//----------------------------------------------------------------------
// nsISupports methods:
NS_IMPL_ISUPPORTS_INHERITED(nsMathMLElement, nsMathMLElementBase, Link)
NS_IMPL_ISUPPORTS_INHERITED(MathMLElement, MathMLElementBase, Link)
static nsresult WarnDeprecated(const char16_t* aDeprecatedAttribute,
const char16_t* aFavoredAttribute,
@ -64,22 +65,22 @@ static nsresult ReportParseErrorNoTag(const nsString& aValue, nsAtom* aAtom,
nsContentUtils::eMATHML_PROPERTIES, "AttributeParsingErrorNoTag", argv);
}
nsMathMLElement::nsMathMLElement(
MathMLElement::MathMLElement(
already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
: nsMathMLElementBase(std::move(aNodeInfo)),
: MathMLElementBase(std::move(aNodeInfo)),
ALLOW_THIS_IN_INITIALIZER_LIST(Link(this)),
mIncrementScriptLevel(false) {}
nsMathMLElement::nsMathMLElement(
MathMLElement::MathMLElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: nsMathMLElementBase(std::move(aNodeInfo)),
: MathMLElementBase(std::move(aNodeInfo)),
ALLOW_THIS_IN_INITIALIZER_LIST(Link(this)),
mIncrementScriptLevel(false) {}
nsresult nsMathMLElement::BindToTree(BindContext& aContext, nsINode& aParent) {
nsresult MathMLElement::BindToTree(BindContext& aContext, nsINode& aParent) {
Link::ResetLinkState(false, Link::ElementHasHref());
nsresult rv = nsMathMLElementBase::BindToTree(aContext, aParent);
nsresult rv = MathMLElementBase::BindToTree(aContext, aParent);
NS_ENSURE_SUCCESS(rv, rv);
// FIXME(emilio): Probably should be composed, this uses all the other link
@ -96,18 +97,18 @@ nsresult nsMathMLElement::BindToTree(BindContext& aContext, nsINode& aParent) {
return rv;
}
void nsMathMLElement::UnbindFromTree(bool aNullParent) {
void MathMLElement::UnbindFromTree(bool aNullParent) {
// Without removing the link state we risk a dangling pointer
// in the mStyledLinks hashtable
Link::ResetLinkState(false, Link::ElementHasHref());
nsMathMLElementBase::UnbindFromTree(aNullParent);
MathMLElementBase::UnbindFromTree(aNullParent);
}
bool nsMathMLElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
const nsAString& aValue,
nsIPrincipal* aMaybeScriptedPrincipal,
nsAttrValue& aResult) {
bool MathMLElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
const nsAString& aValue,
nsIPrincipal* aMaybeScriptedPrincipal,
nsAttrValue& aResult) {
MOZ_ASSERT(IsMathMLElement());
if (aNamespaceID == kNameSpaceID_None) {
@ -128,8 +129,8 @@ bool nsMathMLElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
}
}
return nsMathMLElementBase::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
return MathMLElementBase::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
// https://mathml-refresh.github.io/mathml-core/#global-attributes
@ -156,7 +157,7 @@ static Element::MappedAttributeEntry sDeprecatedStyleAttributes[] = {
{nsGkAtoms::fontweight_},
{nullptr}};
bool nsMathMLElement::IsAttributeMapped(const nsAtom* aAttribute) const {
bool MathMLElement::IsAttributeMapped(const nsAtom* aAttribute) const {
MOZ_ASSERT(IsMathMLElement());
static const MappedAttributeEntry* const globalMap[] = {
@ -171,7 +172,7 @@ bool nsMathMLElement::IsAttributeMapped(const nsAtom* aAttribute) const {
aAttribute == nsGkAtoms::width);
}
nsMapRuleToAttributesFunc nsMathMLElement::GetAttributeMappingFunction() const {
nsMapRuleToAttributesFunc MathMLElement::GetAttributeMappingFunction() const {
// It doesn't really matter what our tag is here, because only attributes
// that satisfy IsAttributeMapped will be stored in the mapped attributes
// list and available to the mapping function
@ -179,10 +180,9 @@ nsMapRuleToAttributesFunc nsMathMLElement::GetAttributeMappingFunction() const {
}
/* static */
bool nsMathMLElement::ParseNamedSpaceValue(const nsString& aString,
nsCSSValue& aCSSValue,
uint32_t aFlags,
const Document& aDocument) {
bool MathMLElement::ParseNamedSpaceValue(const nsString& aString,
nsCSSValue& aCSSValue, uint32_t aFlags,
const Document& aDocument) {
if (StaticPrefs::mathml_mathspace_names_disabled()) {
return false;
}
@ -267,9 +267,9 @@ bool nsMathMLElement::ParseNamedSpaceValue(const nsString& aString,
/* static */
// XXXfredw: Deprecate legacy MathML syntax and use the CSS parser instead.
// See https://github.com/mathml-refresh/mathml/issues/63
bool nsMathMLElement::ParseNumericValue(const nsString& aString,
nsCSSValue& aCSSValue, uint32_t aFlags,
Document* aDocument) {
bool MathMLElement::ParseNumericValue(const nsString& aString,
nsCSSValue& aCSSValue, uint32_t aFlags,
Document* aDocument) {
nsAutoString str(aString);
str.CompressWhitespace(); // aString is const in this code...
@ -398,7 +398,7 @@ bool nsMathMLElement::ParseNumericValue(const nsString& aString,
return true;
}
void nsMathMLElement::MapMathMLAttributesInto(
void MathMLElement::MapMathMLAttributesInto(
const nsMappedAttributes* aAttributes, MappedDeclarations& aDecls) {
// scriptsizemultiplier
//
@ -816,28 +816,28 @@ void nsMathMLElement::MapMathMLAttributesInto(
}
}
void nsMathMLElement::GetEventTargetParent(EventChainPreVisitor& aVisitor) {
void MathMLElement::GetEventTargetParent(EventChainPreVisitor& aVisitor) {
Element::GetEventTargetParent(aVisitor);
GetEventTargetParentForLinks(aVisitor);
}
nsresult nsMathMLElement::PostHandleEvent(EventChainPostVisitor& aVisitor) {
nsresult MathMLElement::PostHandleEvent(EventChainPostVisitor& aVisitor) {
return PostHandleEventForLinks(aVisitor);
}
NS_IMPL_ELEMENT_CLONE(nsMathMLElement)
NS_IMPL_ELEMENT_CLONE(MathMLElement)
EventStates nsMathMLElement::IntrinsicState() const {
return Link::LinkState() | nsMathMLElementBase::IntrinsicState() |
EventStates MathMLElement::IntrinsicState() const {
return Link::LinkState() | MathMLElementBase::IntrinsicState() |
(mIncrementScriptLevel ? NS_EVENT_STATE_INCREMENT_SCRIPT_LEVEL
: EventStates());
}
bool nsMathMLElement::IsNodeOfType(uint32_t aFlags) const { return false; }
bool MathMLElement::IsNodeOfType(uint32_t aFlags) const { return false; }
void nsMathMLElement::SetIncrementScriptLevel(bool aIncrementScriptLevel,
bool aNotify) {
void MathMLElement::SetIncrementScriptLevel(bool aIncrementScriptLevel,
bool aNotify) {
if (aIncrementScriptLevel == mIncrementScriptLevel) return;
mIncrementScriptLevel = aIncrementScriptLevel;
@ -846,7 +846,7 @@ void nsMathMLElement::SetIncrementScriptLevel(bool aIncrementScriptLevel,
UpdateState(true);
}
bool nsMathMLElement::IsFocusableInternal(int32_t* aTabIndex, bool aWithMouse) {
bool MathMLElement::IsFocusableInternal(int32_t* aTabIndex, bool aWithMouse) {
nsCOMPtr<nsIURI> uri;
if (IsLink(getter_AddRefs(uri))) {
if (aTabIndex) {
@ -862,7 +862,7 @@ bool nsMathMLElement::IsFocusableInternal(int32_t* aTabIndex, bool aWithMouse) {
return false;
}
bool nsMathMLElement::IsLink(nsIURI** aURI) const {
bool MathMLElement::IsLink(nsIURI** aURI) const {
bool hasHref = false;
const nsAttrValue* href = mAttrs.GetAttr(nsGkAtoms::href, kNameSpaceID_None);
if (href) {
@ -917,7 +917,7 @@ bool nsMathMLElement::IsLink(nsIURI** aURI) const {
return false;
}
void nsMathMLElement::GetLinkTarget(nsAString& aTarget) {
void MathMLElement::GetLinkTarget(nsAString& aTarget) {
const nsAttrValue* target =
mAttrs.GetAttr(nsGkAtoms::target, kNameSpaceID_XLink);
if (target) {
@ -940,16 +940,16 @@ void nsMathMLElement::GetLinkTarget(nsAString& aTarget) {
}
}
already_AddRefed<nsIURI> nsMathMLElement::GetHrefURI() const {
already_AddRefed<nsIURI> MathMLElement::GetHrefURI() const {
nsCOMPtr<nsIURI> hrefURI;
return IsLink(getter_AddRefs(hrefURI)) ? hrefURI.forget() : nullptr;
}
nsresult nsMathMLElement::AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
const nsAttrValue* aValue,
const nsAttrValue* aOldValue,
nsIPrincipal* aSubjectPrincipal,
bool aNotify) {
nsresult MathMLElement::AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
const nsAttrValue* aValue,
const nsAttrValue* aOldValue,
nsIPrincipal* aSubjectPrincipal,
bool aNotify) {
// It is important that this be done after the attribute is set/unset.
// We will need the updated attribute value because notifying the document
// that content states have changed will call IntrinsicState, which will try
@ -964,11 +964,11 @@ nsresult nsMathMLElement::AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
Link::ResetLinkState(aNotify, aValue || Link::ElementHasHref());
}
return nsMathMLElementBase::AfterSetAttr(
aNameSpaceID, aName, aValue, aOldValue, aSubjectPrincipal, aNotify);
return MathMLElementBase::AfterSetAttr(aNameSpaceID, aName, aValue, aOldValue,
aSubjectPrincipal, aNotify);
}
JSObject* nsMathMLElement::WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
JSObject* MathMLElement::WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
return Element_Binding::Wrap(aCx, this, aGivenProto);
}

Просмотреть файл

@ -4,8 +4,8 @@
* 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/. */
#ifndef nsMathMLElement_h
#define nsMathMLElement_h
#ifndef mozilla_dom_MathMLElement_h_
#define mozilla_dom_MathMLElement_h_
#include "mozilla/Attributes.h"
#include "mozilla/dom/Element.h"
@ -15,24 +15,23 @@
class nsCSSValue;
typedef nsMappedAttributeElement nsMathMLElementBase;
namespace mozilla {
class EventChainPostVisitor;
class EventChainPreVisitor;
} // namespace mozilla
namespace dom {
typedef nsMappedAttributeElement MathMLElementBase;
/*
* The base class for MathML elements.
*/
class nsMathMLElement final : public nsMathMLElementBase,
public mozilla::dom::Link {
class MathMLElement final : public MathMLElementBase,
public mozilla::dom::Link {
public:
explicit nsMathMLElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
explicit nsMathMLElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
explicit MathMLElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
explicit MathMLElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
// Implementation of nsISupports is inherited from nsMathMLElementBase
// Implementation of nsISupports is inherited from MathMLElementBase
NS_DECL_ISUPPORTS_INHERITED
nsresult BindToTree(BindContext&, nsINode& aParent) override;
@ -83,11 +82,11 @@ class nsMathMLElement final : public nsMathMLElementBase,
virtual void NodeInfoChanged(Document* aOldDoc) override {
ClearHasPendingLinkUpdate();
nsMathMLElementBase::NodeInfoChanged(aOldDoc);
MathMLElementBase::NodeInfoChanged(aOldDoc);
}
protected:
virtual ~nsMathMLElement() {}
virtual ~MathMLElement() {}
virtual JSObject* WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
@ -102,4 +101,7 @@ class nsMathMLElement final : public nsMathMLElementBase,
bool mIncrementScriptLevel;
};
#endif // nsMathMLElement_h
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_MathMLElement_h_

Просмотреть файл

@ -6,13 +6,13 @@
#include "nsContentCreatorFunctions.h"
#include "nsGkAtoms.h"
#include "nsMathMLElement.h"
#include "mozilla/dom/MathMLElement.h"
using namespace mozilla::dom;
// MathML Element Factory (declared in nsContentCreatorFunctions.h)
nsresult NS_NewMathMLElement(
Element** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo) {
NS_ADDREF(*aResult = new nsMathMLElement(aNodeInfo));
NS_ADDREF(*aResult = new MathMLElement(aNodeInfo));
return NS_OK;
}

Просмотреть файл

@ -7,9 +7,13 @@
with Files("**"):
BUG_COMPONENT = ("Core", "MathML")
EXPORTS.mozilla.dom += [
'MathMLElement.h',
]
UNIFIED_SOURCES += [
'nsMathMLElement.cpp',
'nsMathMLElementFactory.cpp',
'MathMLElement.cpp',
'MathMLElementFactory.cpp',
]
include('/ipc/chromium/chromium-config.mozbuild')

Просмотреть файл

@ -72,7 +72,7 @@ ms[rquote]:after {
/* attributes common to all tags */
/**************************************************************************/
/* These attributes are mapped to style in nsMathMLElement.cpp:
/* These attributes are mapped to style in MathMLElement.cpp:
- background -> background (deprecated)
- color -> color (deprecated)

Просмотреть файл

@ -19,7 +19,7 @@
#include "nsDisplayList.h"
#include "nsIScriptError.h"
#include "nsContentUtils.h"
#include "nsMathMLElement.h"
#include "mozilla/dom/MathMLElement.h"
using namespace mozilla;
using namespace mozilla::gfx;

Просмотреть файл

@ -13,7 +13,7 @@
#include "nsNameSpaceManager.h"
#include "nsMathMLChar.h"
#include "nsCSSPseudoElements.h"
#include "nsMathMLElement.h"
#include "mozilla/dom/MathMLElement.h"
#include "gfxMathTable.h"
#include "nsPresContextInlines.h"
@ -233,8 +233,8 @@ void nsMathMLFrame::ParseNumericValue(const nsString& aString,
float aFontSizeInflation) {
nsCSSValue cssValue;
if (!nsMathMLElement::ParseNumericValue(aString, cssValue, aFlags,
aPresContext->Document())) {
if (!dom::MathMLElement::ParseNumericValue(aString, cssValue, aFlags,
aPresContext->Document())) {
// Invalid attribute value. aLengthValue remains unchanged, so the default
// length value is used.
return;

Просмотреть файл

@ -15,7 +15,7 @@
#include "nsPresContext.h"
#include "nsDisplayList.h"
#include "gfxContext.h"
#include "nsMathMLElement.h"
#include "mozilla/dom/MathMLElement.h"
#include <algorithm>
#include "gfxMathTable.h"
@ -108,7 +108,7 @@ nscoord nsMathMLmfracFrame::CalcLineThickness(nsPresContext* aPresContext,
// length value
lineThickness = defaultThickness;
ParseNumericValue(aThicknessAttribute, &lineThickness,
nsMathMLElement::PARSE_ALLOW_UNITLESS, aPresContext,
dom::MathMLElement::PARSE_ALLOW_UNITLESS, aPresContext,
aComputedStyle, aFontSizeInflation);
} else {
bool isDeprecatedLineThicknessValue = true;
@ -135,8 +135,8 @@ nscoord nsMathMLmfracFrame::CalcLineThickness(nsPresContext* aPresContext,
isDeprecatedLineThicknessValue = false;
lineThickness = defaultThickness;
ParseNumericValue(aThicknessAttribute, &lineThickness,
nsMathMLElement::PARSE_ALLOW_UNITLESS, aPresContext,
aComputedStyle, aFontSizeInflation);
dom::MathMLElement::PARSE_ALLOW_UNITLESS,
aPresContext, aComputedStyle, aFontSizeInflation);
}
if (isDeprecatedLineThicknessValue) {
mContent->OwnerDoc()->WarnOnceAbout(

Просмотреть файл

@ -10,7 +10,7 @@
#include "nsPresContext.h"
#include "nsContentUtils.h"
#include "nsFrameSelection.h"
#include "nsMathMLElement.h"
#include "mozilla/dom/MathMLElement.h"
#include <algorithm>
using namespace mozilla;
@ -373,8 +373,8 @@ void nsMathMLmoFrame::ProcessOperatorData() {
mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::lspace_, value);
if (!value.IsEmpty()) {
nsCSSValue cssValue;
if (nsMathMLElement::ParseNumericValue(value, cssValue, 0,
mContent->OwnerDoc())) {
if (dom::MathMLElement::ParseNumericValue(value, cssValue, 0,
mContent->OwnerDoc())) {
if ((eCSSUnit_Number == cssValue.GetUnit()) && !cssValue.GetFloatValue())
leadingSpace = 0;
else if (cssValue.IsLengthUnit())
@ -400,8 +400,8 @@ void nsMathMLmoFrame::ProcessOperatorData() {
mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::rspace_, value);
if (!value.IsEmpty()) {
nsCSSValue cssValue;
if (nsMathMLElement::ParseNumericValue(value, cssValue, 0,
mContent->OwnerDoc())) {
if (dom::MathMLElement::ParseNumericValue(value, cssValue, 0,
mContent->OwnerDoc())) {
if ((eCSSUnit_Number == cssValue.GetUnit()) && !cssValue.GetFloatValue())
trailingSpace = 0;
else if (cssValue.IsLengthUnit())
@ -484,8 +484,8 @@ void nsMathMLmoFrame::ProcessOperatorData() {
mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::minsize_, value);
if (!value.IsEmpty()) {
nsCSSValue cssValue;
if (nsMathMLElement::ParseNumericValue(
value, cssValue, nsMathMLElement::PARSE_ALLOW_UNITLESS,
if (dom::MathMLElement::ParseNumericValue(
value, cssValue, dom::MathMLElement::PARSE_ALLOW_UNITLESS,
mContent->OwnerDoc())) {
nsCSSUnit unit = cssValue.GetUnit();
if (eCSSUnit_Number == unit)
@ -516,8 +516,8 @@ void nsMathMLmoFrame::ProcessOperatorData() {
mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::maxsize_, value);
if (!value.IsEmpty()) {
nsCSSValue cssValue;
if (nsMathMLElement::ParseNumericValue(
value, cssValue, nsMathMLElement::PARSE_ALLOW_UNITLESS,
if (dom::MathMLElement::ParseNumericValue(
value, cssValue, dom::MathMLElement::PARSE_ALLOW_UNITLESS,
mContent->OwnerDoc())) {
nsCSSUnit unit = cssValue.GetUnit();
if (eCSSUnit_Number == unit)

Просмотреть файл

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsMathMLmpaddedFrame.h"
#include "nsMathMLElement.h"
#include "mozilla/dom/MathMLElement.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/PresShell.h"
#include "mozilla/TextUtils.h"
@ -207,8 +207,8 @@ bool nsMathMLmpaddedFrame::ParseAttribute(nsString& aString, int32_t& aSign,
else if (!gotPercent) { // percentage can only apply to a pseudo-unit
// see if the unit is a named-space
if (nsMathMLElement::ParseNamedSpaceValue(
unit, aCSSValue, nsMathMLElement::PARSE_ALLOW_NEGATIVE,
if (dom::MathMLElement::ParseNamedSpaceValue(
unit, aCSSValue, dom::MathMLElement::PARSE_ALLOW_NEGATIVE,
*mContent->OwnerDoc())) {
// re-scale properly, and we know that the unit of the named-space is 'em'
floatValue *= aCSSValue.GetFloatValue();
@ -221,8 +221,8 @@ bool nsMathMLmpaddedFrame::ParseAttribute(nsString& aString, int32_t& aSign,
// We are not supposed to have a unitless, percent, negative or namedspace
// value here.
number.Append(unit); // leave the sign out if it was there
if (nsMathMLElement::ParseNumericValue(
number, aCSSValue, nsMathMLElement::PARSE_SUPPRESS_WARNINGS,
if (dom::MathMLElement::ParseNumericValue(
number, aCSSValue, dom::MathMLElement::PARSE_SUPPRESS_WARNINGS,
nullptr))
return true;
}

Просмотреть файл

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsMathMLmspaceFrame.h"
#include "nsMathMLElement.h"
#include "mozilla/dom/MathMLElement.h"
#include "mozilla/PresShell.h"
#include "mozilla/gfx/2D.h"
#include <algorithm>
@ -45,7 +45,7 @@ void nsMathMLmspaceFrame::ProcessAttributes(nsPresContext* aPresContext) {
mWidth = 0;
mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::width, value);
if (!value.IsEmpty()) {
ParseNumericValue(value, &mWidth, nsMathMLElement::PARSE_ALLOW_NEGATIVE,
ParseNumericValue(value, &mWidth, dom::MathMLElement::PARSE_ALLOW_NEGATIVE,
aPresContext, mComputedStyle, fontSizeInflation);
}

Просмотреть файл

@ -10,7 +10,7 @@
#include "nsStyleConsts.h"
#include "nsNameSpaceManager.h"
#include "nsCSSRendering.h"
#include "nsMathMLElement.h"
#include "mozilla/dom/MathMLElement.h"
#include "nsTArray.h"
#include "nsTableFrame.h"
@ -454,7 +454,7 @@ static void ExtractSpacingValues(const nsAString& aString, nsAtom* aAttribute,
newValue = aDefaultValue0;
}
nsMathMLFrame::ParseNumericValue(
valueString, &newValue, nsMathMLElement::PARSE_ALLOW_UNITLESS,
valueString, &newValue, dom::MathMLElement::PARSE_ALLOW_UNITLESS,
presContext, computedStyle, aFontSizeInflation);
aSpacingArray.AppendElement(newValue);

Просмотреть файл

@ -7,7 +7,7 @@
#include "nsMathMLmunderoverFrame.h"
#include "nsPresContext.h"
#include "nsMathMLmmultiscriptsFrame.h"
#include "nsMathMLElement.h"
#include "mozilla/dom/MathMLElement.h"
#include <algorithm>
#include "gfxContext.h"
#include "gfxMathTable.h"
@ -107,7 +107,8 @@ void nsMathMLmunderoverFrame::SetIncrementScriptLevel(uint32_t aChildIndex,
return;
}
auto element = static_cast<nsMathMLElement*>(child->GetContent());
// XXXfredw: Use MathMLElement::fromNode.
auto element = static_cast<dom::MathMLElement*>(child->GetContent());
if (element->GetIncrementScriptLevel() == aIncrement) {
return;
}
@ -142,7 +143,8 @@ void nsMathMLmunderoverFrame::SetPendingPostReflowIncrementScriptLevel() {
continue;
}
auto element = static_cast<nsMathMLElement*>(child->GetContent());
// XXXfredw: Use MathMLElement::fromNode.
auto element = static_cast<dom::MathMLElement*>(child->GetContent());
element->SetIncrementScriptLevel(command.mDoIncrement, true);
}
}