Bug 1687805 - Part 3: Support submitting form data with noopener enabled, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D103361
This commit is contained in:
@@ -8575,7 +8575,8 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
|
||||
INTERNAL_LOAD_FLAGS_DONT_SEND_REFERRER)),
|
||||
"Only INTERNAL_LOAD_FLAGS_NO_OPENER and "
|
||||
"INTERNAL_LOAD_FLAGS_DONT_SEND_REFERRER can be set");
|
||||
MOZ_ASSERT(!aLoadState->PostDataStream());
|
||||
MOZ_ASSERT_IF(aLoadState->PostDataStream(),
|
||||
aLoadState->IsFormSubmission());
|
||||
MOZ_ASSERT(!aLoadState->HeadersStream());
|
||||
// If OnLinkClickSync was invoked inside the onload handler, the load
|
||||
// type would be set to LOAD_NORMAL_REPLACE; otherwise it should be
|
||||
@@ -8617,6 +8618,10 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
|
||||
loadState->SetHasValidUserGestureActivation(
|
||||
aLoadState->HasValidUserGestureActivation());
|
||||
|
||||
// Propagate POST data to the new load.
|
||||
loadState->SetPostDataStream(aLoadState->PostDataStream());
|
||||
loadState->SetIsFormSubmission(aLoadState->IsFormSubmission());
|
||||
|
||||
rv = win->Open(NS_ConvertUTF8toUTF16(spec),
|
||||
aLoadState->Target(), // window name
|
||||
u""_ns, // Features
|
||||
|
||||
Reference in New Issue
Block a user