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
Родитель 86b39bc31d
Коммит 4f12437323
2 изменённых файлов: 4 добавлений и 11 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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);