tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 4d5c12d5fb2e029a888eac10ff3c84acbb5c3a0b
parent b11335d4e2546ebe77787965bdf16af3b81a0b8e
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Wed, 26 Nov 2025 08:25:35 +0000

Bug 2002024 - Remove hack that shouldn't be needed now that we have sync about:blank. r=hsivonen

Differential Revision: https://phabricator.services.mozilla.com/D273858

Diffstat:
Mdom/base/nsFocusManager.cpp | 26--------------------------
1 file changed, 0 insertions(+), 26 deletions(-)

diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp @@ -2301,32 +2301,6 @@ Element* nsFocusManager::FlushAndCheckIfFocusable(Element* aElement, mEventHandlingNeedsFlush = false; doc->FlushPendingNotifications(FlushType::EnsurePresShellInitAndFrames); - PresShell* presShell = doc->GetPresShell(); - if (!presShell) { - return nullptr; - } - - // If this is an iframe that doesn't have an in-process subdocument, it is - // either an OOP iframe or an in-process iframe without lazy about:blank - // creation having taken place. In the OOP case, iframe is always focusable. - // In the in-process case, create the initial about:blank for in-process - // BrowsingContexts in order to have the `GetSubDocumentFor` call after this - // block return something. - // - // TODO(emilio): This block can probably go after bug 543435 lands. - if (RefPtr<nsFrameLoaderOwner> flo = do_QueryObject(aElement)) { - if (!aElement->IsXULElement()) { - // Only look at pre-existing browsing contexts. If this function is - // called during reflow, calling GetBrowsingContext() could cause frame - // loader initialization at a time when it isn't safe. - if (BrowsingContext* bc = flo->GetExtantBrowsingContext()) { - // This call may create a documentViewer-created about:blank. - // That's intentional, so we can move focus there. - (void)bc->GetDocument(); - } - } - } - return GetTheFocusableArea(aElement, aFlags); }