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:
@@ -131,7 +131,7 @@ static PRInt32 gReflowInx = -1;
|
||||
if (mReflowId > -1) {\
|
||||
gTotalReqs += gReflowControlCntRQ[mReflowId];\
|
||||
gTotalReflows += gReflowControlCnt[mReflowId];\
|
||||
printf("** Id:%5d %s RF: %d RQ: %d %d/%d %5.2f\n", \
|
||||
PRINTF("** Id:%5d %s RF: %d RQ: %d %d/%d %5.2f\n", \
|
||||
mReflowId, (__desc), \
|
||||
gReflowControlCnt[mReflowId], \
|
||||
gReflowControlCntRQ[mReflowId],\
|
||||
@@ -149,10 +149,10 @@ static PRInt32 gReflowInx = -1;
|
||||
}
|
||||
|
||||
// reflow messages
|
||||
#define REFLOW_DEBUG_MSG(_msg1) printf((_msg1))
|
||||
#define REFLOW_DEBUG_MSG2(_msg1, _msg2) printf((_msg1), (_msg2))
|
||||
#define REFLOW_DEBUG_MSG3(_msg1, _msg2, _msg3) printf((_msg1), (_msg2), (_msg3))
|
||||
#define REFLOW_DEBUG_MSG4(_msg1, _msg2, _msg3, _msg4) printf((_msg1), (_msg2), (_msg3), (_msg4))
|
||||
#define REFLOW_DEBUG_MSG(_msg1) PRINTF((_msg1))
|
||||
#define REFLOW_DEBUG_MSG2(_msg1, _msg2) PRINTF((_msg1), (_msg2))
|
||||
#define REFLOW_DEBUG_MSG3(_msg1, _msg2, _msg3) PRINTF((_msg1), (_msg2), (_msg3))
|
||||
#define REFLOW_DEBUG_MSG4(_msg1, _msg2, _msg3, _msg4) PRINTF((_msg1), (_msg2), (_msg3), (_msg4))
|
||||
|
||||
#else //-------------
|
||||
|
||||
@@ -173,10 +173,10 @@ static PRInt32 gReflowInx = -1;
|
||||
// This is for being VERY noisy
|
||||
//------------------------------------------
|
||||
#ifdef DO_VERY_NOISY
|
||||
#define REFLOW_NOISY_MSG(_msg1) printf((_msg1))
|
||||
#define REFLOW_NOISY_MSG2(_msg1, _msg2) printf((_msg1), (_msg2))
|
||||
#define REFLOW_NOISY_MSG3(_msg1, _msg2, _msg3) printf((_msg1), (_msg2), (_msg3))
|
||||
#define REFLOW_NOISY_MSG4(_msg1, _msg2, _msg3, _msg4) printf((_msg1), (_msg2), (_msg3), (_msg4))
|
||||
#define REFLOW_NOISY_MSG(_msg1) PRINTF((_msg1))
|
||||
#define REFLOW_NOISY_MSG2(_msg1, _msg2) PRINTF((_msg1), (_msg2))
|
||||
#define REFLOW_NOISY_MSG3(_msg1, _msg2, _msg3) PRINTF((_msg1), (_msg2), (_msg3))
|
||||
#define REFLOW_NOISY_MSG4(_msg1, _msg2, _msg3, _msg4) PRINTF((_msg1), (_msg2), (_msg3), (_msg4))
|
||||
#else
|
||||
#define REFLOW_NOISY_MSG(_msg)
|
||||
#define REFLOW_NOISY_MSG2(_msg1, _msg2)
|
||||
@@ -202,7 +202,7 @@ static PRInt32 gReflowInx = -1;
|
||||
if (aReflowState.mComputedWidth != NS_UNCONSTRAINEDSIZE) { \
|
||||
nscoord width = aDesiredSize.width - borderPadding.left - borderPadding.right; \
|
||||
if (width != aReflowState.mComputedWidth) { \
|
||||
printf("aDesiredSize.width %d %d != aReflowState.mComputedWidth %d\n", aDesiredSize.width, width, aReflowState.mComputedWidth); \
|
||||
PRINTF("aDesiredSize.width %d %d != aReflowState.mComputedWidth %d\n", aDesiredSize.width, width, aReflowState.mComputedWidth); \
|
||||
} \
|
||||
NS_ASSERTION(width == aReflowState.mComputedWidth, "Returning bad value when constrained!"); \
|
||||
}
|
||||
@@ -344,11 +344,11 @@ static int myCounter = 0;
|
||||
|
||||
static void printSize(char * aDesc, nscoord aSize)
|
||||
{
|
||||
printf(" %s: ", aDesc);
|
||||
PRINTF(" %s: ", aDesc);
|
||||
if (aSize == NS_UNCONSTRAINEDSIZE) {
|
||||
printf("UNC");
|
||||
PRINTF("UNC");
|
||||
} else {
|
||||
printf("%d", aSize);
|
||||
PRINTF("%d", aSize);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -368,35 +368,35 @@ nsListControlFrame::Reflow(nsIPresContext* aPresContext,
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
#ifdef DO_REFLOW_DEBUG
|
||||
printf("%p ** Id: %d nsLCF::Reflow %d R: ", this, mReflowId, myCounter++);
|
||||
PRINTF("%p ** Id: %d nsLCF::Reflow %d R: ", this, mReflowId, myCounter++);
|
||||
switch (aReflowState.reason) {
|
||||
case eReflowReason_Initial:
|
||||
printf("Initia");break;
|
||||
PRINTF("Initia");break;
|
||||
case eReflowReason_Incremental:
|
||||
printf("Increm");break;
|
||||
PRINTF("Increm");break;
|
||||
case eReflowReason_Resize:
|
||||
printf("Resize");break;
|
||||
PRINTF("Resize");break;
|
||||
case eReflowReason_StyleChange:
|
||||
printf("StyleC");break;
|
||||
PRINTF("StyleC");break;
|
||||
case eReflowReason_Dirty:
|
||||
printf("Dirty ");break;
|
||||
default:printf("<unknown>%d", aReflowState.reason);break;
|
||||
PRINTF("Dirty ");break;
|
||||
default:PRINTF("<unknown>%d", aReflowState.reason);break;
|
||||
}
|
||||
|
||||
printSize("AW", aReflowState.availableWidth);
|
||||
printSize("AH", aReflowState.availableHeight);
|
||||
printSize("CW", aReflowState.mComputedWidth);
|
||||
printSize("CH", aReflowState.mComputedHeight);
|
||||
printf("\n");
|
||||
PRINTF("\n");
|
||||
#if 0
|
||||
{
|
||||
const nsStyleDisplay* display;
|
||||
GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)display);
|
||||
printf("+++++++++++++++++++++++++++++++++ ");
|
||||
PRINTF("+++++++++++++++++++++++++++++++++ ");
|
||||
switch (display->mVisible) {
|
||||
case NS_STYLE_VISIBILITY_COLLAPSE: printf("NS_STYLE_VISIBILITY_COLLAPSE\n");break;
|
||||
case NS_STYLE_VISIBILITY_HIDDEN: printf("NS_STYLE_VISIBILITY_HIDDEN\n");break;
|
||||
case NS_STYLE_VISIBILITY_VISIBLE: printf("NS_STYLE_VISIBILITY_VISIBLE\n");break;
|
||||
case NS_STYLE_VISIBILITY_COLLAPSE: PRINTF("NS_STYLE_VISIBILITY_COLLAPSE\n");break;
|
||||
case NS_STYLE_VISIBILITY_HIDDEN: PRINTF("NS_STYLE_VISIBILITY_HIDDEN\n");break;
|
||||
case NS_STYLE_VISIBILITY_VISIBLE: PRINTF("NS_STYLE_VISIBILITY_VISIBLE\n");break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -444,7 +444,7 @@ nsListControlFrame::Reflow(nsIPresContext* aPresContext,
|
||||
if (options) {
|
||||
PRUint32 numOptions;
|
||||
options->GetLength(&numOptions);
|
||||
printf("--- Num of Items %d ---\n", numOptions);
|
||||
PRINTF("--- Num of Items %d ---\n", numOptions);
|
||||
for (PRUint32 i=0;i<numOptions;i++) {
|
||||
nsCOMPtr<nsIDOMHTMLOptionElement> optionElement = getter_AddRefs(GetOption(*options, i));
|
||||
if (optionElement) {
|
||||
@@ -457,7 +457,7 @@ nsListControlFrame::Reflow(nsIPresContext* aPresContext,
|
||||
} else {
|
||||
text = "No Value";
|
||||
}
|
||||
printf("[%d] - %s\n", i, text.ToNewCString());
|
||||
PRINTF("[%d] - %s\n", i, text.ToNewCString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -839,7 +839,7 @@ nsListControlFrame::Reflow(nsIPresContext* aPresContext,
|
||||
if (!isInDropDownMode) {
|
||||
PRInt32 numRows = 1;
|
||||
GetSizeAttribute(&numRows);
|
||||
printf("%d ", numRows);
|
||||
PRINTF("%d ", numRows);
|
||||
if (numRows == 2) {
|
||||
COMPARE_QUIRK_SIZE("nsListControlFrame", 56, 38)
|
||||
} else if (numRows == 3) {
|
||||
@@ -1345,9 +1345,9 @@ nsListControlFrame::HandleEvent(nsIPresContext* aPresContext,
|
||||
"NS_MOUSE_RIGHT_CLICK"};
|
||||
int inx = aEvent->message-NS_MOUSE_MESSAGE_START;
|
||||
if (inx >= 0 && inx <= (NS_MOUSE_RIGHT_CLICK-NS_MOUSE_MESSAGE_START)) {
|
||||
printf("Mouse in ListFrame %s [%d]\n", desc[inx], aEvent->message);
|
||||
PRINTF("Mouse in ListFrame %s [%d]\n", desc[inx], aEvent->message);
|
||||
} else {
|
||||
printf("Mouse in ListFrame <UNKNOWN> [%d]\n", aEvent->message);
|
||||
PRINTF("Mouse in ListFrame <UNKNOWN> [%d]\n", aEvent->message);
|
||||
}*/
|
||||
|
||||
if (nsEventStatus_eConsumeNoDefault == *aEventStatus)
|
||||
@@ -1368,7 +1368,7 @@ nsListControlFrame::HandleEvent(nsIPresContext* aPresContext,
|
||||
if (NS_KEY_EVENT == aEvent->eventStructType) {
|
||||
#ifdef DEBUG_rodsXXX
|
||||
nsKeyEvent* keyEvent = (nsKeyEvent*)aEvent;
|
||||
printf("---> %d %c\n", keyEvent->keyCode, keyEvent->keyCode);
|
||||
PRINTF("---> %d %c\n", keyEvent->keyCode, keyEvent->keyCode);
|
||||
#endif
|
||||
//if (NS_VK_SPACE == keyEvent->keyCode || NS_VK_RETURN == keyEvent->keyCode) {
|
||||
// MouseClicked(aPresContext);
|
||||
@@ -1702,7 +1702,7 @@ nsListControlFrame::SetContentSelected(PRInt32 aIndex, PRBool aSelected)
|
||||
PRInt32 numOptions = 0;
|
||||
if (NS_SUCCEEDED(GetNumberOfOptions(&numOptions))) {
|
||||
if (aIndex >= numOptions || aIndex < 0) {
|
||||
printf("Index: %d Range 0:%d (setting to %s)\n", aIndex, numOptions, aSelected?"TRUE":"FALSE");
|
||||
PRINTF("Index: %d Range 0:%d (setting to %s)\n", aIndex, numOptions, aSelected?"TRUE":"FALSE");
|
||||
NS_ASSERTION(0, "Bad Index has been passed into SetContentSelected!");
|
||||
}
|
||||
} else {
|
||||
@@ -2233,7 +2233,7 @@ NS_IMETHODIMP
|
||||
nsListControlFrame::AddOption(nsIPresContext* aPresContext, PRInt32 aIndex)
|
||||
{
|
||||
#ifdef DO_REFLOW_DEBUG
|
||||
printf("---- Id: %d nsLCF %p Added Option %d\n", mReflowId, this, aIndex);
|
||||
PRINTF("---- Id: %d nsLCF %p Added Option %d\n", mReflowId, this, aIndex);
|
||||
#endif
|
||||
|
||||
if (!mIsAllContentHere) {
|
||||
@@ -2285,7 +2285,7 @@ nsListControlFrame::AddOption(nsIPresContext* aPresContext, PRInt32 aIndex)
|
||||
if (NS_CONTENT_ATTR_NOT_THERE == rv || 0 == text.Length()) {
|
||||
option->GetText(text);
|
||||
}
|
||||
printf("|||||this %p Index: %d [%s] CB: %p\n", this, aIndex, text.ToNewCString(), mComboboxFrame); //leaks
|
||||
PRINTF("|||||this %p Index: %d [%s] CB: %p\n", this, aIndex, text.ToNewCString(), mComboboxFrame); //leaks
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -2997,8 +2997,8 @@ nsListControlFrame::GetIndexFromDOMEvent(nsIDOMEvent* aMouseEvent,
|
||||
mPresContext->GetShell(getter_AddRefs(presShell));
|
||||
nsIFrame * frame;
|
||||
nsresult result = presShell->GetPrimaryFrameFor(content, &frame);
|
||||
printf("Target Frame: %p this: %p\n", frame, this);
|
||||
printf("-->\n");
|
||||
PRINTF("Target Frame: %p this: %p\n", frame, this);
|
||||
PRINTF("-->\n");
|
||||
#endif
|
||||
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
@@ -3011,11 +3011,11 @@ nsListControlFrame::GetIndexFromDOMEvent(nsIDOMEvent* aMouseEvent,
|
||||
if (optionContent) {
|
||||
aOldIndex = aCurIndex;
|
||||
aCurIndex = GetSelectedIndexFromContent(optionContent);
|
||||
//printf("--> Old: %d New: %d\n", aOldIndex, aCurIndex);
|
||||
//PRINTF("--> Old: %d New: %d\n", aOldIndex, aCurIndex);
|
||||
rv = NS_OK;
|
||||
}
|
||||
}
|
||||
//printf("--> bailing\n");
|
||||
//PRINTF("--> bailing\n");
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -3399,9 +3399,9 @@ nsListControlFrame::AdjustIndexForDisabledOpt(PRInt32 &anNewIndex, PRInt32 &anOl
|
||||
aWasDisabled = PR_FALSE;
|
||||
while (1) {
|
||||
// Special Debug Code
|
||||
//printf("T:%d B:%d I:%d R:%d IM:%d I:%d\n", top, bottom, newIndex, aDoAdjustInc, aDoAdjustIncNext, doingReverse);
|
||||
//PRINTF("T:%d B:%d I:%d R:%d IM:%d I:%d\n", top, bottom, newIndex, aDoAdjustInc, aDoAdjustIncNext, doingReverse);
|
||||
//if (newIndex < -30 || newIndex > 30) {
|
||||
// printf("********************************* Stopped!\n");
|
||||
// PRINTF("********************************* Stopped!\n");
|
||||
// return;
|
||||
//}
|
||||
// if the newIndex isn't disabled, we are golden, bail out
|
||||
|
||||
Reference in New Issue
Block a user