Bug 47207. Changing printf to PRINTF to use new logging facility. r=valeski,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@81885 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -24,6 +24,11 @@
|
||||
#include "nsFrame.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nslog.h"
|
||||
|
||||
NS_IMPL_LOG(nsHTMLImageLoaderLog)
|
||||
#define PRINTF NS_LOG_PRINTF(nsHTMLImageLoaderLog)
|
||||
#define FLUSH NS_LOG_FLUSH(nsHTMLImageLoaderLog)
|
||||
|
||||
#ifdef DEBUG
|
||||
#undef NOISY_IMAGE_LOADING
|
||||
@@ -141,7 +146,7 @@ nsHTMLImageLoader::Update(nsIPresContext* aPresContext,
|
||||
{
|
||||
#ifdef NOISY_IMAGE_LOADING
|
||||
nsFrame::ListTag(stdout, aFrame);
|
||||
printf(": update: status=%x [loader=%p] callBack=%p squelch=%s\n",
|
||||
PRINTF(": update: status=%x [loader=%p] callBack=%p squelch=%s\n",
|
||||
aStatus, mImageLoader, mCallBack,
|
||||
mFlags.mSquelchCallback ? "yes" : "no");
|
||||
#endif
|
||||
@@ -217,25 +222,25 @@ nsHTMLImageLoader::StartLoadImage(nsIPresContext* aPresContext)
|
||||
mFrame, &mImageLoader);
|
||||
#ifdef NOISY_IMAGE_LOADING
|
||||
nsFrame::ListTag(stdout, mFrame);
|
||||
printf(": loading image '");
|
||||
PRINTF(": loading image '");
|
||||
fputs(mURL, stdout);
|
||||
printf("' @ ");
|
||||
PRINTF("' @ ");
|
||||
if (mFlags.mNeedIntrinsicImageSize) {
|
||||
printf("intrinsic size ");
|
||||
PRINTF("intrinsic size ");
|
||||
}
|
||||
printf("%d,%d; oldLoader=%p newLoader=%p",
|
||||
PRINTF("%d,%d; oldLoader=%p newLoader=%p",
|
||||
mComputedImageSize.width, mComputedImageSize.height,
|
||||
oldLoader, mImageLoader);
|
||||
if (sizeToLoadWidth) {
|
||||
printf(" sizeToLoadWidth=%d,%d",
|
||||
PRINTF(" sizeToLoadWidth=%d,%d",
|
||||
sizeToLoadWidth->width, sizeToLoadWidth->height);
|
||||
}
|
||||
else {
|
||||
printf(" autoImageSize=%s needIntrinsicImageSize=%s",
|
||||
PRINTF(" autoImageSize=%s needIntrinsicImageSize=%s",
|
||||
mFlags.mAutoImageSize ? "yes" : "no",
|
||||
mFlags.mNeedIntrinsicImageSize ? "yes" : "no");
|
||||
}
|
||||
printf("\n");
|
||||
PRINTF("\n");
|
||||
#endif
|
||||
|
||||
if (oldLoader != mImageLoader) {
|
||||
@@ -456,7 +461,7 @@ nsHTMLImageLoader::GetDesiredSize(nsIPresContext* aPresContext,
|
||||
mComputedImageSize.height = newHeight;
|
||||
#ifdef NOISY_IMAGE_LOADING
|
||||
nsFrame::ListTag(stdout, mFrame);
|
||||
printf(": %s%scomputedSize=%d,%d min=%d,%d max=%d,%d fixed=%s,%s\n",
|
||||
PRINTF(": %s%scomputedSize=%d,%d min=%d,%d max=%d,%d fixed=%s,%s\n",
|
||||
mFlags.mNeedIntrinsicImageSize ? "need-instrinsic-size " : "",
|
||||
mFlags.mHaveComputedSize ? "have-computed-size " : "",
|
||||
mComputedImageSize.width, mComputedImageSize.height,
|
||||
@@ -482,7 +487,7 @@ nsHTMLImageLoader::GetDesiredSize(nsIPresContext* aPresContext,
|
||||
if (mFlags.mNeedIntrinsicImageSize && mFlags.mHaveIntrinsicImageSize) {
|
||||
// We just learned our intrinisic size. Start over from the top...
|
||||
#ifdef NOISY_IMAGE_LOADING
|
||||
printf(" *** size arrived during StartLoadImage, looping...\n");
|
||||
PRINTF(" *** size arrived during StartLoadImage, looping...\n");
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
@@ -493,7 +498,7 @@ nsHTMLImageLoader::GetDesiredSize(nsIPresContext* aPresContext,
|
||||
aDesiredSize.width = mComputedImageSize.width;
|
||||
aDesiredSize.height = mComputedImageSize.height;
|
||||
#ifdef NOISY_IMAGE_LOADING
|
||||
printf("nsHTMLImageLoader::GetDesiredSize returning %d, %d\n",
|
||||
PRINTF("nsHTMLImageLoader::GetDesiredSize returning %d, %d\n",
|
||||
aDesiredSize.width, aDesiredSize.height);
|
||||
#endif
|
||||
if ((mFlags.mNeedIntrinsicImageSize && !mFlags.mHaveIntrinsicImageSize) ||
|
||||
|
||||
Reference in New Issue
Block a user