Renamed nsIURL to nsIURI in preperation for necko. More NECKO ifdefs too.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
#include "nsString.h"
|
||||
#include "nsIURL.h"
|
||||
#ifdef NECKO
|
||||
#include "nsIURI.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIIOService.h"
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
@@ -85,14 +85,14 @@ public:
|
||||
NS_IMETHOD EndContext(PRInt32 aPosition){ return NS_OK; }
|
||||
|
||||
// nsIRobotSink
|
||||
NS_IMETHOD Init(nsIURL* aDocumentURL);
|
||||
NS_IMETHOD Init(nsIURI* aDocumentURL);
|
||||
NS_IMETHOD AddObserver(nsIRobotSinkObserver* aObserver);
|
||||
NS_IMETHOD RemoveObserver(nsIRobotSinkObserver* aObserver);
|
||||
|
||||
void ProcessLink(const nsString& aLink);
|
||||
|
||||
protected:
|
||||
nsIURL* mDocumentURL;
|
||||
nsIURI* mDocumentURL;
|
||||
nsVoidArray mObservers;
|
||||
};
|
||||
|
||||
@@ -286,7 +286,7 @@ NS_IMETHODIMP RobotSink::AddProcessingInstruction(const nsIParserNode& aNode) {
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP RobotSink::Init(nsIURL* aDocumentURL)
|
||||
NS_IMETHODIMP RobotSink::Init(nsIURI* aDocumentURL)
|
||||
{
|
||||
NS_IF_RELEASE(mDocumentURL);
|
||||
mDocumentURL = aDocumentURL;
|
||||
@@ -319,9 +319,9 @@ void RobotSink::ProcessLink(const nsString& aLink)
|
||||
|
||||
// Make link absolute
|
||||
// XXX base tag handling
|
||||
nsIURL* docURL = mDocumentURL;
|
||||
nsIURI* docURL = mDocumentURL;
|
||||
if (nsnull != docURL) {
|
||||
nsIURL* absurl;
|
||||
nsIURI* absurl;
|
||||
nsresult rv;
|
||||
#ifndef NECKO
|
||||
rv = NS_NewURL(&absurl, aLink, docURL);
|
||||
@@ -339,17 +339,24 @@ void RobotSink::ProcessLink(const nsString& aLink)
|
||||
NS_RELEASE(baseUri);
|
||||
if (NS_FAILED(rv)) return;
|
||||
|
||||
rv = uri->QueryInterface(nsIURL::GetIID(), (void**)&absurl);
|
||||
rv = uri->QueryInterface(nsIURI::GetIID(), (void**)&absurl);
|
||||
NS_RELEASE(uri);
|
||||
#endif // NECKO
|
||||
|
||||
if (NS_OK == rv) {
|
||||
absURLSpec.Truncate();
|
||||
#ifdef NECKO
|
||||
char* str;
|
||||
absurl->GetSpec(&str);
|
||||
absURLSpec = str;
|
||||
nsCRT::free(str);
|
||||
#else
|
||||
PRUnichar* str;
|
||||
absurl->ToString(&str);
|
||||
absURLSpec = str;
|
||||
NS_RELEASE(absurl);
|
||||
delete str;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user