Bug 1263330, only initialize focus ring state for non-top-level windows, r=smaug

This commit is contained in:
Neil Deakin 2016-05-04 10:07:37 -04:00
Родитель 10d25a9f48
Коммит fd43d35e0e
1 изменённых файлов: 6 добавлений и 1 удалений

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

@ -10028,8 +10028,13 @@ nsGlobalWindow::GetFocusMethod()
void void
nsGlobalWindow::InitializeShowFocusRings() nsGlobalWindow::InitializeShowFocusRings()
{ {
MOZ_ASSERT(IsInnerWindow());
// Initialize the focus ring state from the parent window. For root windows,
// there is no need to do this as SetKeyboardIndicators will propogate any
// non-default value to child windows.
nsPIDOMWindowOuter* root = GetPrivateRoot(); nsPIDOMWindowOuter* root = GetPrivateRoot();
if (root) { if (root && GetOuterWindow() != root) {
bool showAccelerators = false, showFocusRings = false; bool showAccelerators = false, showFocusRings = false;
root->GetKeyboardIndicators(&showAccelerators, &showFocusRings); root->GetKeyboardIndicators(&showAccelerators, &showFocusRings);
mShowFocusRings = showFocusRings; mShowFocusRings = showFocusRings;