Skip to content

Commit

Permalink
Backed out changeset 0a4ba27058a9 (bug 1775451) for causing mochitest…
Browse files Browse the repository at this point in the history
… failures on test_imestate.html CLOSED TREE
  • Loading branch information
Cristian Tuns committed Jun 27, 2022
1 parent 016a64f commit 6392963
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 52 deletions.
9 changes: 4 additions & 5 deletions dom/base/nsFocusManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2636,16 +2636,15 @@ void nsFocusManager::Focus(

aWindow->SetFocusedElement(aElement, focusMethod, false);

// if the focused element changed, scroll it into view
if (aElement && aFocusChanged) {
ScrollIntoView(presShell, aElement, aFlags);
}
const RefPtr<nsPresContext> presContext = presShell->GetPresContext();
if (sendFocusEvent) {
NotifyFocusStateChange(aElement, nullptr, aFlags,
/* aGettingFocus = */ true, shouldShowFocusRing);

// If the focused element changed, scroll it into view
if (aFocusChanged) {
ScrollIntoView(presShell, aElement, aFlags);
}

// If this is a remote browser, focus its widget and activate remote
// content. Note that we might no longer be in the same document,
// due to the events we fired above when aIsNewDocument.
Expand Down
47 changes: 0 additions & 47 deletions testing/web-platform/tests/focus/scroll-matches-focus.html

This file was deleted.

0 comments on commit 6392963

Please sign in to comment.