Always set wordLen to -1 before calling tx.GetNextWord() from AddInline[Min|Pref]Width, so that GetNextWord() will look at the entire content. bug=363732, r=smontagu sr=dbaron
This commit is contained in:
@@ -5687,11 +5687,7 @@ nsTextFrame::AddInlineMinWidth(nsIRenderingContext *aRenderingContext,
|
|||||||
char* bp1;
|
char* bp1;
|
||||||
PRUnichar* bp2;
|
PRUnichar* bp2;
|
||||||
};
|
};
|
||||||
PRInt32 wordLen, contentLen;
|
PRInt32 wordLen = -1, contentLen;
|
||||||
#ifdef IBMBIDI
|
|
||||||
// Is this right for this purpose?
|
|
||||||
wordLen = (mState & NS_FRAME_IS_BIDI) ? mContentOffset + mContentLength : -1;
|
|
||||||
#endif // IBMBIDI
|
|
||||||
PRBool isWhitespace, wasTransformed;
|
PRBool isWhitespace, wasTransformed;
|
||||||
// XXX Is !aData->skipWhitespace the right criterion for when the
|
// XXX Is !aData->skipWhitespace the right criterion for when the
|
||||||
// text transformer should capitalize the first letter?
|
// text transformer should capitalize the first letter?
|
||||||
@@ -5802,10 +5798,6 @@ nsTextFrame::AddInlinePrefWidth(nsIRenderingContext *aRenderingContext,
|
|||||||
PRUnichar* bp2;
|
PRUnichar* bp2;
|
||||||
};
|
};
|
||||||
PRInt32 wordLen = -1, contentLen;
|
PRInt32 wordLen = -1, contentLen;
|
||||||
#ifdef IBMBIDI
|
|
||||||
// Is this right for this purpose?
|
|
||||||
wordLen = (mState & NS_FRAME_IS_BIDI) ? mContentOffset + mContentLength : -1;
|
|
||||||
#endif // IBMBIDI
|
|
||||||
PRBool isWhitespace, wasTransformed;
|
PRBool isWhitespace, wasTransformed;
|
||||||
// XXX Should fix this to use something better than GetNextWord!
|
// XXX Should fix this to use something better than GetNextWord!
|
||||||
// XXX Is !aData->skipWhitespace the right criterion for when the
|
// XXX Is !aData->skipWhitespace the right criterion for when the
|
||||||
|
|||||||
Reference in New Issue
Block a user