mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 886208 - don't force editor creation in HyperTextAccessible::NativeState() r=surkov
This commit is contained in:
parent
d804475b12
commit
f6f24b3ef9
@ -27,6 +27,7 @@
|
||||
#include "nsIPersistentProperties2.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsITextControlElement.h"
|
||||
#include "nsTextFragment.h"
|
||||
#include "mozilla/Selection.h"
|
||||
#include "mozilla/MathAlgorithms.h"
|
||||
@ -102,8 +103,19 @@ HyperTextAccessible::NativeState()
|
||||
{
|
||||
uint64_t states = AccessibleWrap::NativeState();
|
||||
|
||||
nsCOMPtr<nsIEditor> editor = GetEditor();
|
||||
if (editor) {
|
||||
nsCOMPtr<nsITextControlElement> textControl = do_QueryInterface(mContent);
|
||||
bool editable = !!textControl;
|
||||
Accessible* hyperText = this;
|
||||
while (!editable && hyperText) {
|
||||
if (hyperText->IsHyperText())
|
||||
editable = hyperText->GetNode()->IsEditable();
|
||||
if (hyperText->IsDoc())
|
||||
break;
|
||||
|
||||
hyperText = hyperText->Parent();
|
||||
}
|
||||
|
||||
if (editable) {
|
||||
states |= states::EDITABLE;
|
||||
|
||||
} else if (mContent->Tag() == nsGkAtoms::article) {
|
||||
|
@ -733,7 +733,12 @@
|
||||
states: STATE_PROTECTED,
|
||||
extraStates: EXT_STATE_EDITABLE,
|
||||
actions: "activate",
|
||||
children: [ ]
|
||||
children: [
|
||||
{
|
||||
role: ROLE_TEXT_LEAF,
|
||||
name: "●●"
|
||||
}
|
||||
]
|
||||
};
|
||||
testElm("input_password", obj);
|
||||
|
||||
@ -741,7 +746,12 @@
|
||||
role: ROLE_PASSWORD_TEXT,
|
||||
states: STATE_PROTECTED | STATE_READONLY,
|
||||
actions: "activate",
|
||||
children: [ ]
|
||||
children: [
|
||||
{
|
||||
role: ROLE_TEXT_LEAF,
|
||||
name: "●●"
|
||||
}
|
||||
]
|
||||
};
|
||||
testElm("input_password_readonly", obj);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user