forked from mirrors/gecko-dev
Bug 1868092 - Don't call DoPivot on a null leaf in caret move. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D195599
This commit is contained in:
parent
81c838d4b5
commit
45e41353ee
1 changed files with 6 additions and 4 deletions
|
|
@ -163,10 +163,12 @@ void a11y::PlatformCaretMoveEvent(Accessible* aTarget, int32_t aOffset,
|
||||||
// This is used mostly for find in page.
|
// This is used mostly for find in page.
|
||||||
Accessible* leaf = TextLeafPoint::GetCaret(aTarget).ActualizeCaret().mAcc;
|
Accessible* leaf = TextLeafPoint::GetCaret(aTarget).ActualizeCaret().mAcc;
|
||||||
MOZ_ASSERT(leaf);
|
MOZ_ASSERT(leaf);
|
||||||
if (Accessible* result = AccessibleWrap::DoPivot(
|
if (leaf) {
|
||||||
leaf, java::SessionAccessibility::HTML_GRANULARITY_DEFAULT, true,
|
if (Accessible* result = AccessibleWrap::DoPivot(
|
||||||
true)) {
|
leaf, java::SessionAccessibility::HTML_GRANULARITY_DEFAULT, true,
|
||||||
sessionAcc->SendAccessibilityFocusedEvent(result);
|
true)) {
|
||||||
|
sessionAcc->SendAccessibilityFocusedEvent(result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue