Bug 1134280 - Get rid of Tag() - patch 2.3 - dom/base and docshell - Fix all the occurrences, m=smaug, r=surkov

This commit is contained in:
Andrea Marchesini
2015-03-03 11:09:00 +00:00
parent 5ef204a98a
commit ae571f51bb
17 changed files with 120 additions and 142 deletions

View File

@@ -352,11 +352,7 @@ IsElementAnchor(nsIContent* aContent)
{
// Make sure we are dealing with either an <A> or <AREA> element in the HTML
// or XHTML namespace.
if (!aContent->IsHTMLElement()) {
return false;
}
nsIAtom* nameAtom = aContent->Tag();
return nameAtom == nsGkAtoms::a || nameAtom == nsGkAtoms::area;
return aContent->IsAnyOfHTMLElements(nsGkAtoms::a, nsGkAtoms::area);
}
static void
@@ -13396,7 +13392,8 @@ nsDocShell::OnLinkClickSync(nsIContent* aContent,
// XXX When the linking node was HTMLFormElement, it is synchronous event.
// That is, the caller of this method is not |OnLinkClickEvent::Run()|
// but |HTMLFormElement::SubmitSubmission(...)|.
if (nsGkAtoms::form == aContent->Tag() && ShouldBlockLoadingForBackButton()) {
if (aContent->IsHTMLElement(nsGkAtoms::form) &&
ShouldBlockLoadingForBackButton()) {
return NS_OK;
}