зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1832647 - Remove cache enabled check in Android. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D177807
This commit is contained in:
Родитель
1bdfc3e820
Коммит
e6869d9efd
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
#include "mozilla/a11y/PDocAccessibleChild.h"
|
#include "mozilla/a11y/PDocAccessibleChild.h"
|
||||||
#include "mozilla/jni/GeckoBundleUtils.h"
|
#include "mozilla/jni/GeckoBundleUtils.h"
|
||||||
#include "mozilla/StaticPrefs_accessibility.h"
|
|
||||||
#include "mozilla/a11y/DocAccessibleParent.h"
|
#include "mozilla/a11y/DocAccessibleParent.h"
|
||||||
|
|
||||||
// icu TRUE conflicting with java::sdk::Boolean::TRUE()
|
// icu TRUE conflicting with java::sdk::Boolean::TRUE()
|
||||||
|
@ -201,9 +200,7 @@ nsresult AccessibleWrap::HandleAccEvent(AccEvent* aEvent) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case nsIAccessibleEvent::EVENT_REORDER: {
|
case nsIAccessibleEvent::EVENT_REORDER: {
|
||||||
if (StaticPrefs::accessibility_cache_enabled_AtStartup()) {
|
sessionAcc->SendWindowContentChangedEvent();
|
||||||
sessionAcc->SendWindowContentChangedEvent();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
#include "TraversalRule.h"
|
#include "TraversalRule.h"
|
||||||
#include "mozilla/PresShell.h"
|
#include "mozilla/PresShell.h"
|
||||||
#include "mozilla/a11y/DocAccessiblePlatformExtChild.h"
|
#include "mozilla/a11y/DocAccessiblePlatformExtChild.h"
|
||||||
#include "mozilla/StaticPrefs_accessibility.h"
|
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::a11y;
|
using namespace mozilla::a11y;
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include "SessionAccessibility.h"
|
#include "SessionAccessibility.h"
|
||||||
#include "mozilla/a11y/RemoteAccessible.h"
|
#include "mozilla/a11y/RemoteAccessible.h"
|
||||||
#include "mozilla/Components.h"
|
#include "mozilla/Components.h"
|
||||||
#include "mozilla/StaticPrefs_accessibility.h"
|
|
||||||
#include "nsIAccessibleEvent.h"
|
#include "nsIAccessibleEvent.h"
|
||||||
#include "nsIAccessiblePivot.h"
|
#include "nsIAccessiblePivot.h"
|
||||||
#include "nsIStringBundle.h"
|
#include "nsIStringBundle.h"
|
||||||
|
@ -97,9 +96,7 @@ void a11y::ProxyEvent(RemoteAccessible* aTarget, uint32_t aEventType) {
|
||||||
sessionAcc->SendFocusEvent(aTarget);
|
sessionAcc->SendFocusEvent(aTarget);
|
||||||
break;
|
break;
|
||||||
case nsIAccessibleEvent::EVENT_REORDER:
|
case nsIAccessibleEvent::EVENT_REORDER:
|
||||||
if (StaticPrefs::accessibility_cache_enabled_AtStartup()) {
|
sessionAcc->SendWindowContentChangedEvent();
|
||||||
sessionAcc->SendWindowContentChangedEvent();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -127,7 +127,7 @@ void SessionAccessibility::GetNodeInfo(int32_t aID,
|
||||||
java::GeckoBundle::GlobalRef ret = nullptr;
|
java::GeckoBundle::GlobalRef ret = nullptr;
|
||||||
RefPtr<SessionAccessibility> self(this);
|
RefPtr<SessionAccessibility> self(this);
|
||||||
if (Accessible* acc = GetAccessibleByID(aID)) {
|
if (Accessible* acc = GetAccessibleByID(aID)) {
|
||||||
if (acc->IsLocal() || !IsCacheEnabled()) {
|
if (acc->IsLocal()) {
|
||||||
mal.Unlock();
|
mal.Unlock();
|
||||||
nsAppShell::SyncRunEvent(
|
nsAppShell::SyncRunEvent(
|
||||||
[this, self, aID, aNodeInfo = jni::Object::GlobalRef(aNodeInfo)] {
|
[this, self, aID, aNodeInfo = jni::Object::GlobalRef(aNodeInfo)] {
|
||||||
|
@ -409,9 +409,7 @@ void SessionAccessibility::SendWindowStateChangedEvent(
|
||||||
AccessibleWrap::GetVirtualViewID(aAccessible),
|
AccessibleWrap::GetVirtualViewID(aAccessible),
|
||||||
AccessibleWrap::AndroidClass(aAccessible), nullptr);
|
AccessibleWrap::AndroidClass(aAccessible), nullptr);
|
||||||
|
|
||||||
if (IsCacheEnabled()) {
|
SendWindowContentChangedEvent();
|
||||||
SendWindowContentChangedEvent();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SessionAccessibility::SendTextSelectionChangedEvent(
|
void SessionAccessibility::SendTextSelectionChangedEvent(
|
||||||
|
@ -420,15 +418,8 @@ void SessionAccessibility::SendTextSelectionChangedEvent(
|
||||||
int32_t fromIndex = aCaretOffset;
|
int32_t fromIndex = aCaretOffset;
|
||||||
int32_t startSel = -1;
|
int32_t startSel = -1;
|
||||||
int32_t endSel = -1;
|
int32_t endSel = -1;
|
||||||
bool hasSelection = false;
|
bool hasSelection =
|
||||||
if (aAccessible->IsRemote() && !IsCacheEnabled()) {
|
aAccessible->AsHyperTextBase()->SelectionBoundsAt(0, &startSel, &endSel);
|
||||||
nsAutoString unused;
|
|
||||||
hasSelection = aAccessible->AsRemote()->SelectionBoundsAt(
|
|
||||||
0, unused, &startSel, &endSel);
|
|
||||||
} else {
|
|
||||||
hasSelection = aAccessible->AsHyperTextBase()->SelectionBoundsAt(
|
|
||||||
0, &startSel, &endSel);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hasSelection) {
|
if (hasSelection) {
|
||||||
fromIndex = startSel == aCaretOffset ? endSel : startSel;
|
fromIndex = startSel == aCaretOffset ? endSel : startSel;
|
||||||
|
@ -462,13 +453,7 @@ void SessionAccessibility::SendTextChangedEvent(Accessible* aAccessible,
|
||||||
if (aAccessible->IsHyperText()) {
|
if (aAccessible->IsHyperText()) {
|
||||||
aAccessible->AsHyperTextBase()->TextSubstring(0, -1, text);
|
aAccessible->AsHyperTextBase()->TextSubstring(0, -1, text);
|
||||||
} else if (aAccessible->IsText()) {
|
} else if (aAccessible->IsText()) {
|
||||||
if (aAccessible->IsRemote() && !IsCacheEnabled()) {
|
aAccessible->AppendTextTo(text, 0, -1);
|
||||||
// XXX: AppendTextTo is not implemented in the IPDL and only
|
|
||||||
// works when cache is enabled.
|
|
||||||
aAccessible->Name(text);
|
|
||||||
} else {
|
|
||||||
aAccessible->AppendTextTo(text, 0, -1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
nsAutoString beforeText(text);
|
nsAutoString beforeText(text);
|
||||||
if (aIsInsert) {
|
if (aIsInsert) {
|
||||||
|
@ -500,13 +485,7 @@ void SessionAccessibility::SendTextTraversedEvent(Accessible* aAccessible,
|
||||||
if (aAccessible->IsHyperText()) {
|
if (aAccessible->IsHyperText()) {
|
||||||
aAccessible->AsHyperTextBase()->TextSubstring(0, -1, text);
|
aAccessible->AsHyperTextBase()->TextSubstring(0, -1, text);
|
||||||
} else if (aAccessible->IsText()) {
|
} else if (aAccessible->IsText()) {
|
||||||
if (aAccessible->IsRemote() && !IsCacheEnabled()) {
|
aAccessible->AppendTextTo(text, 0, -1);
|
||||||
// XXX: AppendTextTo is not implemented in the IPDL and only
|
|
||||||
// works when cache is enabled.
|
|
||||||
aAccessible->Name(text);
|
|
||||||
} else {
|
|
||||||
aAccessible->AppendTextTo(text, 0, -1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GECKOBUNDLE_START(eventInfo);
|
GECKOBUNDLE_START(eventInfo);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче