Bug 1141978 - Support rowgroup and colgroup HTML scope, r=marcoz

This commit is contained in:
Alexander Surkov
2015-03-23 11:51:33 -04:00
parent deb5c74e37
commit fd82130528
2 changed files with 228 additions and 2 deletions

View File

@@ -299,15 +299,18 @@ HTMLTableHeaderCellAccessible::NativeRole()
{
// Check value of @scope attribute.
static nsIContent::AttrValuesArray scopeValues[] =
{&nsGkAtoms::col, &nsGkAtoms::row, nullptr};
{ &nsGkAtoms::col, &nsGkAtoms::colgroup,
&nsGkAtoms::row, &nsGkAtoms::rowgroup, nullptr };
int32_t valueIdx =
mContent->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::scope,
scopeValues, eCaseMatters);
switch (valueIdx) {
case 0:
return roles::COLUMNHEADER;
case 1:
return roles::COLUMNHEADER;
case 2:
case 3:
return roles::ROWHEADER;
}