Bug 478810 - document role='textbox' fails assertion, r=surkov, r=MarcoZ

This commit is contained in:
David Bolter 2009-02-26 09:17:43 +01:00
parent 8cf9612577
commit 5b17a61d1e
2 changed files with 4 additions and 11 deletions

View File

@ -1991,7 +1991,7 @@ nsAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
if (role == nsIAccessibleRole::ROLE_ENTRY ||
role == nsIAccessibleRole::ROLE_COMBOBOX) {
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsCOMPtr<nsIContent> content = nsCoreUtils::GetRoleContent(mDOMNode);
NS_ENSURE_STATE(content);
nsAutoString autocomplete;

View File

@ -27,20 +27,13 @@
testStates(frameDoc, STATE_READONLY);
testStates(frameDocArticle, STATE_READONLY);
testStates(frameDocCheckbox, 0, 0, STATE_READONLY);
var works = true;
try {
testStates(frameDocTextbox, 0, 0, STATE_READONLY);
}
catch (e) {
works = false;
}
todo(works, "Checking states of a textbox frame doc should not throw (Bug 478810)");
testStates(frameDocTextbox, 0, EXT_STATE_EDITABLE);
frameDoc.designMode = "on";
testStates(frameDoc, 0, EXT_STATE_EDITABLE);
testStates(frameDocArticle, STATE_READONLY);
testStates(frameDocCheckbox, 0, 0, STATE_READONLY);
testStates(frameDocTextbox, 0, EXT_STATE_EDITABLE);
frameDocArticle.designMode = "on";
testStates(frameDocArticle, 0, EXT_STATE_EDITABLE);