Bug 1825745 - Make form submits do a replace load if they happen before document load has ended. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D174224
This commit is contained in:
Peter Van der Beken
2023-06-22 08:07:06 +00:00
parent e05d5799fa
commit 9414df2959
6 changed files with 71 additions and 17 deletions

View File

@@ -710,6 +710,13 @@ class nsDocShell final : public nsDocLoader,
nsresult ScrollToAnchor(bool aCurHasRef, bool aNewHasRef,
nsACString& aNewHash, uint32_t aLoadType);
// This returns the load type for a form submission (see
// https://html.spec.whatwg.org/#form-submission-algorithm). The load type
// should be set as soon as the target BC has been determined.
uint32_t GetLoadTypeForFormSubmission(
mozilla::dom::BrowsingContext* aTargetBC,
nsDocShellLoadState* aLoadState);
private:
// Returns true if would have called FireOnLocationChange,
// but did not because aFireOnLocationChange was false on entry.