mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 971432 - parser changes needed after moving baseURI to nsILoadInfo. r=hsivonen
This commit is contained in:
parent
564ada5f05
commit
5614b975f1
@ -29,6 +29,7 @@
|
|||||||
#include "nsIScriptContext.h"
|
#include "nsIScriptContext.h"
|
||||||
#include "mozilla/Preferences.h"
|
#include "mozilla/Preferences.h"
|
||||||
#include "nsIHTMLDocument.h"
|
#include "nsIHTMLDocument.h"
|
||||||
|
#include "nsILoadInfo.h"
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
|
||||||
@ -797,12 +798,15 @@ nsHtml5TreeOpExecutor::GetViewSourceBaseURI()
|
|||||||
// We query the channel for the baseURI because in certain situations it
|
// We query the channel for the baseURI because in certain situations it
|
||||||
// cannot otherwise be determined. If this process fails, fall back to the
|
// cannot otherwise be determined. If this process fails, fall back to the
|
||||||
// standard method.
|
// standard method.
|
||||||
nsCOMPtr<nsIViewSourceChannel> vsc;
|
nsCOMPtr<nsIChannel> channel = mDocument->GetChannel();
|
||||||
vsc = do_QueryInterface(mDocument->GetChannel());
|
if (channel) {
|
||||||
if (vsc) {
|
nsCOMPtr<nsILoadInfo> loadInfo;
|
||||||
nsresult rv = vsc->GetBaseURI(getter_AddRefs(mViewSourceBaseURI));
|
nsresult rv = channel->GetLoadInfo(getter_AddRefs(loadInfo));
|
||||||
if (NS_SUCCEEDED(rv) && mViewSourceBaseURI) {
|
if (NS_SUCCEEDED(rv) && loadInfo) {
|
||||||
return mViewSourceBaseURI;
|
rv = loadInfo->GetBaseURI(getter_AddRefs(mViewSourceBaseURI));
|
||||||
|
if (NS_SUCCEEDED(rv) && mViewSourceBaseURI) {
|
||||||
|
return mViewSourceBaseURI;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user