mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1170488 - Document URI should be updated before sending out onLocationChange. r=smaug
This commit is contained in:
parent
c60dd2e473
commit
afed83178c
@ -10094,6 +10094,11 @@ nsDocShell::InternalLoad(nsIURI* aURI,
|
||||
*/
|
||||
SetHistoryEntry(&mLSHE, aSHEntry);
|
||||
|
||||
// Set the doc's URI according to the new history entry's URI.
|
||||
nsCOMPtr<nsIDocument> doc = GetDocument();
|
||||
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
|
||||
doc->SetDocumentURI(aURI);
|
||||
|
||||
/* This is a anchor traversal with in the same page.
|
||||
* call OnNewURI() so that, this traversal will be
|
||||
* recorded in session and global history.
|
||||
@ -10184,11 +10189,6 @@ nsDocShell::InternalLoad(nsIURI* aURI,
|
||||
}
|
||||
}
|
||||
|
||||
// Set the doc's URI according to the new history entry's URI.
|
||||
nsCOMPtr<nsIDocument> doc = GetDocument();
|
||||
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
|
||||
doc->SetDocumentURI(aURI);
|
||||
|
||||
SetDocCurrentStateObj(mOSHE);
|
||||
|
||||
// Inform the favicon service that the favicon for oldURI also
|
||||
@ -11716,8 +11716,8 @@ nsDocShell::AddState(JS::Handle<JS::Value> aData, const nsAString& aTitle,
|
||||
// document and it requires LOCATION_CHANGE_SAME_DOCUMENT flag. Otherwise,
|
||||
// FireOnLocationChange(...) breaks security UI.
|
||||
if (!equalURIs) {
|
||||
SetCurrentURI(newURI, nullptr, true, LOCATION_CHANGE_SAME_DOCUMENT);
|
||||
document->SetDocumentURI(newURI);
|
||||
SetCurrentURI(newURI, nullptr, true, LOCATION_CHANGE_SAME_DOCUMENT);
|
||||
|
||||
AddURIVisit(newURI, oldURI, oldURI, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user