Nika Layzell 6cef75877a Bug 1810619 - Part 2: Get the content window from client.openWindow on geckoview, r=geckoview-reviewers,m_kato
While writing part 1 of this patch, I noticed that the geckoview code
for client.openWindow was returning the outer chrome window's
BrowsingContext rather than the BrowsingContext of the primary content
frame when opening a pop-up window. This meant that the native code
would fail to start navigating the pop-up window (as it would try to
navigate the chrome window which is not allowed).

It turns out the tests were still passing because the geckoview code was
actually starting the load itself, though with the wrong options and
properties. In this patch I remove that call to load a URI from the Java
code, and fix the code in ClientOpenWindowUtils to return the content
BrowsingContext instead of the chrome one.

Depends on D171755

Differential Revision: https://phabricator.services.mozilla.com/D171756
2023-03-08 21:09:21 +00:00
..