Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 51694c1

Browse files
author
Tamas Szentpeteri
committed
Backed out changeset 977bf4319b43 (bug 1891934) for causing wpt failures in nsFocusManager.cpp. CLOSED TREE
1 parent 3b06b21 commit 51694c1

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

dom/base/nsFocusManager.cpp

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4303,9 +4303,7 @@ nsresult nsFocusManager::GetNextTabbableContent(
43034303

43044304
// Stepping out popover scope.
43054305
// For forward, search for the next tabbable content after invoker.
4306-
// For backward, we should get back to the invoker if the invoker is
4307-
// focusable. Otherwise search for the next tabbable content after
4308-
// invoker.
4306+
// For backward, we should get back to the invoker.
43094307
if (oldTopLevelScopeOwner &&
43104308
IsOpenPopoverWithInvoker(oldTopLevelScopeOwner) &&
43114309
currentTopLevelScopeOwner != oldTopLevelScopeOwner) {
@@ -4329,21 +4327,12 @@ nsresult nsFocusManager::GetNextTabbableContent(
43294327
return rv;
43304328
}
43314329
}
4332-
} else if (invokerContent) {
4333-
nsIFrame* frame = invokerContent->GetPrimaryFrame();
4334-
if (frame && frame->IsFocusable()) {
4335-
invokerContent.forget(aResultContent);
4336-
return NS_OK;
4337-
}
4338-
nsIContent* contentToFocus = GetNextTabbableContentInScope(
4339-
currentTopLevelScopeOwner, invokerContent,
4340-
aOriginalStartContent, aForward, 0, aIgnoreTabIndex,
4341-
aForDocumentNavigation, aNavigateByKey, false /* aSkipOwner */,
4342-
aReachedToEndForDocumentNavigation);
4343-
if (contentToFocus) {
4344-
NS_ADDREF(*aResultContent = contentToFocus);
4345-
return NS_OK;
4346-
}
4330+
} else if (invokerContent &&
4331+
invokerContent->IsFocusableWithoutStyle()) {
4332+
// FIXME(emilio): The check above should probably use
4333+
// nsIFrame::IsFocusable, not IsFocusableWithoutStyle.
4334+
invokerContent.forget(aResultContent);
4335+
return NS_OK;
43474336
}
43484337
}
43494338
}

0 commit comments

Comments
 (0)