зеркало из 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):
|
nsXULTextFieldAccessibleWrap::nsXULTextFieldAccessibleWrap(nsIDOMNode* aNode, nsIWeakReference* aShell):
|
||||||
nsXULTextFieldAccessible(aNode, aShell), nsAccessibleEditableText(aNode)
|
nsXULTextFieldAccessible(aNode, aShell), nsAccessibleEditableText(aNode)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIDOMXULTextBoxElement> textBox(do_QueryInterface(aNode));
|
nsCOMPtr<nsIDOMXULTextBoxElement> textBox(do_QueryInterface(aNode));
|
||||||
NS_ASSERTION(textBox, "Not a XUL textbox!");
|
NS_ASSERTION(textBox, "Not a XUL textbox!");
|
||||||
if (!textBox)
|
if (!textBox)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMHTMLInputElement> inputField;
|
textBox->GetInputField(getter_AddRefs(mTextNode));
|
||||||
textBox->GetInputField(getter_AddRefs(inputField));
|
if (!mTextNode)
|
||||||
if (!inputField)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mTextNode = inputField;
|
|
||||||
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mWeakShell));
|
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mWeakShell));
|
||||||
if (!shell)
|
if (!shell)
|
||||||
return;
|
return;
|
||||||
|
@ -133,7 +131,7 @@ nsXULTextFieldAccessible(aNode, aShell), nsAccessibleEditableText(aNode)
|
||||||
nsCOMPtr<nsIEditor> editor;
|
nsCOMPtr<nsIEditor> editor;
|
||||||
textFrame->GetEditor(getter_AddRefs(editor));
|
textFrame->GetEditor(getter_AddRefs(editor));
|
||||||
SetEditor(editor);
|
SetEditor(editor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsXULTextFieldAccessibleWrap::GetRole(PRUint32 *aRole)
|
NS_IMETHODIMP nsXULTextFieldAccessibleWrap::GetRole(PRUint32 *aRole)
|
||||||
|
|
|
@ -651,7 +651,7 @@ NS_IMETHODIMP nsXULTextFieldAccessible::GetState(PRUint32 *aState)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMHTMLInputElement> inputField;
|
nsCOMPtr<nsIDOMMode> inputField;
|
||||||
textBox->GetInputField(getter_AddRefs(inputField));
|
textBox->GetInputField(getter_AddRefs(inputField));
|
||||||
if (!inputField) {
|
if (!inputField) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
|
@ -42,7 +42,9 @@ interface nsIDOMHTMLInputElement;
|
||||||
[scriptable, uuid(71135B6C-294E-4634-A8E4-A72398F1E72A)]
|
[scriptable, uuid(71135B6C-294E-4634-A8E4-A72398F1E72A)]
|
||||||
interface nsIDOMXULTextBoxElement : nsIDOMXULControlElement
|
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;
|
readonly attribute long textLength;
|
||||||
attribute long maxLength;
|
attribute long maxLength;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче