From c929add96bc9b1dc16e4e97740f1454553c523a0 Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Sun, 23 Feb 2003 18:39:41 +0000 Subject: [PATCH] Bug 189295 nsTextFrame.cpp: The variable isWhitespace has not yet been assigned a value. patch by Roland.Mainz@informatik.med.uni-giessen.de r=rbs sr=roc+moz git-svn-id: svn://10.0.0.236/trunk@138301 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsTextFrame.cpp | 5 +++-- mozilla/layout/html/base/src/nsTextFrame.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index 7e76bf08750..49bd46be33e 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -4827,6 +4827,9 @@ nsTextFrame::MeasureText(nsIPresContext* aPresContext, wordLen = start; #endif // IBMBIDI + bp2 = aTx.GetNextWord(aTextData.mInWord, &wordLen, &contentLen, &isWhitespace, + &wasTransformed, textRun.mNumSegments == 0); + // We need to set aTextData.mCanBreakBefore to true after 1st word. But we can't set // aTextData.mCanBreakBefore without seeing the 2nd word. That's because this frame // may only contain part of one word, the other part is in next frame. @@ -4835,8 +4838,6 @@ nsTextFrame::MeasureText(nsIPresContext* aPresContext, firstWordDone = PR_TRUE; } - bp2 = aTx.GetNextWord(aTextData.mInWord, &wordLen, &contentLen, &isWhitespace, - &wasTransformed, textRun.mNumSegments == 0); #ifdef IBMBIDI if (nextBidi) { mContentLength -= contentLen; diff --git a/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp index 7e76bf08750..49bd46be33e 100644 --- a/mozilla/layout/html/base/src/nsTextFrame.cpp +++ b/mozilla/layout/html/base/src/nsTextFrame.cpp @@ -4827,6 +4827,9 @@ nsTextFrame::MeasureText(nsIPresContext* aPresContext, wordLen = start; #endif // IBMBIDI + bp2 = aTx.GetNextWord(aTextData.mInWord, &wordLen, &contentLen, &isWhitespace, + &wasTransformed, textRun.mNumSegments == 0); + // We need to set aTextData.mCanBreakBefore to true after 1st word. But we can't set // aTextData.mCanBreakBefore without seeing the 2nd word. That's because this frame // may only contain part of one word, the other part is in next frame. @@ -4835,8 +4838,6 @@ nsTextFrame::MeasureText(nsIPresContext* aPresContext, firstWordDone = PR_TRUE; } - bp2 = aTx.GetNextWord(aTextData.mInWord, &wordLen, &contentLen, &isWhitespace, - &wasTransformed, textRun.mNumSegments == 0); #ifdef IBMBIDI if (nextBidi) { mContentLength -= contentLen;