Mozilla Home
Privacy
Cookies
Legal
Bugzilla
Browse
Advanced Search
New Bug
Reports
Documentation
Log In
Log In with GitHub
or
Remember me
Browse
Advanced Search
New Bug
Reports
Documentation
Attachment 498356 Details for
Bug 263359
[patch]
printfs for debugging
DebugBidi.diff (text/plain), 4.15 KB, created by
Simon Montagu :smontagu
(
hide
)
Description:
printfs for debugging
Filename:
MIME Type:
Creator:
Simon Montagu :smontagu
Size:
4.15 KB
patch
obsolete
>diff --git a/layout/base/nsBidiPresUtils.cpp b/layout/base/nsBidiPresUtils.cpp >--- a/layout/base/nsBidiPresUtils.cpp >+++ b/layout/base/nsBidiPresUtils.cpp >@@ -51,16 +51,19 @@ > #include "nsBidiUtils.h" > #include "nsCSSFrameConstructor.h" > #include "nsHTMLContainerFrame.h" > #include "nsInlineFrame.h" > #include "nsPlaceholderFrame.h" > #include "nsContainerFrame.h" > #include "nsFirstLetterFrame.h" > >+#undef NOISY_BIDI >+#undef REALLY_NOISY_BIDI >+ > using namespace mozilla; > > static const PRUnichar kSpace = 0x0020; > static const PRUnichar kLineSeparator = 0x2028; > static const PRUnichar kObjectSubstitute = 0xFFFC; > static const PRUnichar kLRE = 0x202A; > static const PRUnichar kRLE = 0x202B; > static const PRUnichar kLRO = 0x202D; >@@ -417,16 +420,26 @@ nsBidiPresUtils::Resolve(nsBlockFrame* a > for (content = aBlockFrame->GetContent() ; content; content = content->GetParent()) { > if (content->IsNodeOfType(nsINode::eHTML_FORM_CONTROL) || content->IsXUL()) { > isVisual = PR_FALSE; > break; > } > } > } > >+#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 > if (++frameIndex >= frameCount) { > break; > } > frame = mLogicalFrames[frameIndex]; > frameType = frame->GetType(); >@@ -600,16 +613,23 @@ nsBidiPresUtils::Resolve(nsBlockFrame* a > // We're not at an end of a run, and |frame| is the last child of its parent. > // If its ancestors happen to have bidi continuations, convert them into > // fluid continuations. > nsIFrame* parent = frame->GetParent(); > JoinInlineAncestors(parent); > } > } > } // for >+#ifdef REALLY_NOISY_BIDI >+ if (mBuffer[0] != kObjectSubstitute) { >+ printf("---\nAfter Resolve(), frameTree =:\n"); >+ nsFrame::DumpFrameTree(aBlockFrame); >+ printf("===\n"); >+ } >+#endif > return mSuccess; > } > > // Should this frame be treated as a leaf (e.g. when building mLogicalFrames)? > PRBool IsBidiLeaf(nsIFrame* aFrame) { > nsIFrame* kid = aFrame->GetFirstChild(nsnull); > return !kid > || !aFrame->IsFrameOfType(nsIFrame::eBidiInlineContainer); >diff --git a/layout/generic/nsTextFrameThebes.cpp b/layout/generic/nsTextFrameThebes.cpp >--- a/layout/generic/nsTextFrameThebes.cpp >+++ b/layout/generic/nsTextFrameThebes.cpp >@@ -508,16 +508,19 @@ MakeTextRun(const PRUnichar *aText, PRUi > } > if (!textRun) > return nsnull; > nsresult rv = gTextRuns->AddObject(textRun); > if (NS_FAILED(rv)) { > gTextRuns->RemoveFromCache(textRun); > return nsnull; > } >+#ifdef NOISY_BIDI >+ printf("Created textrun\n"); >+#endif > return textRun.forget(); > } > > static gfxTextRun * > MakeTextRun(const PRUint8 *aText, PRUint32 aLength, > gfxFontGroup *aFontGroup, const gfxFontGroup::Parameters* aParams, > PRUint32 aFlags) > { >@@ -532,16 +535,19 @@ MakeTextRun(const PRUint8 *aText, PRUint > } > if (!textRun) > return nsnull; > nsresult rv = gTextRuns->AddObject(textRun); > if (NS_FAILED(rv)) { > gTextRuns->RemoveFromCache(textRun); > return nsnull; > } >+#ifdef NOISY_BIDI >+ printf("Created textrun\n"); >+#endif > return textRun.forget(); > } > > nsresult > nsTextFrameTextRunCache::Init() { > gTextRuns = new FrameTextRunCache(); > return gTextRuns ? NS_OK : NS_ERROR_OUT_OF_MEMORY; > } >@@ -6423,16 +6429,20 @@ nsTextFrame::ReflowText(nsLineLayout& aL > } > else { > if (0 != (mState & TEXT_BLINK_ON)) { > mState &= ~TEXT_BLINK_ON; > nsBlinkTimer::RemoveBlinkFrame(this); > } > } > >+#ifdef NOISY_BIDI >+ printf("Reflowed textframe\n"); >+#endif >+ > const nsStyleText* textStyle = GetStyleText(); > > PRBool atStartOfLine = aLineLayout.LineAtStart(); > if (atStartOfLine) { > AddStateBits(TEXT_START_OF_LINE); > } > > PRUint32 flowEndInTextRun;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Flags:
roc
: review+
Actions:
View
|
Diff
|
Review
Attachments on
bug 263359
:
161392
|
161393
|
161394
|
161455
|
493937
|
493938
|
493939
|
493940
|
495867
|
495868
|
495869
|
495870
|
495873
|
495874
|
498344
|
498345
|
498346
|
498347
|
498349
|
498351
| 498356 |
498455
|
521980
|
522787
|
522788
|
537515