Backing out to investigate the DHTML jump on luna, bug 331661

This commit is contained in:
rbs%maths.uq.edu.au 2006-03-27 05:21:44 +00:00
Родитель d9e2f7954c
Коммит a9f97d0fd5
2 изменённых файлов: 6 добавлений и 28 удалений

Просмотреть файл

@ -160,13 +160,7 @@ protected:
#define LL_LASTFLOATWASLETTERFRAME 0x00000080
#define LL_CANPLACEFLOAT 0x00000100
#define LL_LINEENDSINBR 0x00000200
// The "soft-break" flag differs from the "hard-break" flag of <br>. The
// "soft-break" means that a whitespace has been trimmed at the end of the line,
// and therefore its width has not been accounted for (this width can actually be
// large, e.g., if a large word-spacing is set). LL should not be misled into
// placing something where the whitespace was trimmed. See bug 329987.
#define LL_LINEENDSINSOFTBR 0x00000400
#define LL_LASTFLAG LL_LINEENDSINSOFTBR
#define LL_LASTFLAG LL_LINEENDSINBR
PRUint16 mFlags;
@ -245,16 +239,6 @@ public:
SetFlag(LL_LINEENDSINBR, aOn);
}
PRBool GetLineEndsInSoftBR() const
{
return GetFlag(LL_LINEENDSINSOFTBR);
}
void SetLineEndsInSoftBR(PRBool aOn)
{
SetFlag(LL_LINEENDSINSOFTBR, aOn);
}
PRBool InStrictMode() const
{
return mCompatMode != eCompatibility_NavQuirks;

Просмотреть файл

@ -5417,7 +5417,7 @@ nsTextFrame::MeasureText(nsPresContext* aPresContext,
// Note: word-spacing or letter-spacing can make the "space" really
// wide. But since this space is left out from our width, linelayout
// may still try to fit something narrower at the end of the line.
// So on return (see below), we flag a soft-break status to ensure
// So on return (see below), we flag a break-after status to ensure
// that linelayout doesn't place something where the "space" should
// be.
break;
@ -5854,17 +5854,11 @@ nsTextFrame::MeasureText(nsPresContext* aPresContext,
#endif // IBMBIDI
? NS_FRAME_COMPLETE
: NS_FRAME_NOT_COMPLETE;
if (endsInNewline) {
if (endsInNewline || aTextData.mTrailingSpaceTrimmed) {
rs = NS_INLINE_LINE_BREAK_AFTER(rs);
lineLayout.SetLineEndsInBR(PR_TRUE);
}
else if (aTextData.mTrailingSpaceTrimmed && rs == NS_FRAME_COMPLETE) {
// Flag a soft-break that we can check (below) if we come back here
lineLayout.SetLineEndsInSoftBR(PR_TRUE);
}
else if (lineLayout.GetLineEndsInSoftBR() && !lineLayout.GetEndsInWhiteSpace()) {
// Break-before a word that follows the soft-break flagged earlier
rs = NS_INLINE_LINE_BREAK_BEFORE();
if (endsInNewline) {
lineLayout.SetLineEndsInBR(PR_TRUE);
}
}
else if ((aTextData.mOffset != contentLength) && (aTextData.mOffset == startingOffset)) {
// Break-before a long-word that doesn't fit here