зеркало из https://github.com/mozilla/gecko-dev.git
Bug 464222 - Add a baseURI attribute to nsIViewSourceChannel. r=bz
This commit is contained in:
Родитель
c4ef6434fc
Коммит
f62a2dcc1e
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "nsIChannel.idl"
|
||||
|
||||
[uuid(023782d2-3ec9-4bbc-8027-ec35e144fc96)]
|
||||
[uuid(0073d67c-a64f-4f45-8f36-02cd0abfeca1)]
|
||||
interface nsIViewSourceChannel : nsIChannel
|
||||
{
|
||||
/**
|
||||
|
@ -26,12 +26,13 @@ interface nsIViewSourceChannel : nsIChannel
|
|||
readonly attribute boolean isSrcdocChannel;
|
||||
|
||||
/**
|
||||
* If this is a srcdoc channel, it returns the base URI provided by the
|
||||
* embedded channel. It is used to provide an indication of the base URI
|
||||
* in circumstances where it isn't otherwise recoverable. Returns a
|
||||
* nullptr when it isn't set or isn't a srcdoc channel.
|
||||
* Set to indicate the base URI. If this channel is a srcdoc channel, it
|
||||
* returns the base URI provided by the embedded channel. It is used to
|
||||
* provide an indication of the base URI in circumstances where it isn't
|
||||
* otherwise recoverable. Returns null when it isn't set and isn't a
|
||||
* srcdoc channel.
|
||||
*/
|
||||
readonly attribute nsIURI baseURI;
|
||||
attribute nsIURI baseURI;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -511,7 +511,15 @@ nsViewSourceChannel::GetBaseURI(nsIURI** aBaseURI)
|
|||
return isc->GetBaseURI(aBaseURI);
|
||||
}
|
||||
}
|
||||
*aBaseURI = nullptr;
|
||||
*aBaseURI = mBaseURI;
|
||||
NS_IF_ADDREF(*aBaseURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsViewSourceChannel::SetBaseURI(nsIURI* aBaseURI)
|
||||
{
|
||||
mBaseURI = aBaseURI;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ protected:
|
|||
nsCOMPtr<nsIUploadChannel> mUploadChannel;
|
||||
nsCOMPtr<nsIStreamListener> mListener;
|
||||
nsCOMPtr<nsIURI> mOriginalURI;
|
||||
nsCOMPtr<nsIURI> mBaseURI;
|
||||
nsCString mContentType;
|
||||
bool mIsDocument; // keeps track of the LOAD_DOCUMENT_URI flag
|
||||
bool mOpened;
|
||||
|
|
Загрузка…
Ссылка в новой задаче