Bug 1402292 - Ignore form submission attempt to navigate from already navigated document. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D163723
This commit is contained in:
Adam Vandolder 2022-12-12 16:15:25 +00:00
Родитель 354351ea87
Коммит 78234d7b22
2 изменённых файлов: 1 добавлений и 5 удалений

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

@ -13080,8 +13080,7 @@ nsresult nsDocShell::OnLinkClickSync(nsIContent* aContent,
// window for mScriptGlobal. If it's not, then we don't want to
// follow this link.
nsPIDOMWindowInner* referrerInner = referrerDoc->GetInnerWindow();
NS_ENSURE_TRUE(referrerInner, NS_ERROR_UNEXPECTED);
if (!mScriptGlobal ||
if (!mScriptGlobal || !referrerInner ||
mScriptGlobal->GetCurrentInnerWindow() != referrerInner) {
// We're no longer the current inner window
return NS_OK;

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

@ -1,6 +1,3 @@
[submission-checks.window.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
max-asserts: 3
[<form> in a navigated document cannot navigate]
expected: FAIL