Necko only changes for the setting relative path.

This commit is contained in:
gagan%netscape.com 1999-07-22 21:17:11 +00:00
Родитель 4a65c95965
Коммит e546a70149
5 изменённых файлов: 15 добавлений и 10 удалений

Просмотреть файл

@ -118,15 +118,17 @@ nsChromeProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
nsIURI* url;
if (aBaseURI) {
rv = aBaseURI->Clone(&url);
if (NS_FAILED(rv)) return rv;
rv = url->SetRelativePath(aSpec);
}
else {
rv = nsComponentManager::CreateInstance(kStandardURLCID, nsnull,
nsCOMTypeInfo<nsIURI>::GetIID(),
(void**)&url);
if (NS_FAILED(rv)) return rv;
rv = url->SetSpec((char*)aSpec);
}
if (NS_FAILED(rv)) return rv;
rv = url->SetSpec((char*)aSpec);
if (NS_FAILED(rv)) {
NS_RELEASE(url);
return rv;

Просмотреть файл

@ -256,7 +256,7 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURL)
#endif
// Construct a chrome URL and use it to look up a resource.
nsAutoString windowType = nsAutoString("chrome://") + hostStr + "/";
nsAutoString windowType = nsAutoString("chrome://") + hostStr ;
// Stash any search part of the URL for later
#ifdef NECKO
@ -293,12 +293,12 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURL)
if (slashIndex == -1)
slashIndex = restOfURL.Length();
restOfURL.Mid(packageType, 1, slashIndex - 1);
restOfURL.Mid(packageType, 0, slashIndex);
if (slashIndex < restOfURL.Length()-1)
{
// There are some extra subdirectories to remember.
restOfURL.Right(path, restOfURL.Length()-slashIndex-1);
restOfURL.Right(path, restOfURL.Length()-slashIndex);
}
}

Просмотреть файл

@ -95,6 +95,7 @@ public:
nsresult Eval() {
nsresult rv;
//TODO Change this to GetSpec and then skip past the javascript:
// Get the expression:
char* jsExpr;
rv = mURI->GetPath(&jsExpr);

Просмотреть файл

@ -118,15 +118,17 @@ nsChromeProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
nsIURI* url;
if (aBaseURI) {
rv = aBaseURI->Clone(&url);
if (NS_FAILED(rv)) return rv;
rv = url->SetRelativePath(aSpec);
}
else {
rv = nsComponentManager::CreateInstance(kStandardURLCID, nsnull,
nsCOMTypeInfo<nsIURI>::GetIID(),
(void**)&url);
if (NS_FAILED(rv)) return rv;
rv = url->SetSpec((char*)aSpec);
}
if (NS_FAILED(rv)) return rv;
rv = url->SetSpec((char*)aSpec);
if (NS_FAILED(rv)) {
NS_RELEASE(url);
return rv;

Просмотреть файл

@ -256,7 +256,7 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURL)
#endif
// Construct a chrome URL and use it to look up a resource.
nsAutoString windowType = nsAutoString("chrome://") + hostStr + "/";
nsAutoString windowType = nsAutoString("chrome://") + hostStr ;
// Stash any search part of the URL for later
#ifdef NECKO
@ -293,12 +293,12 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURL)
if (slashIndex == -1)
slashIndex = restOfURL.Length();
restOfURL.Mid(packageType, 1, slashIndex - 1);
restOfURL.Mid(packageType, 0, slashIndex);
if (slashIndex < restOfURL.Length()-1)
{
// There are some extra subdirectories to remember.
restOfURL.Right(path, restOfURL.Length()-slashIndex-1);
restOfURL.Right(path, restOfURL.Length()-slashIndex);
}
}