mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 18:50:08 +00:00
Fixed NewURL for necko.
This commit is contained in:
parent
6217081df1
commit
3e3429dbf5
@ -59,10 +59,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifdef NECKO
|
#ifdef NECKO
|
||||||
#include "nsIIOService.h"
|
#include "nsNeckoUtil.h"
|
||||||
#include "nsIURL.h"
|
|
||||||
#include "nsIServiceManager.h"
|
|
||||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
|
||||||
#else
|
#else
|
||||||
#include "nsIURL.h"
|
#include "nsIURL.h"
|
||||||
#endif // NECKO
|
#endif // NECKO
|
||||||
@ -570,15 +567,7 @@ nsEditor::Init(nsIDOMDocument *aDoc, nsIPresShell* aPresShell)
|
|||||||
#ifndef NECKO
|
#ifndef NECKO
|
||||||
result = NS_NewURL(getter_AddRefs(url), nsString(EDITOR_BUNDLE_URL));
|
result = NS_NewURL(getter_AddRefs(url), nsString(EDITOR_BUNDLE_URL));
|
||||||
#else
|
#else
|
||||||
NS_WITH_SERVICE(nsIIOService, ioService, kIOServiceCID, &result);
|
result = NS_NewURI(getter_AddRefs(url), nsString(EDITOR_BUNDLE_URL));
|
||||||
if (NS_FAILED(result)) return result;
|
|
||||||
|
|
||||||
nsIURI *uri = nsnull;
|
|
||||||
result = ioService->NewURI(EDITOR_BUNDLE_URL, nsnull, &uri);
|
|
||||||
if (NS_FAILED(result)) return result;
|
|
||||||
|
|
||||||
result = uri->QueryInterface(nsIURI::GetIID(), (void**)&url);
|
|
||||||
NS_RELEASE(uri);
|
|
||||||
#endif // NECKO
|
#endif // NECKO
|
||||||
|
|
||||||
if (NS_SUCCEEDED(result) && url)
|
if (NS_SUCCEEDED(result) && url)
|
||||||
@ -1384,15 +1373,7 @@ NS_IMETHODIMP nsEditor::ApplyStyleSheet(const nsString& aURL)
|
|||||||
#ifndef NECKO
|
#ifndef NECKO
|
||||||
rv = NS_NewURL(&uaURL, aURL);
|
rv = NS_NewURL(&uaURL, aURL);
|
||||||
#else
|
#else
|
||||||
NS_WITH_SERVICE(nsIIOService, service, kIOServiceCID, &rv);
|
rv = NS_NewURI(&uaURL, aURL);
|
||||||
if (NS_FAILED(rv)) return rv;
|
|
||||||
|
|
||||||
nsIURI *uri = nsnull;
|
|
||||||
rv = service->NewURI(aURL, nsnull, &uri);
|
|
||||||
if (NS_FAILED(rv)) return rv;
|
|
||||||
|
|
||||||
rv = uri->QueryInterface(nsIURI::GetIID(), (void**)&uaURL);
|
|
||||||
NS_RELEASE(uri);
|
|
||||||
#endif // NECKO
|
#endif // NECKO
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
|
@ -59,10 +59,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifdef NECKO
|
#ifdef NECKO
|
||||||
#include "nsIIOService.h"
|
#include "nsNeckoUtil.h"
|
||||||
#include "nsIURL.h"
|
|
||||||
#include "nsIServiceManager.h"
|
|
||||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
|
||||||
#else
|
#else
|
||||||
#include "nsIURL.h"
|
#include "nsIURL.h"
|
||||||
#endif // NECKO
|
#endif // NECKO
|
||||||
@ -570,15 +567,7 @@ nsEditor::Init(nsIDOMDocument *aDoc, nsIPresShell* aPresShell)
|
|||||||
#ifndef NECKO
|
#ifndef NECKO
|
||||||
result = NS_NewURL(getter_AddRefs(url), nsString(EDITOR_BUNDLE_URL));
|
result = NS_NewURL(getter_AddRefs(url), nsString(EDITOR_BUNDLE_URL));
|
||||||
#else
|
#else
|
||||||
NS_WITH_SERVICE(nsIIOService, ioService, kIOServiceCID, &result);
|
result = NS_NewURI(getter_AddRefs(url), nsString(EDITOR_BUNDLE_URL));
|
||||||
if (NS_FAILED(result)) return result;
|
|
||||||
|
|
||||||
nsIURI *uri = nsnull;
|
|
||||||
result = ioService->NewURI(EDITOR_BUNDLE_URL, nsnull, &uri);
|
|
||||||
if (NS_FAILED(result)) return result;
|
|
||||||
|
|
||||||
result = uri->QueryInterface(nsIURI::GetIID(), (void**)&url);
|
|
||||||
NS_RELEASE(uri);
|
|
||||||
#endif // NECKO
|
#endif // NECKO
|
||||||
|
|
||||||
if (NS_SUCCEEDED(result) && url)
|
if (NS_SUCCEEDED(result) && url)
|
||||||
@ -1384,15 +1373,7 @@ NS_IMETHODIMP nsEditor::ApplyStyleSheet(const nsString& aURL)
|
|||||||
#ifndef NECKO
|
#ifndef NECKO
|
||||||
rv = NS_NewURL(&uaURL, aURL);
|
rv = NS_NewURL(&uaURL, aURL);
|
||||||
#else
|
#else
|
||||||
NS_WITH_SERVICE(nsIIOService, service, kIOServiceCID, &rv);
|
rv = NS_NewURI(&uaURL, aURL);
|
||||||
if (NS_FAILED(rv)) return rv;
|
|
||||||
|
|
||||||
nsIURI *uri = nsnull;
|
|
||||||
rv = service->NewURI(aURL, nsnull, &uri);
|
|
||||||
if (NS_FAILED(rv)) return rv;
|
|
||||||
|
|
||||||
rv = uri->QueryInterface(nsIURI::GetIID(), (void**)&uaURL);
|
|
||||||
NS_RELEASE(uri);
|
|
||||||
#endif // NECKO
|
#endif // NECKO
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user