зеркало из https://github.com/mozilla/pjs.git
Bug 301406. Fix accessibility of XUL multiline textboxes. r+sr=neil, a=mkaply
This commit is contained in:
Родитель
900fbeaa4b
Коммит
134481f85e
|
@ -104,18 +104,16 @@ NS_IMPL_ISUPPORTS_INHERITED2(nsXULTextFieldAccessibleWrap, nsXULTextFieldAccessi
|
|||
|
||||
nsXULTextFieldAccessibleWrap::nsXULTextFieldAccessibleWrap(nsIDOMNode* aNode, nsIWeakReference* aShell):
|
||||
nsXULTextFieldAccessible(aNode, aShell), nsAccessibleEditableText(aNode)
|
||||
{
|
||||
{
|
||||
nsCOMPtr<nsIDOMXULTextBoxElement> textBox(do_QueryInterface(aNode));
|
||||
NS_ASSERTION(textBox, "Not a XUL textbox!");
|
||||
if (!textBox)
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> inputField;
|
||||
textBox->GetInputField(getter_AddRefs(inputField));
|
||||
if (!inputField)
|
||||
textBox->GetInputField(getter_AddRefs(mTextNode));
|
||||
if (!mTextNode)
|
||||
return;
|
||||
|
||||
mTextNode = inputField;
|
||||
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mWeakShell));
|
||||
if (!shell)
|
||||
return;
|
||||
|
@ -133,7 +131,7 @@ nsXULTextFieldAccessible(aNode, aShell), nsAccessibleEditableText(aNode)
|
|||
nsCOMPtr<nsIEditor> editor;
|
||||
textFrame->GetEditor(getter_AddRefs(editor));
|
||||
SetEditor(editor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULTextFieldAccessibleWrap::GetRole(PRUint32 *aRole)
|
||||
|
|
|
@ -651,7 +651,7 @@ NS_IMETHODIMP nsXULTextFieldAccessible::GetState(PRUint32 *aState)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> inputField;
|
||||
nsCOMPtr<nsIDOMMode> inputField;
|
||||
textBox->GetInputField(getter_AddRefs(inputField));
|
||||
if (!inputField) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
|
@ -42,7 +42,9 @@ interface nsIDOMHTMLInputElement;
|
|||
[scriptable, uuid(71135B6C-294E-4634-A8E4-A72398F1E72A)]
|
||||
interface nsIDOMXULTextBoxElement : nsIDOMXULControlElement
|
||||
{
|
||||
readonly attribute nsIDOMHTMLInputElement inputField;
|
||||
// inputField may be any type of editable field, such as an
|
||||
// HTML <input type="text"> or <textarea>
|
||||
readonly attribute nsIDOMNode inputField;
|
||||
|
||||
readonly attribute long textLength;
|
||||
attribute long maxLength;
|
||||
|
|
Загрузка…
Ссылка в новой задаче