Bug 664142 - DEFAULT state exposed incorrectly for HTML, r=tbsaunde

This commit is contained in:
Alexander Surkov
2011-10-03 23:26:18 +09:00
parent 08a4117a13
commit ddc2e1beaa
4 changed files with 85 additions and 4 deletions

View File

@@ -278,8 +278,8 @@ nsHTMLButtonAccessible::NativeState()
{
PRUint64 state = nsHyperTextAccessibleWrap::NativeState();
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::submit, eIgnoreCase))
nsEventStates elmState = mContent->AsElement()->State();
if (elmState.HasState(NS_EVENT_STATE_DEFAULT))
state |= states::DEFAULT;
return state;
@@ -382,8 +382,8 @@ nsHTML4ButtonAccessible::NativeState()
state |= states::FOCUSABLE;
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::submit, eIgnoreCase))
nsEventStates elmState = mContent->AsElement()->State();
if (elmState.HasState(NS_EVENT_STATE_DEFAULT))
state |= states::DEFAULT;
return state;