Bug 582004 part 2: Make imgIContainerObserver::FrameChanged take a const aDirtyRect argument. r=joe a=blocking

This commit is contained in:
Daniel Holbert 2010-08-13 21:09:48 -07:00
Родитель e442231dd0
Коммит 2c2ed663ed
20 изменённых файлов: 51 добавлений и 38 удалений

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

@ -156,7 +156,7 @@ nsImageLoadingContent::~nsImageLoadingContent()
*/
NS_IMETHODIMP
nsImageLoadingContent::FrameChanged(imgIContainer* aContainer,
nsIntRect* aDirtyRect)
const nsIntRect* aDirtyRect)
{
LOOP_OVER_OBSERVERS(FrameChanged(aContainer, aDirtyRect));
return NS_OK;

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

@ -108,7 +108,7 @@ nsStubImageDecoderObserver::OnDiscard(imgIRequest *aRequest)
NS_IMETHODIMP
nsStubImageDecoderObserver::FrameChanged(imgIContainer *aContainer,
nsIntRect * aDirtyRect)
const nsIntRect *aDirtyRect)
{
return NS_OK;
}

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

@ -5337,7 +5337,8 @@ public:
NS_IMETHOD OnStopDecode(imgIRequest *aRequest, nsresult status,
const PRUnichar *statusArg);
// imgIContainerObserver
NS_IMETHOD FrameChanged(imgIContainer *aContainer, nsIntRect *dirtyRect);
NS_IMETHOD FrameChanged(imgIContainer *aContainer,
const nsIntRect *aDirtyRect);
// imgIContainerObserver
NS_IMETHOD OnStartContainer(imgIRequest *aRequest,
imgIContainer *aContainer);
@ -5606,10 +5607,10 @@ nsSVGFEImageElement::OnStopDecode(imgIRequest *aRequest,
NS_IMETHODIMP
nsSVGFEImageElement::FrameChanged(imgIContainer *aContainer,
nsIntRect *dirtyRect)
const nsIntRect *aDirtyRect)
{
nsresult rv =
nsImageLoadingContent::FrameChanged(aContainer, dirtyRect);
nsImageLoadingContent::FrameChanged(aContainer, aDirtyRect);
Invalidate();
return rv;
}

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

@ -196,7 +196,7 @@ NS_IMETHODIMP nsImageLoader::OnStopRequest(imgIRequest *aRequest,
}
NS_IMETHODIMP nsImageLoader::FrameChanged(imgIContainer *aContainer,
nsIntRect *dirtyRect)
const nsIntRect *aDirtyRect)
{
if (!mFrame)
return NS_ERROR_FAILURE;
@ -206,7 +206,7 @@ NS_IMETHODIMP nsImageLoader::FrameChanged(imgIContainer *aContainer,
return NS_OK;
}
nsRect r = dirtyRect->ToAppUnits(nsPresContext::AppUnitsPerCSSPixel());
nsRect r = aDirtyRect->ToAppUnits(nsPresContext::AppUnitsPerCSSPixel());
DoRedraw(&r);

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

@ -91,7 +91,8 @@ public:
// incrementally in nsImageFrame.cpp.
// imgIContainerObserver (override nsStubImageDecoderObserver)
NS_IMETHOD FrameChanged(imgIContainer *aContainer, nsIntRect *dirtyRect);
NS_IMETHOD FrameChanged(imgIContainer *aContainer,
const nsIntRect *aDirtyRect);
void Destroy();

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

@ -76,7 +76,8 @@ public:
NS_IMETHOD OnStopDecode(imgIRequest *aRequest, nsresult status,
const PRUnichar *statusArg);
// imgIContainerObserver (override nsStubImageDecoderObserver)
NS_IMETHOD FrameChanged(imgIContainer *aContainer, nsIntRect *dirtyRect);
NS_IMETHOD FrameChanged(imgIContainer *aContainer,
const nsIntRect *dirtyRect);
void SetFrame(nsBulletFrame *frame) { mFrame = frame; }
@ -1504,7 +1505,7 @@ NS_IMETHODIMP nsBulletFrame::OnStopDecode(imgIRequest *aRequest,
}
NS_IMETHODIMP nsBulletFrame::FrameChanged(imgIContainer *aContainer,
nsIntRect *aDirtyRect)
const nsIntRect *aDirtyRect)
{
// Invalidate the entire content area. Maybe it's not optimal but it's simple and
// always correct.
@ -1581,10 +1582,10 @@ NS_IMETHODIMP nsBulletListener::OnStopDecode(imgIRequest *aRequest,
}
NS_IMETHODIMP nsBulletListener::FrameChanged(imgIContainer *aContainer,
nsIntRect *dirtyRect)
const nsIntRect *aDirtyRect)
{
if (!mFrame)
return NS_ERROR_FAILURE;
return mFrame->FrameChanged(aContainer, dirtyRect);
return mFrame->FrameChanged(aContainer, aDirtyRect);
}

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

@ -88,7 +88,7 @@ public:
nsresult aStatus,
const PRUnichar *aStatusArg);
NS_IMETHOD FrameChanged(imgIContainer *aContainer,
nsIntRect *aDirtyRect);
const nsIntRect *aDirtyRect);
/* get list item text, without '.' */
static PRBool AppendCounterText(PRInt32 aListStyleType,

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

@ -609,7 +609,8 @@ nsImageFrame::OnStopDecode(imgIRequest *aRequest,
}
nsresult
nsImageFrame::FrameChanged(imgIContainer *aContainer, nsIntRect *aDirtyRect)
nsImageFrame::FrameChanged(imgIContainer *aContainer,
const nsIntRect *aDirtyRect)
{
if (!GetStyleVisibility()->IsVisible()) {
return NS_OK;
@ -1878,7 +1879,7 @@ nsImageFrame::IconLoad::OnDiscard(imgIRequest *aRequest)
NS_IMETHODIMP
nsImageFrame::IconLoad::FrameChanged(imgIContainer *aContainer,
nsIntRect * aDirtyRect)
const nsIntRect *aDirtyRect)
{
nsTObserverArray<nsImageFrame*>::ForwardIterator iter(mIconObservers);
nsImageFrame *frame;
@ -1933,12 +1934,12 @@ NS_IMETHODIMP nsImageListener::OnStopDecode(imgIRequest *aRequest,
}
NS_IMETHODIMP nsImageListener::FrameChanged(imgIContainer *aContainer,
nsIntRect * dirtyRect)
const nsIntRect *aDirtyRect)
{
if (!mFrame)
return NS_ERROR_FAILURE;
return mFrame->FrameChanged(aContainer, dirtyRect);
return mFrame->FrameChanged(aContainer, aDirtyRect);
}
static PRBool

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

@ -79,7 +79,8 @@ public:
NS_IMETHOD OnStopDecode(imgIRequest *aRequest, nsresult status,
const PRUnichar *statusArg);
// imgIContainerObserver (override nsStubImageDecoderObserver)
NS_IMETHOD FrameChanged(imgIContainer *aContainer, nsIntRect * dirtyRect);
NS_IMETHOD FrameChanged(imgIContainer *aContainer,
const nsIntRect *dirtyRect);
void SetFrame(nsImageFrame *frame) { mFrame = frame; }
@ -226,7 +227,8 @@ protected:
nsresult OnStopDecode(imgIRequest *aRequest,
nsresult aStatus,
const PRUnichar *aStatusArg);
nsresult FrameChanged(imgIContainer *aContainer, nsIntRect *aDirtyRect);
nsresult FrameChanged(imgIContainer *aContainer,
const nsIntRect *aDirtyRect);
private:
// random helpers

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

@ -58,7 +58,8 @@ public:
NS_IMETHOD OnStopDecode(imgIRequest *aRequest, nsresult status,
const PRUnichar *statusArg);
// imgIContainerObserver (override nsStubImageDecoderObserver)
NS_IMETHOD FrameChanged(imgIContainer *aContainer, nsIntRect * dirtyRect);
NS_IMETHOD FrameChanged(imgIContainer *aContainer,
const nsIntRect *aDirtyRect);
// imgIContainerObserver (override nsStubImageDecoderObserver)
NS_IMETHOD OnStartContainer(imgIRequest *aRequest,
imgIContainer *aContainer);
@ -402,7 +403,7 @@ NS_IMETHODIMP nsSVGImageListener::OnStopDecode(imgIRequest *aRequest,
}
NS_IMETHODIMP nsSVGImageListener::FrameChanged(imgIContainer *aContainer,
nsIntRect * dirtyRect)
const nsIntRect *aDirtyRect)
{
if (!mFrame)
return NS_ERROR_FAILURE;

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

@ -547,8 +547,8 @@ NS_IMETHODIMP nsImageBoxFrame::OnStopDecode(imgIRequest *request,
return NS_OK;
}
NS_IMETHODIMP nsImageBoxFrame::FrameChanged(imgIContainer *container,
nsIntRect *dirtyRect)
NS_IMETHODIMP nsImageBoxFrame::FrameChanged(imgIContainer *aContainer,
const nsIntRect *aDirtyRect)
{
nsBoxLayoutState state(PresContext());
this->Redraw(state);
@ -594,12 +594,12 @@ NS_IMETHODIMP nsImageBoxListener::OnStopDecode(imgIRequest *request,
return mFrame->OnStopDecode(request, status, statusArg);
}
NS_IMETHODIMP nsImageBoxListener::FrameChanged(imgIContainer *container,
nsIntRect *dirtyRect)
NS_IMETHODIMP nsImageBoxListener::FrameChanged(imgIContainer *aContainer,
const nsIntRect *aDirtyRect)
{
if (!mFrame)
return NS_ERROR_FAILURE;
return mFrame->FrameChanged(container, dirtyRect);
return mFrame->FrameChanged(aContainer, aDirtyRect);
}

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

@ -59,7 +59,8 @@ public:
NS_IMETHOD OnStopDecode(imgIRequest *request, nsresult status,
const PRUnichar *statusArg);
// imgIContainerObserver (override nsStubImageDecoderObserver)
NS_IMETHOD FrameChanged(imgIContainer *container, nsIntRect *dirtyRect);
NS_IMETHOD FrameChanged(imgIContainer *aContainer,
const nsIntRect *aDirtyRect);
void SetFrame(nsImageBoxFrame *frame) { mFrame = frame; }
@ -121,7 +122,8 @@ public:
NS_IMETHOD OnStopDecode(imgIRequest *request,
nsresult status,
const PRUnichar *statusArg);
NS_IMETHOD FrameChanged(imgIContainer *container, nsIntRect *dirtyRect);
NS_IMETHOD FrameChanged(imgIContainer *aContainer,
const nsIntRect *aDirtyRect);
virtual ~nsImageBoxFrame();

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

@ -72,7 +72,7 @@ NS_IMETHODIMP nsTreeImageListener::OnDataAvailable(imgIRequest *aRequest,
}
NS_IMETHODIMP nsTreeImageListener::FrameChanged(imgIContainer *aContainer,
nsIntRect *dirtyRect)
const nsIntRect *aDirtyRect)
{
Invalidate();
return NS_OK;

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

@ -75,7 +75,8 @@ public:
NS_IMETHOD OnDataAvailable(imgIRequest *aRequest, PRBool aCurrentFrame,
const nsIntRect *aRect);
// imgIContainerObserver (override nsStubImageDecoderObserver)
NS_IMETHOD FrameChanged(imgIContainer *aContainer, nsIntRect *dirtyRect);
NS_IMETHOD FrameChanged(imgIContainer *aContainer,
const nsIntRect *aDirtyRect);
NS_IMETHOD AddCell(PRInt32 aIndex, nsITreeColumn* aCol);

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

@ -52,8 +52,9 @@ interface imgIContainer;
* @author Stuart Parmenter <pavlov@netscape.com>
* @version 0.1
*/
[scriptable, uuid(e214c295-4b8e-4aa9-9907-45289e57295b)]
[scriptable, uuid(aa2068c1-6b91-4f52-8603-487b14ac5f04)]
interface imgIContainerObserver : nsISupports
{
[noscript] void frameChanged(in imgIContainer aContainer, in nsIntRect aDirtyRect);
[noscript] void frameChanged(in imgIContainer aContainer,
[const] in nsIntRect aDirtyRect);
};

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

@ -512,7 +512,7 @@ imgRequest::RequestDecode()
/* [noscript] void frameChanged (in imgIContainer container, in nsIntRect dirtyRect); */
NS_IMETHODIMP imgRequest::FrameChanged(imgIContainer *container,
nsIntRect * dirtyRect)
const nsIntRect *dirtyRect)
{
LOG_SCOPE(gImgLog, "imgRequest::FrameChanged");

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

@ -510,7 +510,8 @@ NS_IMETHODIMP imgRequestProxy::GetHasTransferredData(PRBool* hasData)
/** imgIContainerObserver methods **/
void imgRequestProxy::FrameChanged(imgIContainer *container, nsIntRect * dirtyRect)
void imgRequestProxy::FrameChanged(imgIContainer *container,
const nsIntRect *dirtyRect)
{
LOG_FUNC(gImgLog, "imgRequestProxy::FrameChanged");

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

@ -158,7 +158,8 @@ protected:
void OnDiscard ();
/* non-virtual imgIContainerObserver methods */
void FrameChanged(imgIContainer *aContainer, nsIntRect * aDirtyRect);
void FrameChanged(imgIContainer *aContainer,
const nsIntRect *aDirtyRect);
/* non-virtual sort-of-nsIRequestObserver methods */
void OnStartRequest();

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

@ -153,7 +153,7 @@ nsAlertsIconListener::OnStopDecode(imgIRequest* aRequest,
NS_IMETHODIMP
nsAlertsIconListener::FrameChanged(imgIContainer* aContainer,
nsIntRect* aDirtyRect)
const nsIntRect* aDirtyRect)
{
return NS_OK;
}

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

@ -354,8 +354,8 @@ nsMenuItemIconX::LoadIcon(nsIURI* aIconURI)
//
NS_IMETHODIMP
nsMenuItemIconX::FrameChanged(imgIContainer* aContainer,
nsIntRect* aDirtyRect)
nsMenuItemIconX::FrameChanged(imgIContainer* aContainer,
const nsIntRect* aDirtyRect)
{
return NS_OK;
}