From 6a13b3c8486b87a2cd2f2f0ee8e7a5dbca53f0a4 Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Thu, 12 Apr 2001 00:19:52 +0000 Subject: [PATCH] (NOT PART OF THE BUILD) fix some build breakage for moz-icon urls caused by the necko api changes from the other day. --- modules/libpr0n/decoders/icon/nsIconDecoder.cpp | 3 ++- .../libpr0n/decoders/icon/nsIconProtocolHandler.cpp | 1 + modules/libpr0n/decoders/icon/nsIconURI.cpp | 10 +++++++++- modules/libpr0n/decoders/icon/win/nsIconChannel.cpp | 12 +++--------- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/modules/libpr0n/decoders/icon/nsIconDecoder.cpp b/modules/libpr0n/decoders/icon/nsIconDecoder.cpp index 1c75809440c..cfcef93bb9a 100644 --- a/modules/libpr0n/decoders/icon/nsIconDecoder.cpp +++ b/modules/libpr0n/decoders/icon/nsIconDecoder.cpp @@ -56,7 +56,8 @@ NS_IMETHODIMP nsIconDecoder::Init(imgIRequest *aRequest) mObserver = do_QueryInterface(aRequest); // we're holding 2 strong refs to the request. - aRequest->GetImage(getter_AddRefs(mImage)); + mImage = do_CreateInstance("@mozilla.org/image/container;1"); + aRequest->SetImage(mImage); mFrame = do_CreateInstance("@mozilla.org/gfx/image/frame;2"); if (!mFrame) return NS_ERROR_FAILURE; diff --git a/modules/libpr0n/decoders/icon/nsIconProtocolHandler.cpp b/modules/libpr0n/decoders/icon/nsIconProtocolHandler.cpp index 348ac000edb..7fe37c99265 100644 --- a/modules/libpr0n/decoders/icon/nsIconProtocolHandler.cpp +++ b/modules/libpr0n/decoders/icon/nsIconProtocolHandler.cpp @@ -28,6 +28,7 @@ #include "nsCOMPtr.h" #include "nsIComponentManager.h" #include "nsIServiceManager.h" +#include "nsNetCID.h" static NS_DEFINE_CID(kStandardURICID, NS_STANDARDURL_CID); diff --git a/modules/libpr0n/decoders/icon/nsIconURI.cpp b/modules/libpr0n/decoders/icon/nsIconURI.cpp index f469eb2ead1..b907008596c 100644 --- a/modules/libpr0n/decoders/icon/nsIconURI.cpp +++ b/modules/libpr0n/decoders/icon/nsIconURI.cpp @@ -214,7 +214,15 @@ nsMozIconURI::SetPath(const char * aPath) NS_IMETHODIMP nsMozIconURI::Equals(nsIURI *other, PRBool *result) { - *result = PR_FALSE; + nsXPIDLCString spec1; + nsXPIDLCString spec2; + + other->GetSpec(getter_Copies(spec2)); + GetSpec(getter_Copies(spec1)); + if (!nsCRT::strcasecmp(spec1, spec2)) + *result = PR_TRUE; + else + *result = PR_FALSE; return NS_OK; } diff --git a/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp b/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp index 8dfae2ffdff..34aabaf9c67 100644 --- a/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp +++ b/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp @@ -123,12 +123,6 @@ NS_IMETHODIMP nsIconChannel::GetURI(nsIURI* *aURI) return NS_OK; } -NS_IMETHODIMP nsIconChannel::SetURI(nsIURI* aURI) -{ - mUrl = aURI; - return NS_OK; -} - NS_IMETHODIMP nsIconChannel::Open(nsIInputStream **_retval) { @@ -308,7 +302,7 @@ NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports nsCOMPtr inputStr (do_QueryInterface(streamSupports)); aListener->OnDataAvailable(this, ctxt, inputStr, 0, iconBuffer.Length()); - aListener->OnStopRequest(this, ctxt, NS_OK, nsnull); + aListener->OnStopRequest(this, ctxt, NS_OK); } // if we got valid bits for the main bitmap mask @@ -323,13 +317,13 @@ NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports return NS_OK; } -NS_IMETHODIMP nsIconChannel::GetLoadAttributes(PRUint32 *aLoadAttributes) +NS_IMETHODIMP nsIconChannel::GetLoadFlags(PRUint32 *aLoadAttributes) { *aLoadAttributes = mLoadAttributes; return NS_OK; } -NS_IMETHODIMP nsIconChannel::SetLoadAttributes(PRUint32 aLoadAttributes) +NS_IMETHODIMP nsIconChannel::SetLoadFlags(PRUint32 aLoadAttributes) { mLoadAttributes = aLoadAttributes; return NS_OK;