Debugging code for Bidi resolution. NPOTDB

This commit is contained in:
Simon Montagu 2011-03-24 11:28:44 +02:00
parent 6fcf5aed59
commit ac0eb6cddb
2 changed files with 30 additions and 0 deletions

View File

@ -58,6 +58,9 @@
#include "gfxUnicodeProperties.h"
#include "nsIThebesFontMetrics.h"
#undef NOISY_BIDI
#undef REALLY_NOISY_BIDI
using namespace mozilla;
static const PRUnichar kSpace = 0x0020;
@ -424,6 +427,16 @@ nsBidiPresUtils::Resolve(nsBlockFrame* aBlockFrame)
}
}
#ifdef NOISY_BIDI
if (mBuffer[0] != kObjectSubstitute) {
printf("Before Resolve(), aBlockFrame=0x%p, mBuffer='%s', frameCount=%d\n",
(void*)aBlockFrame, NS_ConvertUTF16toUTF8(mBuffer).get(), frameCount);
#ifdef REALLY_NOISY_BIDI
printf(" frameTree=:\n");
nsFrame::DumpFrameTree(aBlockFrame);
#endif
}
#endif
for (; ;) {
if (fragmentLength <= 0) {
// Get the next frame from mLogicalFrames
@ -607,6 +620,13 @@ nsBidiPresUtils::Resolve(nsBlockFrame* aBlockFrame)
}
}
} // for
#ifdef REALLY_NOISY_BIDI
if (mBuffer[0] != kObjectSubstitute) {
printf("---\nAfter Resolve(), frameTree =:\n");
nsFrame::DumpFrameTree(aBlockFrame);
printf("===\n");
}
#endif
return mSuccess;
}

View File

@ -561,6 +561,9 @@ MakeTextRun(const PRUnichar *aText, PRUint32 aLength,
gTextRuns->RemoveFromCache(textRun);
return nsnull;
}
#ifdef NOISY_BIDI
printf("Created textrun\n");
#endif
return textRun.forget();
}
@ -585,6 +588,9 @@ MakeTextRun(const PRUint8 *aText, PRUint32 aLength,
gTextRuns->RemoveFromCache(textRun);
return nsnull;
}
#ifdef NOISY_BIDI
printf("Created textrun\n");
#endif
return textRun.forget();
}
@ -6576,6 +6582,10 @@ nsTextFrame::ReflowText(nsLineLayout& aLineLayout, nscoord aAvailableWidth,
}
}
#ifdef NOISY_BIDI
printf("Reflowed textframe\n");
#endif
const nsStyleText* textStyle = GetStyleText();
PRBool atStartOfLine = aLineLayout.LineAtStart();