зеркало из https://github.com/mozilla/gecko-dev.git
(NOT PART OF THE BUILD)
fix some build breakage for moz-icon urls caused by the necko api changes from the other day.
This commit is contained in:
Родитель
995b858e61
Коммит
3c48fc14c1
|
@ -56,7 +56,8 @@ NS_IMETHODIMP nsIconDecoder::Init(imgIRequest *aRequest)
|
||||||
|
|
||||||
mObserver = do_QueryInterface(aRequest); // we're holding 2 strong refs to the request.
|
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");
|
mFrame = do_CreateInstance("@mozilla.org/gfx/image/frame;2");
|
||||||
if (!mFrame) return NS_ERROR_FAILURE;
|
if (!mFrame) return NS_ERROR_FAILURE;
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsIComponentManager.h"
|
#include "nsIComponentManager.h"
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
|
#include "nsNetCID.h"
|
||||||
|
|
||||||
static NS_DEFINE_CID(kStandardURICID, NS_STANDARDURL_CID);
|
static NS_DEFINE_CID(kStandardURICID, NS_STANDARDURL_CID);
|
||||||
|
|
||||||
|
|
|
@ -214,6 +214,14 @@ nsMozIconURI::SetPath(const char * aPath)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsMozIconURI::Equals(nsIURI *other, PRBool *result)
|
nsMozIconURI::Equals(nsIURI *other, PRBool *result)
|
||||||
{
|
{
|
||||||
|
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;
|
*result = PR_FALSE;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,12 +123,6 @@ NS_IMETHODIMP nsIconChannel::GetURI(nsIURI* *aURI)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsIconChannel::SetURI(nsIURI* aURI)
|
|
||||||
{
|
|
||||||
mUrl = aURI;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsIconChannel::Open(nsIInputStream **_retval)
|
nsIconChannel::Open(nsIInputStream **_retval)
|
||||||
{
|
{
|
||||||
|
@ -308,7 +302,7 @@ NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports
|
||||||
|
|
||||||
nsCOMPtr<nsIInputStream> inputStr (do_QueryInterface(streamSupports));
|
nsCOMPtr<nsIInputStream> inputStr (do_QueryInterface(streamSupports));
|
||||||
aListener->OnDataAvailable(this, ctxt, inputStr, 0, iconBuffer.Length());
|
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
|
} // if we got valid bits for the main bitmap mask
|
||||||
|
|
||||||
|
@ -323,13 +317,13 @@ NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsIconChannel::GetLoadAttributes(PRUint32 *aLoadAttributes)
|
NS_IMETHODIMP nsIconChannel::GetLoadFlags(PRUint32 *aLoadAttributes)
|
||||||
{
|
{
|
||||||
*aLoadAttributes = mLoadAttributes;
|
*aLoadAttributes = mLoadAttributes;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsIconChannel::SetLoadAttributes(PRUint32 aLoadAttributes)
|
NS_IMETHODIMP nsIconChannel::SetLoadFlags(PRUint32 aLoadAttributes)
|
||||||
{
|
{
|
||||||
mLoadAttributes = aLoadAttributes;
|
mLoadAttributes = aLoadAttributes;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче