Bug 1134280 - Get rid of Tag() - patch 2.4 - layout/mathml - Fix all the occurrences, m=smaug, r=surkov

This commit is contained in:
Andrea Marchesini
2015-03-03 11:09:00 +00:00
parent ae571f51bb
commit 7a0dde83e6
10 changed files with 64 additions and 68 deletions

View File

@@ -42,9 +42,8 @@ nsMathMLsemanticsFrame::GetSelectedFrame()
// However some people use this syntax so we take care of this case too.
bool firstChildIsAnnotation = false;
nsIContent* childContent = childFrame->GetContent();
if (childContent->GetNameSpaceID() == kNameSpaceID_MathML &&
(childContent->Tag() == nsGkAtoms::annotation_ ||
childContent->Tag() == nsGkAtoms::annotation_xml_)) {
if (childContent->IsAnyOfMathMLElements(nsGkAtoms::annotation_,
nsGkAtoms::annotation_xml_)) {
firstChildIsAnnotation = true;
}
@@ -67,9 +66,7 @@ nsMathMLsemanticsFrame::GetSelectedFrame()
for ( ; childFrame; childFrame = childFrame->GetNextSibling()) {
nsIContent* childContent = childFrame->GetContent();
if (childContent->GetNameSpaceID() != kNameSpaceID_MathML) continue;
if (childContent->Tag() == nsGkAtoms::annotation_) {
if (childContent->IsMathMLElement(nsGkAtoms::annotation_)) {
// If the <annotation> element has an src attribute we ignore it.
// XXXfredw Should annotation images be supported? See the related
@@ -82,7 +79,7 @@ nsMathMLsemanticsFrame::GetSelectedFrame()
break;
}
if (childContent->Tag() == nsGkAtoms::annotation_xml_) {
if (childContent->IsMathMLElement(nsGkAtoms::annotation_xml_)) {
// If the <annotation-xml> element has an src attribute we ignore it.
if (childContent->HasAttr(kNameSpaceID_None, nsGkAtoms::src)) continue;