Bug 1160847 part 1 - Add some debug functions. r=jfkthame

MozReview-Commit-ID: GclW6OAx6e3

--HG--
extra : source : bb4417abb20926a452c9791962cddf1c715b5674
This commit is contained in:
Xidorn Quan 2016-06-29 17:46:42 +10:00
parent 2673621c4b
commit 5049576d59

View File

@ -449,6 +449,28 @@ struct BidiLineData {
nsIFrame* VisualFrameAt(int32_t aIndex){ return mVisualFrames[aIndex]; }
};
#ifdef DEBUG
extern "C" {
void MOZ_EXPORT
DumpFrameArray(const nsTArray<nsIFrame*>& aFrames)
{
for (nsIFrame* frame : aFrames) {
if (frame == NS_BIDI_CONTROL_FRAME) {
fprintf_stderr(stderr, "(Bidi control frame)\n");
} else {
frame->List();
}
}
}
void MOZ_EXPORT
DumpBidiLine(BidiLineData* aData, bool aVisualOrder)
{
DumpFrameArray(aVisualOrder ? aData->mVisualFrames : aData->mLogicalFrames);
}
}
#endif
/* Some helper methods for Resolve() */
// Should this frame be split between text runs?