mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1173215, don't set mChromeXHRDocURI when dealing with non-XHR documents, r=bz
This commit is contained in:
parent
7df644735f
commit
a578f63d48
@ -2277,7 +2277,7 @@ nsDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup)
|
||||
NS_GET_IID(nsIURI), getter_AddRefs(baseURI));
|
||||
if (baseURI) {
|
||||
mDocumentBaseURI = baseURI;
|
||||
mChromeXHRDocBaseURI = baseURI;
|
||||
mChromeXHRDocBaseURI = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2359,7 +2359,7 @@ nsDocument::ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup,
|
||||
mOriginalURI = nullptr;
|
||||
|
||||
SetDocumentURI(aURI);
|
||||
mChromeXHRDocURI = aURI;
|
||||
mChromeXHRDocURI = nullptr;
|
||||
// If mDocumentBaseURI is null, nsIDocument::GetBaseURI() returns
|
||||
// mDocumentURI.
|
||||
mDocumentBaseURI = nullptr;
|
||||
|
@ -486,6 +486,14 @@ function runTest() {
|
||||
xhr.send();
|
||||
yield undefined;
|
||||
|
||||
history.pushState({}, "pushStateTest", window.location.href + "/pushStateTest");
|
||||
ok(document.documentURI.indexOf("pushStateTest") > -1);
|
||||
|
||||
var chromeDoc = SpecialPowers.wrap(document);
|
||||
ok(chromeDoc.documentURI.indexOf("pushStateTest") > -1);
|
||||
|
||||
history.back();
|
||||
|
||||
SimpleTest.finish();
|
||||
SpecialPowers.removePermission("systemXHR", document);
|
||||
yield undefined;
|
||||
|
@ -175,10 +175,9 @@ SetBaseURIUsingFirstBaseWithHref(nsIDocument* aDocument, nsIContent* aMustMatch)
|
||||
|
||||
// Try to set our base URI. If that fails, try to set base URI to null
|
||||
nsresult rv = aDocument->SetBaseURI(newBaseURI);
|
||||
aDocument->SetChromeXHRDocBaseURI(newBaseURI);
|
||||
aDocument->SetChromeXHRDocBaseURI(nullptr);
|
||||
if (NS_FAILED(rv)) {
|
||||
aDocument->SetBaseURI(nullptr);
|
||||
aDocument->SetChromeXHRDocBaseURI(nullptr);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user