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

This commit is contained in:
Andrea Marchesini
2015-03-03 11:08:59 +00:00
parent 6b10d5e43e
commit fda421fd8c
16 changed files with 129 additions and 136 deletions

View File

@@ -929,7 +929,7 @@ HTMLTableAccessible::IsProbablyLayoutTable()
RETURN_LAYOUT_ANSWER(false, "Has role attribute, weak role, and role is table");
}
if (mContent->Tag() != nsGkAtoms::table)
if (!mContent->IsHTMLElement(nsGkAtoms::table))
RETURN_LAYOUT_ANSWER(true, "table built by CSS display:table style");
// Check if datatable attribute has "0" value.
@@ -954,18 +954,18 @@ HTMLTableAccessible::IsProbablyLayoutTable()
if (!childElm->IsHTMLElement())
continue;
if (childElm->Tag() == nsGkAtoms::col ||
childElm->Tag() == nsGkAtoms::colgroup ||
childElm->Tag() == nsGkAtoms::tfoot ||
childElm->Tag() == nsGkAtoms::thead) {
if (childElm->IsAnyOfHTMLElements(nsGkAtoms::col,
nsGkAtoms::colgroup,
nsGkAtoms::tfoot,
nsGkAtoms::thead)) {
RETURN_LAYOUT_ANSWER(false,
"Has col, colgroup, tfoot or thead -- legitimate table structures");
}
if (childElm->Tag() == nsGkAtoms::tbody) {
if (childElm->IsHTMLElement(nsGkAtoms::tbody)) {
for (nsIContent* rowElm = childElm->GetFirstChild(); rowElm;
rowElm = rowElm->GetNextSibling()) {
if (rowElm->IsHTMLElement() && rowElm->Tag() == nsGkAtoms::tr) {
if (rowElm->IsHTMLElement(nsGkAtoms::tr)) {
for (nsIContent* cellElm = rowElm->GetFirstChild(); cellElm;
cellElm = cellElm->GetNextSibling()) {
if (cellElm->IsHTMLElement()) {