Bug 1453555: Fix accessibility group info for <select size="1"> options. r=surkov

In the e10s implementation, Accessible::NativeState for the options doesn't include the invisible state. (It does with e10s disabled.)
In HTMLSelectOptionAccessible::NativeState, rather than just flipping (xor) the invisible state, absolutely ensure it gets removed. We don't want to *add* the invisible state if it isn't there.
This allows group position info to be calculated correctly.

MozReview-Commit-ID: LPEVhOOm2NT

--HG--
extra : rebase_source : 3091ca1826b216bb7c91eb62aafc16f79b786272
This commit is contained in:
James Teh 2018-04-12 16:32:19 +10:00
Родитель f3fde21a8b
Коммит 7d61c9f99e
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -198,7 +198,10 @@ HTMLSelectOptionAccessible::NativeState()
// visible option
if (!selected) {
state |= states::OFFSCREEN;
state ^= states::INVISIBLE;
// Ensure the invisible state is removed. Otherwise, group info will skip
// this option. Furthermore, this gets cached and this doesn't get
// invalidated even once the select is expanded.
state &= ~states::INVISIBLE;
} else {
// Clear offscreen and invisible for currently showing option
state &= ~(states::OFFSCREEN | states::INVISIBLE);